Skip to content

Commit

Permalink
small improvments to mastery
Browse files Browse the repository at this point in the history
The credit for each learning objective is the number of passed topics in
that LO divided by the number of topics in that LO. Previously it was
dividing by the number of topics in the whole exam.

The "current topic" progress item isn't shown when the exam is finished.
  • Loading branch information
christianp committed Dec 4, 2024
1 parent 6827d93 commit 4bdd6ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions diagnostic_scripts/mastery.jme
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ next_topic (The next topic to assess):
available_topics, // Topics that we can move to next: either no dependencies, or all their dependencies have been passed.
filter(
t -> let(
all_deps_passed, all(topicdict[topicname]["status"]="passed" for: topicname of: t["topic"]["depends_on"]),
all_deps_passed and t["status"]<>"passed"
all_deps_passed, all(topicdict[topicname]["status"] <> "unknown" for: topicname of: t["topic"]["depends_on"]),
all_deps_passed and t["status"]="unknown"
)
, topics
),
Expand Down Expand Up @@ -202,7 +202,7 @@ after_exam_ended (The state after the exam has finished):

progress (Summarise the student's progress through the exam):
let(
passed_topics, filter(t -> t["status"]="passed", state["topics"])
passed_topics, filter(t -> t["status"] = "passed", state["topics"])
, num_passed_topics, len(passed_topics)
, num_topics, len(state["topics"])
, exam_progress, num_passed_topics/num_topics
Expand All @@ -212,14 +212,14 @@ progress (Summarise the student's progress through the exam):
let(
ltopics, filter(t -> lo["name"] in t["topic"]["learning_objectives"], state["topics"]),
passed, filter(t -> t["status"]="passed", ltopics),
p, len(passed)/len(topics),
p, len(passed)/len(ltopics),
["name": lo["name"], "progress": p, "credit": p]
)
for: lo
of: learning_objectives
, topic_progress, [["name": "Current topic: {current_topic}", "progress": topic_credit, "credit": topic_credit]]

, topic_progress
, if(state["finished"], [], topic_progress)
+ lo_progress
+ [
["name": translate("control.total"), "progress": exam_progress, "credit": exam_progress]
Expand Down
Loading

0 comments on commit 4bdd6ac

Please sign in to comment.