drlippman / IMathAS

IMathAS Online Math Assessment
Other
112 stars 99 forks source link

New Hook Request to help with Migration to New Assessment Display #301

Closed MathTV closed 2 years ago

MathTV commented 2 years ago

A number of XYZ-codes questions contain text strings which will be obsolete under the new assessment system but still must be used until we fully migrate away form the old assessment system. We're thinking that a hook somewhere in the code that allows us to filter a question's control and qtext fields prior to their processing and display.

Details

While coding questions for display in the old assessment system, XYZ staff overrode the default display of "Show Answer" buttons for multi-part questions by entering "[SABx]" objects in the qtext, e.g.:

Amplitude: $answerbox[1] [SAB1]<br/> Period: $answerbox[2] [SAB2] <br/> Midline:y=$answerbox[3] [SAB3]<br/> Minimum:($answerbox[4],$answerbox[5])$previewloc[4]$previewloc[5] [SAB4][SAB5]<br/> Maximum:($answerbox[6],$answerbox[7])$previewloc[6]$previewloc[7] [SAB6][SAB7]

While this correctly positioned the Answer Box display, when a questions "Written Example" is viewed, the "[SABx]" objects appear as plain text (see attached screenshot.

A new hook would allow us to apply a run-time filter to the qtext, so we can remove the "[SABx]" objects when the Written Example is displayed.

Screen Shot 2021-12-06 at 11 55 08 AM

drlippman commented 2 years ago

The [SAB#] just shouldn't be showing in the "written example". That doesn't need a hook, that just needs to be fixed :)

If there are other examples that might still require a hook?

MathTV commented 2 years ago

Mike indicates: No. There are no other known cases where we need to filter qtext. -saiena