Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-6997

Insertion of questionnaire grade does not update course total when using simple weighted means of grades



    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.2.3
    • Fix Version/s: None
    • Component/s: Module: Questionnaire
    • Labels:
    • Plugin Version:
      3.2.5 (Build - 2017051800)
    • Affected Branches:



      A questionnaire may be configured to assign a student a specific grade upon completion of the questionnaire.  When using simple weighted means of grades aggregation, submission of the questionnaire will insert this grade into the gradebook, but the new grade does not in turn update the student's course total grade. 

      Later actions may trigger the course total to update reflective of the questionnaire grade, but immediately following submission of the questionnaire the course total is unchanged.


      1. Go to Site administration > Grades > Grade category settings.
      2. Set Aggregation to Simple weighted means of grades and Save changes.
      3. Create a new course and enroll one user in the course as a student.
      4. Create a questionnaire in the course.  Within the Response options section of the questionnaire settings set Submission grade to 100.  Save and display.
      5. Add at least one question to the questionnaire.
      6. Login as the student and complete the questionnaire.
      7. Run the following query against the database inserting the mdl_course.id value of the course created in step 1.

      select from_unixtime(ggh.timemodified) tm, gi.itemtype, gi.itemname, ggh.* from mdl_grade_grades_history ggh
      inner join mdl_grade_items gi on gi.id = ggh.itemid
      where gi.courseid = <enter courseid>;



      Grade history indicates creation of a grade for the questionnaire grade item but no grade history against the course total.



      Grade history indicates creation of a grade for the questionnaire grade item and creation and update of the course total grade.



      Replicated in a 3.2.3 environment.



      1. The aggregation method of the gradebook is a relevant variable.  I have not tested with all aggregation methods but have replicated the issue while using simple weighted means of grades.  When testing with weighted means of grades, so long as a weight is assigned to the questionnaire grade item after creation of the questionnaire, both the questionnaire and course total grades are updated upon submission to the questionnaire.  Natural aggregation also worked.
      2. In the replicate steps above the questionnaire is the only grade item in the gradebook.  However, the issue still exists if there are other grade items.  For example, I created a course with a quiz and a questionnaire.  The student first completed the quiz which update the course total.  Then the student completed the questionnaire which inserted a grade for the questionnaire but did not immediately update the course total.
      3. Once an instructor or the student views the gradebook, the course total will be updated, but this action may not occur frequently in a self-paced course.


      The institution has a self-paced course in which a questionnaire is the only graded activity.  Course completion is configured on the criteria of completing the questionnaire activity.  Course completion and grade data is pull from the site via the API to be sent to an SIS system.  However, students who has completed the course are not being retrieved via the API because the students have no course total grade.




            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: