PLAT-1890 Fixed assorted ModifyingEnforceTypeWarning warnings

This commit is contained in:
Jeremy Bowman
2018-01-22 23:25:53 -05:00
parent 2935578b9a
commit ebc54c8f1a
13 changed files with 33 additions and 21 deletions

View File

@@ -638,7 +638,7 @@ class MiscCourseTests(ContentStoreTestCase):
"youtube_id_1_25": "AKqURZnYqpk",
"youtube_id_1_5": "DYpADpL7jAY",
"name": "truncated_video",
"end_time": 10.0,
"end_time": timedelta(hours=10),
}
)
self.store.create_child(

View File

@@ -1137,7 +1137,6 @@ def settings_handler(request, course_key_string):
entrance_exam_minimum_score_pct = float(ee_min_score_pct)
if entrance_exam_minimum_score_pct.is_integer():
entrance_exam_minimum_score_pct = entrance_exam_minimum_score_pct / 100
entrance_exam_minimum_score_pct = unicode(entrance_exam_minimum_score_pct)
# If there's already an entrance exam defined, we'll update the existing one
if course_entrance_exam_present:
exam_data = {

View File

@@ -145,7 +145,7 @@ def _create_entrance_exam(request, course_key, entrance_exam_minimum_score_pct=N
course = modulestore().get_course(course_key)
metadata = {
'entrance_exam_enabled': True,
'entrance_exam_minimum_score_pct': unicode(entrance_exam_minimum_score_pct),
'entrance_exam_minimum_score_pct': entrance_exam_minimum_score_pct,
'entrance_exam_id': unicode(created_block.location),
}
CourseMetadata.update_from_dict(metadata, course, request.user)