Moodle
  1. Moodle
  2. MDL-38732

Graded course activity while editing gradebook causes unintentional overrides

    Details

    • Testing Instructions:
      Hide
      1. Create a course and enrol 2 teachers (T1, T2) and 2 students (S1, S2)
      2. Create 2 new manual grade items (G1, G2) in a subcategory.
      3. With teacher T1 open the grader report and turn editing mode on
      4. In another browser, login as teacher T2, open the grader report and turn editing mode on
      5. As Teacher T1, give a grade for G2 for student S1
        • Save the changes
      6. As Teacher T2, give a grade for G1 and G2 for student S1, and S2
        • Save the changes
      7. Confirm that you are being told that you could not change the grade for student S1 item G2
      8. Confirm that any other changes are saved
      9. Back to teacher T1 screen (which should be older than the actual grades)
      10. Change G2 to something else and save
      11. Confirm that the course total and category total are accurate and have not been overridden.
        • They should match what the teacher T2 sees.
      Show
      Create a course and enrol 2 teachers (T1, T2) and 2 students (S1, S2) Create 2 new manual grade items (G1, G2) in a subcategory. With teacher T1 open the grader report and turn editing mode on In another browser, login as teacher T2, open the grader report and turn editing mode on As Teacher T1, give a grade for G2 for student S1 Save the changes As Teacher T2, give a grade for G1 and G2 for student S1, and S2 Save the changes Confirm that you are being told that you could not change the grade for student S1 item G2 Confirm that any other changes are saved Back to teacher T1 screen (which should be older than the actual grades) Change G2 to something else and save Confirm that the course total and category total are accurate and have not been overridden. They should match what the teacher T2 sees.
    • Workaround:
      Hide

      User has to manually turn off override for affected items.

      Show
      User has to manually turn off override for affected items.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull from Repository:
    • Pull 2.6 Branch:
    • Pull 2.7 Branch:
    • Pull Master Branch:
      MDL-38732-master-2nd
    • Story Points (Obsolete):
      40

      Description

      If an instructor goes into the gradebook and starts editing mode, and while the instructor is in that mode, someone does either a automatically graded activity, or someone edits the grades from something, when the instructor saves, but the individual grades and the course total grades will become overridden.

      Steps to reproduce:

      1. As teacher, go into course grade book and turn editing on.
      2. In another browser, go in as student and complete a quiz.
      3. Back in first browser, submit grade book edit. Quiz grade for attempt will be overridden with a dash grade.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Andrew Davis added a comment -

            Hi Barbara. Are you able to provide any additional information? Is there anything suspicious in the PHP error logs? It's difficult for me to investigate without some more clues.

            Show
            Andrew Davis added a comment - Hi Barbara. Are you able to provide any additional information? Is there anything suspicious in the PHP error logs? It's difficult for me to investigate without some more clues.
            Hide
            Barbara Taylor added a comment -

            Hi Andrew,

            This is the information I received from our server admin.

            There is nothing written to the error_log that would relate to this issue. In the database, the mdl_grade_grades table has the data set to a timestamp for items in the “overridden” column (as expected for overrides, otherwise they have a value of “0” when not locked/overridden). There is no unusual values there. Basically, it is performing as if this is a feature instead of a bug and we just need to find out if it is happening to others and, if so, what is the repeatable scenario to cause it. Our MySQL database was switched to InnoDB and it did not resolve the issue.

            Barbara

            Show
            Barbara Taylor added a comment - Hi Andrew, This is the information I received from our server admin. There is nothing written to the error_log that would relate to this issue. In the database, the mdl_grade_grades table has the data set to a timestamp for items in the “overridden” column (as expected for overrides, otherwise they have a value of “0” when not locked/overridden). There is no unusual values there. Basically, it is performing as if this is a feature instead of a bug and we just need to find out if it is happening to others and, if so, what is the repeatable scenario to cause it. Our MySQL database was switched to InnoDB and it did not resolve the issue. Barbara
            Hide
            Andrew Davis added a comment -

            This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

            For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

            Show
            Andrew Davis added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment
            Hide
            Barbara Taylor added a comment -

            I hope that someone can pick this up. We have this happening with many of our courses. We have figured out how we can unlock it from the database but only if the scores were not entered manually. Any manually entered scores are erased. We haven't been able to determine any patterns as to why the course total column is overridden. It doesn't always happen to every student. There are times when it happens for every student.

            Show
            Barbara Taylor added a comment - I hope that someone can pick this up. We have this happening with many of our courses. We have figured out how we can unlock it from the database but only if the scores were not entered manually. Any manually entered scores are erased. We haven't been able to determine any patterns as to why the course total column is overridden. It doesn't always happen to every student. There are times when it happens for every student.
            Hide
            Sam Anderson added a comment -

            Staff at my institution (UMass Amherst) tested this extensively, and were able to reproduce this problem consistently.

            The issue seems to be around having multiple editing windows open, then updating each window in succession.

            We took the following steps:

            1. Logging in to a course gradebook as a TA in one browser, and as teacher in another browser.
            2. As the TA, we edited a grade in one gradebook and updated it while the instructor's window was still open and had editing turned on.
            3. Then clicked "update" on the instructor's gradebook without changing anything.

            This resulted in the cell that the TA had changed being empty (meaning that the TA's grade did not stick) and overridden, the category total column being overridden for that student, as well as the Course Total grade being overridden for that student.

            We also tried:

            1. Logging in to a course gradebook as a TA. In the same browser, the TA opened an assignment submission grading page (i.e., not even in the gradebook proper).
            2. As the TA, we edited a grade in the assignment submission page and saved the page.
            3. We clicked "update" on the TA's gradebook without changing anything.

            This resulted in the cell that the TA had changed in the assignment grading page being empty (meaning that the grade did not stick) and overridden, the category total column being overridden for that student, as well as the Course Total grade being overridden for that student.

            We tried this with categories that have different aggregation methods (it is not an error that only occurs with a certain type of aggregation) and in different courses, with consistent results. Also tried columns with scale drop-downs instead of numeric entry boxes. Same thing occurred.

            Show
            Sam Anderson added a comment - Staff at my institution (UMass Amherst) tested this extensively, and were able to reproduce this problem consistently. The issue seems to be around having multiple editing windows open, then updating each window in succession. We took the following steps: 1. Logging in to a course gradebook as a TA in one browser, and as teacher in another browser. 2. As the TA, we edited a grade in one gradebook and updated it while the instructor's window was still open and had editing turned on. 3. Then clicked "update" on the instructor's gradebook without changing anything. This resulted in the cell that the TA had changed being empty (meaning that the TA's grade did not stick) and overridden, the category total column being overridden for that student, as well as the Course Total grade being overridden for that student. We also tried: 1. Logging in to a course gradebook as a TA. In the same browser, the TA opened an assignment submission grading page (i.e., not even in the gradebook proper). 2. As the TA, we edited a grade in the assignment submission page and saved the page. 3. We clicked "update" on the TA's gradebook without changing anything. This resulted in the cell that the TA had changed in the assignment grading page being empty (meaning that the grade did not stick) and overridden, the category total column being overridden for that student, as well as the Course Total grade being overridden for that student. We tried this with categories that have different aggregation methods (it is not an error that only occurs with a certain type of aggregation) and in different courses, with consistent results. Also tried columns with scale drop-downs instead of numeric entry boxes. Same thing occurred.
            Hide
            Debbie Unterseher added a comment -

            THANK YOU!!! We had this problem last semester, called a couple other institutions that use Moodle, and they said "it must be the teachers who are doing it!". But if you follow the steps above, the course totals get overridden (along with other totals!)... Why hasn't this been fixed?? Is it just a specific version of SQL or something? I would like to see other places try doing this and see if it gives the same error...

            Show
            Debbie Unterseher added a comment - THANK YOU!!! We had this problem last semester, called a couple other institutions that use Moodle, and they said "it must be the teachers who are doing it!". But if you follow the steps above, the course totals get overridden (along with other totals!)... Why hasn't this been fixed?? Is it just a specific version of SQL or something? I would like to see other places try doing this and see if it gives the same error...
            Hide
            Sam Anderson added a comment -

            Since I posted that last set of information, we've had a realization:

            With gradebooks set up with aggregation methods that calculate category or course totals automatically, the first person to save their changes to a particular grade cell would also, necessarily, be saving the automatically calculated changes made to any categories that grade cell is included in, including the overall course total.

            If another browser window with some out-of-date grade information is saved after this (as might be the case with multiple instructors and TAs or any other instance with multiple browser windows that have been left open), it means that the old values in the category/course totals would now not match the newly calculated values, and the old values would save over the new ones, which would, "appropriately," flag the category totals as overridden.

            So, everything here makes a strange kind of sense. The big issue is that the Moodle gradebook makes no allowances for having multiple graders working in it in the same time, which is a big problem for large classes at our university, where we can see classes with 10+ TAs. That's a different project that could be solved in any number of ways.

            Show
            Sam Anderson added a comment - Since I posted that last set of information, we've had a realization: With gradebooks set up with aggregation methods that calculate category or course totals automatically, the first person to save their changes to a particular grade cell would also, necessarily, be saving the automatically calculated changes made to any categories that grade cell is included in, including the overall course total. If another browser window with some out-of-date grade information is saved after this (as might be the case with multiple instructors and TAs or any other instance with multiple browser windows that have been left open), it means that the old values in the category/course totals would now not match the newly calculated values, and the old values would save over the new ones, which would, "appropriately," flag the category totals as overridden. So, everything here makes a strange kind of sense. The big issue is that the Moodle gradebook makes no allowances for having multiple graders working in it in the same time, which is a big problem for large classes at our university, where we can see classes with 10+ TAs. That's a different project that could be solved in any number of ways.
            Hide
            Debbie Unterseher added a comment -

            Is this only an issue for those that have the Ajax turned off for the grader report? We turned it off because it was causing other issues in the past. Maybe we need to turn it on again?

            Show
            Debbie Unterseher added a comment - Is this only an issue for those that have the Ajax turned off for the grader report? We turned it off because it was causing other issues in the past. Maybe we need to turn it on again?
            Hide
            Sam Anderson added a comment -

            We were finding that users with AJAX turned on were having, if anything, more problems with overrides than before we turned off AJAX functionality system-wide because they were unintentionally editing (and overriding) cells just by mousing around.

            We ended up working with programmers to apply a code change to prevent changes to grades from being saved if they include out-of-date data. We'll work with the programmers to see if those code changes can be posted here.

            Show
            Sam Anderson added a comment - We were finding that users with AJAX turned on were having, if anything, more problems with overrides than before we turned off AJAX functionality system-wide because they were unintentionally editing (and overriding) cells just by mousing around. We ended up working with programmers to apply a code change to prevent changes to grades from being saved if they include out-of-date data. We'll work with the programmers to see if those code changes can be posted here.
            Hide
            Longfei Yu added a comment -

            This is one of the admins from UMass Amherst. Here are our local fixed. If you have any questions, feel free to put comments here.

            1) grade/report/grader/lib.php [With some other local fixes, the line numbers maybe not exact.]
            public function process_data($data) {
            ........
            199 foreach ($students as $userid => $items) {
            200 $userid = clean_param($userid, PARAM_INT);
            201 foreach ($items as $itemid => $postedvalue) {
            202 $itemid = clean_param($itemid, PARAM_INT);
            203 // Was change requested?
            204 $oldvalue = $this->grades[$userid][$itemid];
            205 if ($datatype === 'grade') {
            206 //Local fix starts--------------------------------------------------------------
            207 if($data->currenttime < $oldvalue->timemodified) //compare the current user's page loading time again the last modified time in DB
            208

            { 209 $warnings[] = get_string('errorsavegradestaled', 'grades'); 210 return $warnings; 211 }

            212 //Local fix ends-------------------------------------------------------------------------------
            213 // If there was no grade and there still isn't
            214 if (is_null($oldvalue->finalgrade) && $postedvalue == -1)

            { 215 // -1 means no grade 216 continue; 217 }

            ......
            2) lang/en/grades.php (just add a new string) [With some other local fixes, the line numbers maybe not exact.]
            //Local fix starts--------------------------------------------------------------
            $string['errorsavegradestaled'] = 'ALERT: Your changes have not been saved because the gradebook was updated in another browser window by you or another user while this page was open. Your browser may allow you to view or print your changes if you hit the back button now.';
            ///Local fix ends--------------------------------------------------------------
            3) grade/report/grader/index.php [With some other local fixes, the line numbers maybe not exact.]
            165 echo '<div>';
            166 //Local fix starts-------------------------------------------------------
            167 $time = time(); //mark the page loading time
            168 echo '<input type="hidden" value="'.$time.'" name="currenttime" />';
            169 //Local fix ends--------------------------------------------------------------
            170 echo '<input type="hidden" value="'.s($courseid).'" name="id" />';
            171 echo '<input type="hidden" value="'.sesskey().'" name="sesskey" />';

            Show
            Longfei Yu added a comment - This is one of the admins from UMass Amherst. Here are our local fixed. If you have any questions, feel free to put comments here. 1) grade/report/grader/lib.php [With some other local fixes, the line numbers maybe not exact.] public function process_data($data) { ........ 199 foreach ($students as $userid => $items) { 200 $userid = clean_param($userid, PARAM_INT); 201 foreach ($items as $itemid => $postedvalue) { 202 $itemid = clean_param($itemid, PARAM_INT); 203 // Was change requested? 204 $oldvalue = $this->grades [$userid] [$itemid] ; 205 if ($datatype === 'grade') { 206 //Local fix starts-------------------------------------------------------------- 207 if($data->currenttime < $oldvalue->timemodified) //compare the current user's page loading time again the last modified time in DB 208 { 209 $warnings[] = get_string('errorsavegradestaled', 'grades'); 210 return $warnings; 211 } 212 //Local fix ends------------------------------------------------------------------------------- 213 // If there was no grade and there still isn't 214 if (is_null($oldvalue->finalgrade) && $postedvalue == -1) { 215 // -1 means no grade 216 continue; 217 } ...... 2) lang/en/grades.php (just add a new string) [With some other local fixes, the line numbers maybe not exact.] //Local fix starts-------------------------------------------------------------- $string ['errorsavegradestaled'] = 'ALERT: Your changes have not been saved because the gradebook was updated in another browser window by you or another user while this page was open. Your browser may allow you to view or print your changes if you hit the back button now.'; ///Local fix ends-------------------------------------------------------------- 3) grade/report/grader/index.php [With some other local fixes, the line numbers maybe not exact.] 165 echo '<div>'; 166 //Local fix starts------------------------------------------------------- 167 $time = time(); //mark the page loading time 168 echo '<input type="hidden" value="'.$time.'" name="currenttime" />'; 169 //Local fix ends-------------------------------------------------------------- 170 echo '<input type="hidden" value="'.s($courseid).'" name="id" />'; 171 echo '<input type="hidden" value="'.sesskey().'" name="sesskey" />';
            Hide
            Barbara Taylor added a comment -

            Will any of this code make its way into Moodle core? Today we have instructors who many changed a score that was for a quiz and the course total locked up.

            Show
            Barbara Taylor added a comment - Will any of this code make its way into Moodle core? Today we have instructors who many changed a score that was for a quiz and the course total locked up.
            Hide
            Justin Litalien added a comment -

            Same here Barbara! I've fielded a few calls on this issue within the last couple of weeks. Some of our classes have large enrollments, so this is a pain to do individually. And, I've found no way to recreate the issue. Every time I think I know what is causing it, I'm back to square one.

            In my opinion this needs to be addressed immediately.

            Show
            Justin Litalien added a comment - Same here Barbara! I've fielded a few calls on this issue within the last couple of weeks. Some of our classes have large enrollments, so this is a pain to do individually. And, I've found no way to recreate the issue. Every time I think I know what is causing it, I'm back to square one. In my opinion this needs to be addressed immediately.
            Hide
            Debbie Unterseher added a comment -

            Me too! This is a huge problem for us as well.

            Show
            Debbie Unterseher added a comment - Me too! This is a huge problem for us as well.
            Hide
            Justin Litalien added a comment -

            Barbara, this is affecting us here on 2.3.9 as well...

            Show
            Justin Litalien added a comment - Barbara, this is affecting us here on 2.3.9 as well...
            Hide
            Debbie Unterseher added a comment -

            We are on 2.4.5 and it is affect us also. One note though - I had a teacher who does all of the grading, and she had the problem as well...

            Show
            Debbie Unterseher added a comment - We are on 2.4.5 and it is affect us also. One note though - I had a teacher who does all of the grading, and she had the problem as well...
            Hide
            mikehas added a comment -

            If the problem occurs when gradebook values loaded in the browser are not the same as what's in the Moodle DB, I wonder if this problem could also arise when a new grade is submitted from an activity like a quiz during a grading session.

            For example: (untested)
            1. Instructor opens gradebook.
            2. Instructor makes a change to an activity grade.
            3. Student(s) submits a graded quiz.
            4. Instructor submits the changes on the gradebook.

            Theory: The category containing the overridden quiz would now be overridden.

            I may be missing something here, but it sounds like there may be a number of ways this could occur, I don't have time to test the scenario above, but I am interested if this could cause the same problem.

            We are very interested in a solution.

            Show
            mikehas added a comment - If the problem occurs when gradebook values loaded in the browser are not the same as what's in the Moodle DB, I wonder if this problem could also arise when a new grade is submitted from an activity like a quiz during a grading session. For example: (untested) 1. Instructor opens gradebook. 2. Instructor makes a change to an activity grade. 3. Student(s) submits a graded quiz. 4. Instructor submits the changes on the gradebook. Theory: The category containing the overridden quiz would now be overridden. I may be missing something here, but it sounds like there may be a number of ways this could occur, I don't have time to test the scenario above, but I am interested if this could cause the same problem. We are very interested in a solution.
            Hide
            Debbie Unterseher added a comment -

            What does "STABLE backlog, BACKEND" mean? I am ready to do an end of the semester update, but if this is somewhere in the process of being fixed, maybe I should wait!

            Show
            Debbie Unterseher added a comment - What does "STABLE backlog, BACKEND" mean? I am ready to do an end of the semester update, but if this is somewhere in the process of being fixed, maybe I should wait!
            Hide
            Debbie Unterseher added a comment -

            The problem does occur like mikehas mentioned above - if you are grading in the gradebook, and a student takes a quiz, and then you submit the your changes to the gradebook, it gives overrides. I also tested the fix that Longfei Yu gave, and this stops the overrides, but it is such a small "Alert" at the top, that the teacher might not even notice there was a problem entering grades. There also is another tracker issue on this https://tracker.moodle.org/browse/MDL-42106. Funny that it hasn't been solved. Maybe everyone just blames the teachers... or no one catches it.

            Show
            Debbie Unterseher added a comment - The problem does occur like mikehas mentioned above - if you are grading in the gradebook, and a student takes a quiz, and then you submit the your changes to the gradebook, it gives overrides. I also tested the fix that Longfei Yu gave, and this stops the overrides, but it is such a small "Alert" at the top, that the teacher might not even notice there was a problem entering grades. There also is another tracker issue on this https://tracker.moodle.org/browse/MDL-42106 . Funny that it hasn't been solved. Maybe everyone just blames the teachers... or no one catches it.
            Hide
            Gloria Doherty added a comment -

            We can confirm that if a student submits in quiz while the grader is working in grade book the override occurs. We can replicate this in Moodle 2.4.7

            Example:
            The student, makes a submission in a quiz, which reports correctly in the grade book. At the same time the grader is performing transactions in the grade book, which are not related to the quiz. There is an apparent conflict between the grader's transactions and the student's quiz submission. The student's quiz score no longer displays in the grade book, the quiz category total is overridden, and the Course Total is overridden.

            Show
            Gloria Doherty added a comment - We can confirm that if a student submits in quiz while the grader is working in grade book the override occurs. We can replicate this in Moodle 2.4.7 Example: The student, makes a submission in a quiz, which reports correctly in the grade book. At the same time the grader is performing transactions in the grade book, which are not related to the quiz. There is an apparent conflict between the grader's transactions and the student's quiz submission. The student's quiz score no longer displays in the grade book, the quiz category total is overridden, and the Course Total is overridden.
            Hide
            Jason Bennett added a comment -

            We are having the same problem on Moodle 2.4.5, but only sporadically. One instructor has reported this a couple times this semester. She has assignments and grade items in her gradebook and only enters grades in the gradebook, never from the assignments interface. She finds category and course totals having been overriden. She also confirms that she never works with Moodle open in two windows so that scenario doesn't seem to be in play here.

            I have been able to replicate the multiple windows scenario like this:
            I have the same gradebook open in two windows. I change a grade in one window and save my changes. Then I go to the other window, which now has out of date information, and hit save with (or without) changing anything and the category and course total gets overriden.

            That's kind of understandable, as was noted above, but I myself may have done this inadvertently yesterday while helping an instructor understand how the gradebook works. I noticed overrides on a category in which I just graded an assignment and the course total. I did have multiple windows open so I could imagine I switched to the wrong (duplicate) tab and made a change that locked things up.

            Show
            Jason Bennett added a comment - We are having the same problem on Moodle 2.4.5, but only sporadically. One instructor has reported this a couple times this semester. She has assignments and grade items in her gradebook and only enters grades in the gradebook, never from the assignments interface. She finds category and course totals having been overriden. She also confirms that she never works with Moodle open in two windows so that scenario doesn't seem to be in play here. I have been able to replicate the multiple windows scenario like this: I have the same gradebook open in two windows. I change a grade in one window and save my changes. Then I go to the other window, which now has out of date information, and hit save with (or without) changing anything and the category and course total gets overriden. That's kind of understandable, as was noted above, but I myself may have done this inadvertently yesterday while helping an instructor understand how the gradebook works. I noticed overrides on a category in which I just graded an assignment and the course total. I did have multiple windows open so I could imagine I switched to the wrong (duplicate) tab and made a change that locked things up.
            Hide
            Gloria Doherty added a comment -

            We can consistently replicate the problem. In 2.5.4. we created a new course site with no categories. While a Teacher was editing in the grader report a Student submitted a quiz. The override occurred in the Course Total.

            Show
            Gloria Doherty added a comment - We can consistently replicate the problem. In 2.5.4. we created a new course site with no categories. While a Teacher was editing in the grader report a Student submitted a quiz. The override occurred in the Course Total.
            Hide
            Eric Merrill added a comment -

            I've reworded this ticket to make it clear what we now know. I'm going to try an work on this some in the next week or so and see if we can get somewhere with solving this.

            Show
            Eric Merrill added a comment - I've reworded this ticket to make it clear what we now know. I'm going to try an work on this some in the next week or so and see if we can get somewhere with solving this.
            Hide
            Tonia Malone added a comment -

            Each quarter we have many faculty who report having grade columns overriden and having no idea how it happened. Courses with 100 +/- students can be overwhelming to clear each override one-by-one.

            If it is not possible to fix this error quickly, could it be possible to create a tool that would allow either an Admin or Editing Instructor to clear a whole column's overrides at once? Allowing all overrides in a column to be cleared would appease the concerned faculty until the bug can be fixed.

            Tonia (Cal Poly, SLO, Moodle 2.5)

            Show
            Tonia Malone added a comment - Each quarter we have many faculty who report having grade columns overriden and having no idea how it happened. Courses with 100 +/- students can be overwhelming to clear each override one-by-one. If it is not possible to fix this error quickly, could it be possible to create a tool that would allow either an Admin or Editing Instructor to clear a whole column's overrides at once? Allowing all overrides in a column to be cleared would appease the concerned faculty until the bug can be fixed. Tonia (Cal Poly, SLO, Moodle 2.5)
            Hide
            Vicke Denniston added a comment -

            Tonia, if it is a category total, you can delete the category, re-add it and then move the items back into the category. If it's the course total, it's a one at a time fix.

            Show
            Vicke Denniston added a comment - Tonia, if it is a category total, you can delete the category, re-add it and then move the items back into the category. If it's the course total, it's a one at a time fix.
            Hide
            Barbara Taylor added a comment -

            The problem is the course total. If you have 10 students then it isn't bad to check the override option. If you have 11-100s of students then it is a pain. Many of our faculty have stopped using the grade book because it is such a pain and now students don't know their grades without keeping track of the scores themselves. Can we please get an overridden button added so we can clear the override of the course total?

            Barbara

            Show
            Barbara Taylor added a comment - The problem is the course total. If you have 10 students then it isn't bad to check the override option. If you have 11-100s of students then it is a pain. Many of our faculty have stopped using the grade book because it is such a pain and now students don't know their grades without keeping track of the scores themselves. Can we please get an overridden button added so we can clear the override of the course total? Barbara
            Hide
            Gareth J Barnard added a comment -

            This reads like a classical concurrent update problem in software engineering. If the code was written as such that only the changes the teacher had made to the gradebook were written to the database, i.e. the difference between loading the grade book and submitting, solve the problem?

            Show
            Gareth J Barnard added a comment - This reads like a classical concurrent update problem in software engineering. If the code was written as such that only the changes the teacher had made to the gradebook were written to the database, i.e. the difference between loading the grade book and submitting, solve the problem?
            Hide
            Gareth J Barnard added a comment - - edited

            I've had a look and tested the code in 'grade\report\grader\lib.php::process_data($data)' and given the sequence:

            1. Teacher edits grade book.
            2. Student completes quiz and submits grade.
            3. Teacher updates grade book.

            Then 'lib.php::process_data($data)':

            1. Loads grade data from database.
            2. $postedvalue is empty / empty string.
            3. As the $postedvalue does not match the $oldvalue->finalgrade then it is assumed that the Teacher has made a change. This being to clear the grade - which could happen. This is because of:

                                    // If there was no grade and there still isn't
                                    if (is_null($oldvalue->finalgrade) && $postedvalue == -1) {
                                        // -1 means no grade
                                        continue;
                                    }
             
                                    // If the grade item uses a custom scale
                                    if (!empty($oldvalue->grade_item->scaleid)) {
             
                                        if ((int)$oldvalue->finalgrade === (int)$postedvalue) {
                                            continue;
                                        }
                                    } else {
                                        // The grade item uses a numeric scale
             
                                        // Format the finalgrade from the DB so that it matches the grade from the client
                                        if ($postedvalue === format_float($oldvalue->finalgrade, $oldvalue->grade_item->get_decimals())) {
                                            continue;
                                        }
                                    }
                                    $changedgrades = true;
            

            etc.

            Because in reality $oldvalue is not really the 'old value' when editing was initiated but 'current value' at time of the update.

            Usually, databases / threads get around this through employment of row locking / synchronised blocks of code with deadlock prevention. But this is not happening here.

            I'll think about the solution above or an alternative.

            Show
            Gareth J Barnard added a comment - - edited I've had a look and tested the code in 'grade\report\grader\lib.php::process_data($data)' and given the sequence: Teacher edits grade book. Student completes quiz and submits grade. Teacher updates grade book. Then 'lib.php::process_data($data)': Loads grade data from database. $postedvalue is empty / empty string. As the $postedvalue does not match the $oldvalue->finalgrade then it is assumed that the Teacher has made a change. This being to clear the grade - which could happen. This is because of: // If there was no grade and there still isn't if (is_null($oldvalue->finalgrade) && $postedvalue == -1) { // -1 means no grade continue; }   // If the grade item uses a custom scale if (!empty($oldvalue->grade_item->scaleid)) {   if ((int)$oldvalue->finalgrade === (int)$postedvalue) { continue; } } else { // The grade item uses a numeric scale   // Format the finalgrade from the DB so that it matches the grade from the client if ($postedvalue === format_float($oldvalue->finalgrade, $oldvalue->grade_item->get_decimals())) { continue; } } $changedgrades = true; etc. Because in reality $oldvalue is not really the 'old value' when editing was initiated but 'current value' at time of the update. Usually, databases / threads get around this through employment of row locking / synchronised blocks of code with deadlock prevention. But this is not happening here. I'll think about the solution above or an alternative.
            Hide
            Gareth J Barnard added a comment - - edited

            I've decided to take this on as quite frankly its intriguing.

            Longfei Yu's suggestion looks good. Just need to check if there is any time adjustment for the modified datetime and the result of 'time()'.

            Show
            Gareth J Barnard added a comment - - edited I've decided to take this on as quite frankly its intriguing. Longfei Yu 's suggestion looks good. Just need to check if there is any time adjustment for the modified datetime and the result of 'time()'.
            Hide
            Gareth J Barnard added a comment -

            Bumped into an issue with '$changedgrades' still being 'true' appears to be the 'total' item being processed despite a 'continue;' when the offending grade item change is detected.

            Show
            Gareth J Barnard added a comment - Bumped into an issue with '$changedgrades' still being 'true' appears to be the 'total' item being processed despite a 'continue;' when the offending grade item change is detected.
            Hide
            Eric Merrill added a comment -

            It is because the modified time doesn't change when the course total is updated automatically.

            Show
            Eric Merrill added a comment - It is because the modified time doesn't change when the course total is updated automatically.
            Hide
            Gareth J Barnard added a comment - - edited

            Oh not that Eric Merrill, it's because the code was processing the course total item as if it had been set by the teacher. This would be fine if there had been other changes but as there were no 'actual' changes by the teacher then the calculated value was wrong and the intent lost.

            Yes, the modified time was missing, but that still does not deal with the situation when the teacher sets the course total. So I had to assume that they did not and ignore any value for a student who has a grade item that had changed.

            Thinking about it, under normal situations the code currently assumes that there has been a change and overrides the course total.

            Show
            Gareth J Barnard added a comment - - edited Oh not that Eric Merrill , it's because the code was processing the course total item as if it had been set by the teacher. This would be fine if there had been other changes but as there were no 'actual' changes by the teacher then the calculated value was wrong and the intent lost. Yes, the modified time was missing, but that still does not deal with the situation when the teacher sets the course total. So I had to assume that they did not and ignore any value for a student who has a grade item that had changed. Thinking about it, under normal situations the code currently assumes that there has been a change and overrides the course total.
            Hide
            Gareth J Barnard added a comment - - edited

            Submitting for 'peer review' on 'master' branch only at the moment to save duplicated code. If peer review goes well then I will back-port as I believe it's the same code for all branches.

            Show
            Gareth J Barnard added a comment - - edited Submitting for 'peer review' on 'master' branch only at the moment to save duplicated code. If peer review goes well then I will back-port as I believe it's the same code for all branches.
            Hide
            CiBoT added a comment -

            Results for MDL-38732

            • Remote repository: git://github.com/gjb2048/moodle.git
            Show
            CiBoT added a comment - Results for MDL-38732 Remote repository: git://github.com/gjb2048/moodle.git Remote branch wip- MDL-38732 _master to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/3282 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/3282/artifact/work/smurf.html
            Hide
            Gareth J Barnard added a comment -

            Rebased because the Smurf was winging about a missing full stop in a comment I corrected the spelling on.

            Show
            Gareth J Barnard added a comment - Rebased because the Smurf was winging about a missing full stop in a comment I corrected the spelling on.
            Hide
            Eric Merrill added a comment -

            Very quick look over the code, but I have 2 questions:
            Are we guaranteed that item's come in form-order (eg, do we know that course cat will come last)?

            Second, should the course total exeption logic be extended to cover all categories - it seems that that is just a special case of the category logic, so the same exception logic could happen in a category. I would test that theory, but I don't have time at just this moment.

            Show
            Eric Merrill added a comment - Very quick look over the code, but I have 2 questions: Are we guaranteed that item's come in form-order (eg, do we know that course cat will come last)? Second, should the course total exeption logic be extended to cover all categories - it seems that that is just a special case of the category logic, so the same exception logic could happen in a category. I would test that theory, but I don't have time at just this moment.
            Hide
            Vicke Denniston added a comment -

            It seems to happen in categories at least as often as it does in course totals. It's just a little easier to fix. You can delete the category, recreate it and move the items back into it.

            Show
            Vicke Denniston added a comment - It seems to happen in categories at least as often as it does in course totals. It's just a little easier to fix. You can delete the category, recreate it and move the items back into it.
            Hide
            Andrew Davis added a comment -

            Make sure to run the unit tests. Those /grade/tests/report_graderlib_test.php in particular.

            Also, is it possible to cover this new behaviour with a unit test? Very likely in that same file. As it involves multiple users interacting at the same time, a developer could easily break this functionality and not notice so we'll want some sort of unit test or behat test to catch that.

            Having the grader report in ajax mode seems to completely side step these changes. We'll want to cover that too. An error message telling the user to reload the page would probably be adequate.

            Currently the user gets the error message displayed even if they didn't touch the modified grade. Its going to be annoying if the teacher is constantly getting errors while entering grades for an unrelated activity because students are doing a quiz or another tutor is doing their grading at the same time. Ideally we would only show the error is the user modifies the same grade item or the course/category total.

            We may even want two separate error messages.

            Possibly change

            User 'Student Sam' grade for 'new test assignment' has not been changed because it has been set by another user whilst you were editing the grader report. Any override to the course total will be lost.

            to

            User 'Student Sam' grade for 'new test assignment' has not been saved because it changed while you were editing.

            Or something similar. You can get this error simply by having two tabs open. There might not be a second user involved.

            Also "Any override to the course total will be lost." is a little frightening. It would be nice if we only mentioned this if they actually attempted to override the course/category total.

            Show
            Andrew Davis added a comment - Make sure to run the unit tests. Those /grade/tests/report_graderlib_test.php in particular. Also, is it possible to cover this new behaviour with a unit test? Very likely in that same file. As it involves multiple users interacting at the same time, a developer could easily break this functionality and not notice so we'll want some sort of unit test or behat test to catch that. Having the grader report in ajax mode seems to completely side step these changes. We'll want to cover that too. An error message telling the user to reload the page would probably be adequate. Currently the user gets the error message displayed even if they didn't touch the modified grade. Its going to be annoying if the teacher is constantly getting errors while entering grades for an unrelated activity because students are doing a quiz or another tutor is doing their grading at the same time. Ideally we would only show the error is the user modifies the same grade item or the course/category total. We may even want two separate error messages. Possibly change User 'Student Sam' grade for 'new test assignment' has not been changed because it has been set by another user whilst you were editing the grader report. Any override to the course total will be lost. to User 'Student Sam' grade for 'new test assignment' has not been saved because it changed while you were editing. Or something similar. You can get this error simply by having two tabs open. There might not be a second user involved. Also "Any override to the course total will be lost." is a little frightening. It would be nice if we only mentioned this if they actually attempted to override the course/category total.
            Hide
            Gareth J Barnard added a comment -

            Hi Andrew,

            Thank you for peer reviewing the issue.

            Thinking about it, I suspect that there could be issues over RTL and the way the fix currently works.

            I'll look at the tests and AJAX as thought AJAX was already turned on. Odd.

            What appears to be tricky is determining with the current supplied data set that the teacher has changed the grade when the underlying data to check against changes, I.e. the student changed the value. Will do some thinking, because you can tell that the student has changed it but not that there is a difference in before / after for the teacher because the very test it relies on has had one of the parameters changed by the student.

            Perhaps this is going about it the wrong way and the teacher should only be able to modify the grade after the student has been denied the ability, say after the close date time of the quiz etc. and apply last updated principle to multiple teachers.

            Cheers,

            Gareth

            Show
            Gareth J Barnard added a comment - Hi Andrew, Thank you for peer reviewing the issue. Thinking about it, I suspect that there could be issues over RTL and the way the fix currently works. I'll look at the tests and AJAX as thought AJAX was already turned on. Odd. What appears to be tricky is determining with the current supplied data set that the teacher has changed the grade when the underlying data to check against changes, I.e. the student changed the value. Will do some thinking, because you can tell that the student has changed it but not that there is a difference in before / after for the teacher because the very test it relies on has had one of the parameters changed by the student. Perhaps this is going about it the wrong way and the teacher should only be able to modify the grade after the student has been denied the ability, say after the close date time of the quiz etc. and apply last updated principle to multiple teachers. Cheers, Gareth
            Hide
            Eric Merrill added a comment -

            Limiting the time the teachers can edit grades in the GB is really assuming only a subset of use cases, and seems like it could just lead to usability headaches - and still doesn't address the general problem of parallel editing.

            The major flaw is that we need to be able to identify when a person actually tried to modify a grade in the GB.

            Two or three possible solutions came to mind (not to say any of them are perfect):
            1. Add a hidden field to each field with the current value, so we compare them and see if a change was made.
            2. Have a single hidden field, and have JS append the id of each field that is modified to it.
            3. When the form is generated, cache a representation of the grade data in the session MUC for reference when saving.

            Show
            Eric Merrill added a comment - Limiting the time the teachers can edit grades in the GB is really assuming only a subset of use cases, and seems like it could just lead to usability headaches - and still doesn't address the general problem of parallel editing. The major flaw is that we need to be able to identify when a person actually tried to modify a grade in the GB. Two or three possible solutions came to mind (not to say any of them are perfect): 1. Add a hidden field to each field with the current value, so we compare them and see if a change was made. 2. Have a single hidden field, and have JS append the id of each field that is modified to it. 3. When the form is generated, cache a representation of the grade data in the session MUC for reference when saving.
            Hide
            Gareth J Barnard added a comment -

            Notes etc.

            I need to look at and install Behat / Selenium - http://docs.moodle.org/dev/Acceptance_testing - for the tests. I'm not sure if 'composer' works on Windows. I already have Java (JDK) installed so have no issues with that language. This will take time!

            With regards Eric's suggestions (thank you Eric) - I had '1' in mind already as investigated this afternoon and found that for AJAX to work to and with the underlying data changing at the server end, the client's before view was being lost. No '2' is a non-starter because Moodle must work with JS off. No '3' might be more problematic in memory / storage on a per user basis when in fact with '1' all we are talking about is more HTML. However, I did think that this could be reduced by having one hidden input field per user containing an array of marks where the index matched the itemid.

            iMoot is rapidly approaching and this is more of a mess than I anticipated. But being such a mess needs careful, logical thinking to get it right.

            Show
            Gareth J Barnard added a comment - Notes etc. I need to look at and install Behat / Selenium - http://docs.moodle.org/dev/Acceptance_testing - for the tests. I'm not sure if 'composer' works on Windows. I already have Java (JDK) installed so have no issues with that language. This will take time! With regards Eric's suggestions (thank you Eric) - I had '1' in mind already as investigated this afternoon and found that for AJAX to work to and with the underlying data changing at the server end, the client's before view was being lost. No '2' is a non-starter because Moodle must work with JS off. No '3' might be more problematic in memory / storage on a per user basis when in fact with '1' all we are talking about is more HTML. However, I did think that this could be reduced by having one hidden input field per user containing an array of marks where the index matched the itemid. iMoot is rapidly approaching and this is more of a mess than I anticipated. But being such a mess needs careful, logical thinking to get it right.
            Hide
            Eric Merrill added a comment -

            The reason I suggested #2 is that I believe in 2.6 (or maybe 2.6) and above, features no longer have to work as advertised w/o JS. I can't find a reference to it in docs, I swear this was stated by HQ in the dev chat, but maybe I'm mistaken.

            I do agree that relying on JS is generally undesirable though.

            Show
            Eric Merrill added a comment - The reason I suggested #2 is that I believe in 2.6 (or maybe 2.6) and above, features no longer have to work as advertised w/o JS. I can't find a reference to it in docs, I swear this was stated by HQ in the dev chat, but maybe I'm mistaken. I do agree that relying on JS is generally undesirable though.
            Hide
            Gareth J Barnard added a comment -

            True Eric, I'm not sure if I've heard the rumour too. But given the implications of this issue and JS being single threaded and thus fragile I would rather go with a non-JS solution. Also I would think that lots of people would want a back-port far behind M2.6 even if its not implemented here.

            Show
            Gareth J Barnard added a comment - True Eric, I'm not sure if I've heard the rumour too. But given the implications of this issue and JS being single threaded and thus fragile I would rather go with a non-JS solution. Also I would think that lots of people would want a back-port far behind M2.6 even if its not implemented here.
            Hide
            Eric Merrill added a comment -

            Yeah.

            I will say that #1 is my preferred method - and I like your idea of collapsing it down to a single var per student. Since they are all int's or floats, it's easy to to collapse them down to a comma (or whatever) separated list.

            Show
            Eric Merrill added a comment - Yeah. I will say that #1 is my preferred method - and I like your idea of collapsing it down to a single var per student. Since they are all int's or floats, it's easy to to collapse them down to a comma (or whatever) separated list.
            Hide
            Stephen Bourget added a comment -

            Eric,

            I think the JavaScript policy you are referring to is in MDL-41535. I'm not sure that it would help in this case though.

            Show
            Stephen Bourget added a comment - Eric, I think the JavaScript policy you are referring to is in MDL-41535 . I'm not sure that it would help in this case though.
            Hide
            Gareth J Barnard added a comment -

            Due to other commercial commitments I am unable to complete this issue at this time. If I do have time in the future and it is still unresolved then I will come back to it. I have left references to my first attempt for others.

            I have unassigned myself to indicate that another may take over the issue if they so wish.

            Show
            Gareth J Barnard added a comment - Due to other commercial commitments I am unable to complete this issue at this time. If I do have time in the future and it is still unresolved then I will come back to it. I have left references to my first attempt for others. I have unassigned myself to indicate that another may take over the issue if they so wish.
            Hide
            Debbie Unterseher added a comment -

            I turned on Ajax for the gradesheet, and I do not have this issue anymore.

            Show
            Debbie Unterseher added a comment - I turned on Ajax for the gradesheet, and I do not have this issue anymore.
            Hide
            Damyon Wiese added a comment -

            The simple case is to review this - considering only the case when we are editing the entire grader report - not any edge cases for ajax grading. Adding Must fix for 2.8 to look at only this.

            Show
            Damyon Wiese added a comment - The simple case is to review this - considering only the case when we are editing the entire grader report - not any edge cases for ajax grading. Adding Must fix for 2.8 to look at only this.
            Hide
            Frédéric Massart added a comment -

            Sending a patch for peer review.

            This prevents a user from overriding grades which were set while they were editing the gradebook. In order to do that I rely on the method grade_grade::get_dategraded() which is supposed to be relatively accurate (I realised that we cannot rely on timemodified only as it does not necessarily gets updated when the item is already overridden). Note that this does not block all the other grades from being updated, only the problematic ones are skipped.

            The logic that skips the grade has been placed a bit lower than the normal logic which checks if the grades have changed. The reason is simple, I wanted to warn the user about the grades that were skipped, and rather than duplicating the code that creates a warning, I decided to re-use it. Another argument is the grade_item object is not available above, and moving it would lead to unnecessary database queries.

            The updates in grade_category are there to ensure that we update the timemodified of aggregated grades (course total, category total). If we do not update their timemodified, then even if a user cannot override a newer specific grade, they would override the aggregated ones. It looked fine to update the timemodified as when those grades are overridden then the overridden value prevails (as a date graded). I also spotted MDL-21161 (e785b784f14) which is similar in terms of logic as it is automatic.

            I will rebase this on integration, and backport when I get a +1.

            Cheers,
            Fred

            Show
            Frédéric Massart added a comment - Sending a patch for peer review. This prevents a user from overriding grades which were set while they were editing the gradebook. In order to do that I rely on the method grade_grade::get_dategraded() which is supposed to be relatively accurate (I realised that we cannot rely on timemodified only as it does not necessarily gets updated when the item is already overridden). Note that this does not block all the other grades from being updated, only the problematic ones are skipped. The logic that skips the grade has been placed a bit lower than the normal logic which checks if the grades have changed. The reason is simple, I wanted to warn the user about the grades that were skipped, and rather than duplicating the code that creates a warning, I decided to re-use it. Another argument is the grade_item object is not available above, and moving it would lead to unnecessary database queries. The updates in grade_category are there to ensure that we update the timemodified of aggregated grades (course total, category total). If we do not update their timemodified, then even if a user cannot override a newer specific grade, they would override the aggregated ones. It looked fine to update the timemodified as when those grades are overridden then the overridden value prevails (as a date graded). I also spotted MDL-21161 (e785b784f14) which is similar in terms of logic as it is automatic. I will rebase this on integration, and backport when I get a +1. Cheers, Fred
            Hide
            CiBoT added a comment -

            +1 code verified against automated checks.

            Checked MDL-38732 using repository: git://github.com/FMCorz/moodle.git

            More information about this report

            Show
            CiBoT added a comment - +1 code verified against automated checks. Checked MDL-38732 using repository: git://github.com/FMCorz/moodle.git master (branch: MDL-38732-master | CI Job ) More information about this report
            Hide
            Andrew Nicols added a comment -

            Hi Fred,

            Thanks for looking at this issue.
            The only think I can see which I think is worth noting is that the $skip
            code is a little orphaned. It would benefit from a comment to explain why
            some items may be skipped, and what is being continued becaues the foreach
            block is way above.

            Helen Foster may also want to take a look at the language strings in due
            course.

            Otherwise, good to go for integration,

            Andrew

            Show
            Andrew Nicols added a comment - Hi Fred, Thanks for looking at this issue. The only think I can see which I think is worth noting is that the $skip code is a little orphaned. It would benefit from a comment to explain why some items may be skipped, and what is being continued becaues the foreach block is way above. Helen Foster may also want to take a look at the language strings in due course. Otherwise, good to go for integration, Andrew
            Hide
            Helen Foster added a comment -

            Andrew, thanks for suggesting that I take a look at the language string.

            I think 'The grade entered for {$a->itemname} for {$a->username} was ignored because it was more recently updated by someone else.' is perfect.

            Show
            Helen Foster added a comment - Andrew, thanks for suggesting that I take a look at the language string. I think 'The grade entered for {$a->itemname} for {$a->username} was ignored because it was more recently updated by someone else.' is perfect.
            Hide
            Frédéric Massart added a comment -

            Thanks everyone, pushing for integration.

            Show
            Frédéric Massart added a comment - Thanks everyone, pushing for integration.
            Hide
            Dan Poltawski added a comment -

            Thanks Fred - the logic seems sound to me and it makes sense whats going on.

            Integrated to master, 27 and 26

            Show
            Dan Poltawski added a comment - Thanks Fred - the logic seems sound to me and it makes sense whats going on. Integrated to master, 27 and 26
            Hide
            Dan Poltawski added a comment -

            Failing.

            1) core_grade_report_graderlib_testcase::test_process_data
            Undefined property: stdClass::$timepageload

            /Users/Shared/Jenkins/Home/git_repositories/MOODLE_27_STABLE/grade/report/grader/lib.php:180
            /Users/Shared/Jenkins/Home/git_repositories/MOODLE_27_STABLE/grade/tests/report_graderlib_test.php:73
            /Users/Shared/Jenkins/Home/git_repositories/MOODLE_27_STABLE/lib/phpunit/classes/advanced_testcase.php:80

            To re-run:
            /Users/Shared/Jenkins/Home/composer_base/MOODLE_27_STABLE/vendor/bin/phpunit core_grade_report_graderlib_testcase grade/tests/report_graderlib_test.php

            Show
            Dan Poltawski added a comment - Failing. 1) core_grade_report_graderlib_testcase::test_process_data Undefined property: stdClass::$timepageload /Users/Shared/Jenkins/Home/git_repositories/MOODLE_27_STABLE/grade/report/grader/lib.php:180 /Users/Shared/Jenkins/Home/git_repositories/MOODLE_27_STABLE/grade/tests/report_graderlib_test.php:73 /Users/Shared/Jenkins/Home/git_repositories/MOODLE_27_STABLE/lib/phpunit/classes/advanced_testcase.php:80 To re-run: /Users/Shared/Jenkins/Home/composer_base/MOODLE_27_STABLE/vendor/bin/phpunit core_grade_report_graderlib_testcase grade/tests/report_graderlib_test.php
            Hide
            Frédéric Massart added a comment -

            Sorry about that Dan.

            I had not realised that we had test for the grader report. If I had I would have covered this new scenario. Now I guess it is a bit late to add those as it would delay this issue.

            I have added a commit on each branch to fix the undefined variable.

            Cheers,
            Fred

            Show
            Frédéric Massart added a comment - Sorry about that Dan. I had not realised that we had test for the grader report. If I had I would have covered this new scenario. Now I guess it is a bit late to add those as it would delay this issue. I have added a commit on each branch to fix the undefined variable. Cheers, Fred
            Hide
            Dan Poltawski added a comment -

            Thanks for the fix Fred, i've integrated it. We've got a few days for more extensive tests - it'd be great to see those too.

            Show
            Dan Poltawski added a comment - Thanks for the fix Fred, i've integrated it. We've got a few days for more extensive tests - it'd be great to see those too.
            Hide
            Mark Nelson added a comment -

            Works as expected, thanks all involved!

            Show
            Mark Nelson added a comment - Works as expected, thanks all involved!
            Hide
            Damyon Wiese added a comment -

            This seems to be randomly failing:

            There was 1 failure:

            1) core_grade_report_graderlib_testcase::test_process_data
            Failed asserting that 80 matches expected '60.00000'.

            /home/damyonw/Documents/Moodle/integration/master/moodle/grade/tests/report_graderlib_test.php:87
            /home/damyonw/Documents/Moodle/integration/master/moodle/lib/phpunit/classes/advanced_testcase.php:80

            To re-run:
            ./vendor/bin/phpunit core_grade_report_graderlib_testcase grade/tests/report_graderlib_test.php

            Show
            Damyon Wiese added a comment - This seems to be randomly failing: There was 1 failure: 1) core_grade_report_graderlib_testcase::test_process_data Failed asserting that 80 matches expected '60.00000'. /home/damyonw/Documents/Moodle/integration/master/moodle/grade/tests/report_graderlib_test.php:87 /home/damyonw/Documents/Moodle/integration/master/moodle/lib/phpunit/classes/advanced_testcase.php:80 To re-run: ./vendor/bin/phpunit core_grade_report_graderlib_testcase grade/tests/report_graderlib_test.php
            Hide
            Damyon Wiese added a comment -

            Created MDL-47706

            Show
            Damyon Wiese added a comment - Created MDL-47706
            Hide
            Dan Poltawski added a comment -

            Thanks for your contributions, this change is now upstream!

            The trick is to fix the problem you have, rather than the problem you want.

            – Braham Cohen

            Show
            Dan Poltawski added a comment - Thanks for your contributions, this change is now upstream! The trick is to fix the problem you have, rather than the problem you want. – Braham Cohen

              People

              • Votes:
                41 Vote for this issue
                Watchers:
                39 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: