Extracting a Student

A common starting point for writing plans is a student that doesn’t “work”. Perhaps a plan definition is wrong; perhaps there is no plan definition yet for the student’s plan.

One example (as of 2025-06-22) is 20967476. Riley Metzger writes, “20967476 appears to be missing this check.” Riley then quotes “Complete 1 of the following: AMATH231, AMATH242, AMATH250,…” He also notes “this exact check is also in the STAT Honours Plan if you want to save coding time”.

You can extract the transcript for this student with the command da-extract-transcript 20967476. That command, by itself will just print the transcript to the terminal window. You probably want to add it to the test suite. The correct “place” in the text suite is determined by the plan code’s plan group. Look at the beginning of the transcript. It should look like:

{
  "uw_id" : 20967476,
  "bio" : {
    "userid" : "awhutchi",
    "last_name" : "Hutchison",
    "first_name" : "Andy"
  },
  "program" : {
    "program_code" : "UMA25",
    "requirement_term_id" : 1219,
    "program_title" : "Mathematics Honours"
  },
  "plans" : [ {
    "plan_group_id" : "uw.u.math.bac.statactsc.stats",
    "plan_code" : "BIOSTATH",
    "requirement_term_id" : 1219,
    "program_code" : "UMA25",
    "unit_code" : "STATACTSC",
    "plan_type_code" : "H",
    "plan_title" : "Biostatistics Honours"
  }, {...

The plan_group_id is uw.u.math.bac.statactsc.stats.

If you are in the oat-plandefs/test/ directory, ls transcripts/math/bac/statactsc/stats/ (note uw/u has been dropped) will show you:

oat3 test: ls transcripts/math/bac/statactsc/stats/
biostath-1189-syntest.json	stath-1229-syntest.json		stathc-1239-syntest.json
biostathc-1189-grad.json	stathc-1199-grad.json		statj-1229-syntest.json
biostathc-1189-hlthtst.json	stathc-1219-error.json		statjc-1229-syntest.json
stath-1199-exchange.json	stathc-1231-error.json
oat3 test: 

Those are the existing tests. Each file starts with the primary plan code followed by the requirement term. So our new test will start with biostath-1219. Following that is a brief descriptor of this student. syntest is short for “synthetic test” meaning the transcript was derived from another one, probably just by changing the requirement term. We might use 4b for this student.

Running da-extract-transcript 20967476 > transcripts/math/bac/statactsc/stats/biostath-1219-4b.json will put the transcript in the correct place. A couple of things to note:

  • > in the command says to “place the output of this command in the following file”.
  • This assumes your current directory is oat-plandefs/test.
  • You can re-run the ls command to ensure that the file got added.

Running the test will, of course, fail because we don’t have any expected output:

oat3 test: da-run-tests transcripts/math/bac/statactsc/stats/biostath-1219-4b.json 
1 tasks
Progress:..   1
FAILED: /Users/oat3/oat/oat-plandefs/test/expected/math/bac/statactsc/stats/biostath-1219-4b.txt does not exist; created empty file.
Passed: 0;  Failed: 1;  Error: 0
Elapsed Time:  1.1 seconds
oat3 test: 

Notice that the program says the file does not exist and it created an empty one for us. Running the command again (use the up arrow to access the previous command!) now provides the differences between what was actually produced and the empty file:

oat3 test: da-run-tests transcripts/math/bac/statactsc/stats/biostath-1219-4b.json
1 tasks
Progress:..   1
FAILED: /Users/oat3/oat/oat-plandefs/test/transcripts/math/bac/statactsc/stats/biostath-1219-4b.json
--- /Users/oat3/oat/oat-plandefs/test/actual/math/bac/statactsc/stats/biostath-1219-4b.txt	2025-06-22 09:05:13
+++ /Users/oat3/oat/oat-plandefs/test/expected/math/bac/statactsc/stats/biostath-1219-4b.txt	2025-06-22 09:01:58
@@ -1,131 +0,0 @@
-20967476	awhutchi  	BIOSTATH  PartiallySatisfied
--   audit 20967476 "Hutchison, Andy" {
--      plan BIOSTATH "Biostatistics Honours" req=1219 cal=1189 using all passedCourses {
-√         minAverage(MAV, BIOSTATH, 65)
-x         minPassedUnits(13.0, mathCourses)
-√         10 of  {
-√            1 from ^CS_1[134]5: CS_115
-√            1 from ^CS_1[134]6: CS_116
-√            1 from ^MATH_1[34]5: MATH_135
-√            1 from ^MATH_1[034]6: MATH_136
-√            1 from ^MATH_1[234]7: MATH_137
-√            1 from ^MATH_1[234]8: MATH_138
-√            1 from ^MATH_2[34]5: MATH_235
...
-            STAT_443       75  Pass         √    NUM          1251
-            VCULT_100      85  Pass         √    NUM          1229
-
(diff truncated to 20 lines)
Passed: 0;  Failed: 1;  Error: 0
Elapsed Time:  1.1 seconds
oat3 test: 

Use open output/biostath-1219-4b.html to see the degree audit produced for the student. The degree audit does, in fact, contain a version of the check that is said to be missing:

missing check missing check

But it’s been structured slightly differently than the Kuali specification.