cereal-lab / EvoPIE

Evolutionary Peer Instruction Environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

quiz-grader no longer updates weights

profgrumpy opened this issue · comments

Change weights, go back to quiz-browser, come back to quiz; the weights are back to original values. Confirmed by inspecting the DB.

The following methods in quiz-grader.html try to update the innerHTML of an element that no longer exists:

  • changeInitialScoreWeight
  • changeRevisedScoreWeight
  • changeJustificationGradeWeight
  • changeParticipationGradeWeight
    This should cause the extended tests' download-gradebook test to fail.

The elements noted in the issue description do in fact exist on the page. Right now the culprit appears to be the fact that lines 110 - 116 are commented out. These lines add the functions as event listeners. One question is about the async Javascript function named refresh (lines 226 - 237) which seems to all the various change functions. However, it doesn't appear to be hooked up to anything.

Added refresh as event listener for the "(Re)compute All Grades based on weight below" button.
Did not uncomment event listener lines 110-116 as it is believed that the more "global" approach above is needed to ensure scores add to 100%.
Inspection of database indicates that weights are updated
Solution pushed.

Do you mind mentioning the issue number with syntax "issue #xyz" in the commit message so that it links your relevant commits right here too?
(for next one that is, this one's fine)

Fields in the database are updated properly.