diff options
| -rw-r--r-- | analyze.py | 8 | 
1 files changed, 4 insertions, 4 deletions
| @@ -186,7 +186,7 @@ def get_scores_for_each_student(grade_dir, task_dict):  def get_objective_total(d):
 -    ''' For each objective, get its total by summing all tasks.'''
 +    ''' For each objective, get its total by summing over all tasks.'''
      objective_lst = d['course.objectives']
      result = []
      check_sum = 0
 @@ -199,7 +199,7 @@ def get_objective_total(d):          check_sum += total
          result.append((o, total))
      if check_sum != 100:
 -        print('Objective total is not 100 (%d instead). Make sure you have divide the objective scores across task correctly.' % (check_sum))
 +        print('Objective total is not 100 (%d instead). Make sure you have divide the objective scores across tasks correctly.' % (check_sum))
          sys.exit()
      return result # [(objective1, value1), (objective2, value2), ...]
 @@ -319,8 +319,8 @@ print('Check spreadsheet %s.' % (GRADE_FILE))  objective_total = get_objective_total(task_dict)
  num_student = len(student_lst)
  for x in objective_total:
 -    co = x[0]
 -    value = x[1]
 +    co = x[0] # name of the course objective
 +    value = x[1] # the associated total value of that course objective
      try:
          percentage = 100 * course_object_cumulative_score[co]/(value * num_student)
          print('Course objective %s is %.0f%% satisfied.' % (co, percentage))
 | 
