mdl_hotpot_attempts and calculation of grades

Re: mdl_hotpot_attempts and calculation of grades

by Gordon Bateson -
Number of replies: 0
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hello again,
as you may know the scores for individual attempts at HotPot activities are combined in one of 4 ways to get the grade for the HotPot activity:

  • average of the scores of the attempts
  • maximum of the scores of the attempts
  • the score of the most recent attempt
  • the score of the oldest attempt

Which method is used depends on the setting of "grademethod" field which is set on the page where you add or update a HotPot activity.

The calculation of the HotPot grade is initiated by by the "hotpot_get_grades()" function in "mod/hotpot/lib.php". The calculation is actually done by MySQL, extracted from the MySQL results by the hotpot_get_grades() function and passed back to Moodle's core functions which then store the grade in Moodle's grade tables. 

HTH
Gordon