def validate_course_policy(module_store, course_id):
 warn_cnt = 0
 for module in module_store.modules[course_id].itervalues():
  if (module.location.category == 'course'):
   if (not module._field_data.has(module, 'rerandomize')):
    warn_cnt += 1
    print 'WARN: course policy does not specify value for "rerandomize" whose default is now "never". The behavior of your course may change.'
   if (not module._field_data.has(module, 'showanswer')):
    warn_cnt += 1
    print 'WARN: course policy does not specify value for "showanswer" whose default is now "finished". The behavior of your course may change.'
 return warn_cnt

def validate_course_policy ( module_store , course_id ) : warn_cnt = 0 for module in module_store . modules [ course_id ] . itervalues ( ) : if ( module . location . category == 'course' ) : if ( not module . _field_data . has ( module , 'rerandomize' ) ) : warn_cnt += 1 print 'WARN: course policy does not specify value for "rerandomize" whose default is now "never". The behavior of your course may change.' if ( not module . _field_data . has ( module , 'showanswer' ) ) : warn_cnt += 1 print 'WARN: course policy does not specify value for "showanswer" whose default is now "finished". The behavior of your course may change.' return warn_cnt
validate that the course explicitly sets values for any fields whose defaults may have changed between the export and the import .