示例#1
0
def remove_entrance_exam_milestone_reference(request, course_key):
    """
    Remove content reference for entrance exam.
    """
    course_children = modulestore().get_items(
        course_key,
        qualifiers={'category': 'chapter'}
    )
    for course_child in course_children:
        if course_child.is_entrance_exam:
            delete_item(request, course_child.scope_ids.usage_id)
            milestones_helpers.remove_content_references(str(course_child.scope_ids.usage_id))
 def test_remove_content_references_returns_none_when_app_disabled(self):
     response = milestones_helpers.remove_content_references(
         "i4x://any/content/id/will/do")
     assert response is None