object reports

Forums:

Since adding the .# to the score format below, the % sign prints on all transcripts even if the student has not taken the exam. When the format was just ###%, it did not print unless there was a test score. What do I need to do to keep the decimal place and the % sign?

^(decode;^(tests;name=SDC Exam (College Algebra);score=Challenge_Exam_(College_Algebra);which=last;type=num;result=value;format=####);0; ;^(tests;name=SDC Exam (College Algebra);score=Challenge_Exam_(College_Algebra);which=last;type=num;result=value;format=###.#%))

The code you posted is essentially, if the test with format #### is 0, print blank, Else print test with format ###.#%
So I would say that the issue is with the ####, that the output is not 0. Maybe it's 0.0, or 0000, or even blank.
So try putting the initial code without the decode
^(tests;name=SDC Exam (College Algebra);score=Challenge_Exam_(College_Algebra);which=last;type=num;result=value;format=####)
on a transcript to see how it outputs for a student who doesn't have the score. Then when you see the output, change the 0 to match exactly the output.
Just a guess, but delete the 0 and try it, if that doesn't work, put a space in place of the 0.

Alternately, if the blank score from your code is only showing %, then you might be able to change the entire line to
^(decode;^(tests;name=SDC Exam (College Algebra);score=Challenge_Exam_(College_Algebra);which=last;type=num;result=value;format=###.#%);%; ;^(tests;name=SDC Exam (College Algebra);score=Challenge_Exam_(College_Algebra);which=last;type=num;result=value;format=###.#%))

Subscribe to Comments for "object reports"