summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLan Hui <lanhui@zjnu.edu.cn>2022-01-17 10:01:53 +0800
committerLan Hui <lanhui@zjnu.edu.cn>2022-01-17 10:01:53 +0800
commit3cd3739694dfc5d8f91b1a79878cb403fd3f8ee6 (patch)
tree42b8741f50d918f5c650612c9998685c90377593
parent0520346ac0879e627e9d3c478f9167c85a53d63c (diff)
analyze.py: a few more comments.
-rw-r--r--analyze.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/analyze.py b/analyze.py
index 590995d..8a38ba6 100644
--- a/analyze.py
+++ b/analyze.py
@@ -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))