Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36606

AJAX Grader report doesn't handle cells without an editable grade

XMLWordPrintable

    • MOODLE_24_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • MDL-36606-master
    • Hide

      Behat provides decent coverage for this item

      System Setup

      • Enable admin setting Enable AJAX (grade_report_enableajax)
      • Enable admin setting Show locks (grade_report_showlocks)
      • Enable Mean of grades aggregation method (grade_aggregations_visible)
      • If it does not exist, create a new scale, "Separate and Connected ways of knowing", with the values "Mostly Separate Knowing, Separate and Connected, Mostly Connected Knowing"

      Misc editing and updates

      Setup for following tests

      1. Create a new course and enroll 4 students (we will call them A, B, C, D)
      2. Edit the gradebook:
        1. Create a category "Scaled category", set to Mean of grades aggregation, Scale grade, Separate and Connected ways of knowing
        2. Create a grade item "Scale item", Scale grade, Separate and Connected ways of knowing, in the Scaled category
        3. Create a category "Graded category" with default settings
        4. Create a grade item "Graded", with default settings in Graded category
        5. Create a grade item "Feedback", with grade type set to "text" in Graded category

      Basic non-editing AJAX

      1. Go into the grader report
      2. Make sure editing is off
      3. For student A, click in the Scale item box
      4. Confirm a grade choice dropdown appears
      5. Give a grade of "Mostly separate knowing" and hit enter
      6. Confirm the dropdown disappears and the box turns orange
      7. Confirm "Scaled category total" updates to "Mostly separate knowing" for student A
      8. For student A, click in the scale item box click in the Graded item box
      9. Confirm a text box appears
      10. Give a grade of 60 and hit enter
      11. Confirm the text box disappears and the box turns orange
      12. Confirm Graded category total updates to 60.00
      13. Confirm you cannot click on the "Feedback" item
      14. Navigate back to the grader report (reload the page)
      15. Confirm all the updated and set values appear the same
      16. For student A, click in the Scale item box
      17. Confirm that when the dropdown appears, "Mostly separate knowing" is selected

      Feedback non-editing AJAX

      1. Under grader report preferences, enable quick feedback
      2. For student B, click in the Scale item box
      3. Confirm a dropdown and a feedback box (input box with dashed border) appear
      4. Give a grade of "Mostly connected knowing" and feedback for "Very good!", and hit enter
      5. Confirm the dropdown disappears and the box turns orange
      6. Confirm "Scaled category total" updates to "Mostly connected knowing" for student B
      7. Click in the Feedback item for student B
      8. Confirm a feedback box appears
      9. Enter the feedback "Do better student B" and hit enter
      10. Confirm the feedback box disappears and the box turns orange
      11. Reload the page
      12. For student B, click in the Scale item box
      13. Confirm the feedback "Very good!" appears in the feedback box
      14. For student B, click in the Feedback item box
      15. Confirm the feedback "Do better student B" appears in the feedback box

      Feedback editing AJAX

      1. Turn editing on
      2. For student C, enter a Scale item grade of "Separate and connected" and hit enter
      3. Confirm the box turns orange
      4. Confirm that Scaled category total updates to "Separate and connected"
      5. Enter feedback "Improving" for the Scale item and hit enter
      6. For Graded item, give a grade of 85 and hit enter
      7. Confirm the box turns orange and that Graded category total updates to 85.00
      8. In the feedback item, give the feedback "Doing ok" and hit enter
      9. Confirm the box turns orange
      10. Reload the page
      11. Confirm the grades and feedback for Student C appear as entered

      Basic editing AJAX

      1. Under grader report preferences, disable quick feedback
      2. Return to the grader report, make sure editing is still on
      3. For student D, enter a Scale item grade of "Mostly separate knowing" and hit enter
      4. Confirm the box turns orange and Scaled category total updates to "Mostly separate knowing"
      5. For Graded item, give a grade of 100 and hit enter
      6. Confirm the box turns orange and that Graded category total updates to 100.00
      7. Confirm there is no feedback box under the Feedback item
      8. Reload the page
      9. Confirm the grades and feedback for Student D appear as entered

      Confirm locks

      1. On the grader report with editing on
      2. Click the lock for Student B Scaled category total
      3. Click the lock for Student B Graded item
      4. Click the lock for Student B Feedback item
      5. Confirm that no boxes for grading appear in the locked items
      6. Turn editing off
      7. Confirm that the 3 locked items for student D are not clickable
      8. Under grader report preferences, enable quick feedback
      9. Return to the grader report with editing off
      10. Confirm that the 3 locked items for student D are not clickable

      Empty Course Test

      1. Turn off the admin setting "Allow category grades to be manually overridden" (grade_overridecat)
      2. Create a new course and enroll some students
      3. Go into the gradebook (grader report)
      4. Make sure you can't click to edit under Course total
      5. Turn editing on
      6. Make sure boxes don't appear for Course total
      7. Make sure the Save changes button at the bottom is greyed out
      Show
      Behat provides decent coverage for this item System Setup Enable admin setting Enable AJAX (grade_report_enableajax) Enable admin setting Show locks (grade_report_showlocks) Enable Mean of grades aggregation method (grade_aggregations_visible) If it does not exist, create a new scale, "Separate and Connected ways of knowing", with the values "Mostly Separate Knowing, Separate and Connected, Mostly Connected Knowing" Misc editing and updates Setup for following tests Create a new course and enroll 4 students (we will call them A, B, C, D) Edit the gradebook: Create a category "Scaled category", set to Mean of grades aggregation, Scale grade, Separate and Connected ways of knowing Create a grade item "Scale item", Scale grade, Separate and Connected ways of knowing, in the Scaled category Create a category "Graded category" with default settings Create a grade item "Graded", with default settings in Graded category Create a grade item "Feedback", with grade type set to "text" in Graded category Basic non-editing AJAX Go into the grader report Make sure editing is off For student A, click in the Scale item box Confirm a grade choice dropdown appears Give a grade of "Mostly separate knowing" and hit enter Confirm the dropdown disappears and the box turns orange Confirm "Scaled category total" updates to "Mostly separate knowing" for student A For student A, click in the scale item box click in the Graded item box Confirm a text box appears Give a grade of 60 and hit enter Confirm the text box disappears and the box turns orange Confirm Graded category total updates to 60.00 Confirm you cannot click on the "Feedback" item Navigate back to the grader report (reload the page) Confirm all the updated and set values appear the same For student A, click in the Scale item box Confirm that when the dropdown appears, "Mostly separate knowing" is selected Feedback non-editing AJAX Under grader report preferences, enable quick feedback For student B, click in the Scale item box Confirm a dropdown and a feedback box (input box with dashed border) appear Give a grade of "Mostly connected knowing" and feedback for "Very good!", and hit enter Confirm the dropdown disappears and the box turns orange Confirm "Scaled category total" updates to "Mostly connected knowing" for student B Click in the Feedback item for student B Confirm a feedback box appears Enter the feedback "Do better student B" and hit enter Confirm the feedback box disappears and the box turns orange Reload the page For student B, click in the Scale item box Confirm the feedback "Very good!" appears in the feedback box For student B, click in the Feedback item box Confirm the feedback "Do better student B" appears in the feedback box Feedback editing AJAX Turn editing on For student C, enter a Scale item grade of "Separate and connected" and hit enter Confirm the box turns orange Confirm that Scaled category total updates to "Separate and connected" Enter feedback "Improving" for the Scale item and hit enter For Graded item, give a grade of 85 and hit enter Confirm the box turns orange and that Graded category total updates to 85.00 In the feedback item, give the feedback "Doing ok" and hit enter Confirm the box turns orange Reload the page Confirm the grades and feedback for Student C appear as entered Basic editing AJAX Under grader report preferences, disable quick feedback Return to the grader report, make sure editing is still on For student D, enter a Scale item grade of "Mostly separate knowing" and hit enter Confirm the box turns orange and Scaled category total updates to "Mostly separate knowing" For Graded item, give a grade of 100 and hit enter Confirm the box turns orange and that Graded category total updates to 100.00 Confirm there is no feedback box under the Feedback item Reload the page Confirm the grades and feedback for Student D appear as entered Confirm locks On the grader report with editing on Click the lock for Student B Scaled category total Click the lock for Student B Graded item Click the lock for Student B Feedback item Confirm that no boxes for grading appear in the locked items Turn editing off Confirm that the 3 locked items for student D are not clickable Under grader report preferences, enable quick feedback Return to the grader report with editing off Confirm that the 3 locked items for student D are not clickable Empty Course Test Turn off the admin setting "Allow category grades to be manually overridden" (grade_overridecat) Create a new course and enroll some students Go into the gradebook (grader report) Make sure you can't click to edit under Course total Turn editing on Make sure boxes don't appear for Course total Make sure the Save changes button at the bottom is greyed out

      Reproduce Steps

      Clean install 2.4beta (tested against 2012110900.00) using the default theme.

      Setup a teacher a course and at least one student enrolled in that course.

      In the course, setup one assignment accepting all defaults.

      In the course, setup another assignment with the "Grade" item set to "No grade" (accept defaults on all other fields).

      Go to the grader report.

      In the drop-down above the report select "Grader report" under "My preferences"

      Enable AJAX. Save changes.

      Turn on editing.

      What is expected

      AJAX grading should work.

      What actually happens

      There will be a javascript error: "this.report.grades is undefined" (in FF).

      You will not be able to save any grades via AJAX and the update button will still be showing. (You can still however save grades by clicking update, only ajax updating does not work.)

      The reason is that the javascript is attempting to find a text entry for the no grade item and tries to call this.report.grades.on('blur', ...) when this.report.grades is null.

            emerrill Eric Merrill
            pennedav David Penner
            Ryan Wyllie Ryan Wyllie
            Dan Poltawski Dan Poltawski
            David Monllaó David Monllaó
            Votes:
            7 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.