Moodle
  1. Moodle
  2. MDL-32076

Unlimited Grades Not Accepted By Grader Report with AJAX Editing On

    Details

    • Testing Instructions:
      Hide

      For this test you will need a course with at least one student in it.

      Turn the site setting "unlimitedgrades" on.
      Make sure that the site setting "grade_report_enableajax" is on.
      Create an assignment with a maximum grade of 100.
      Go to the grader report.

      Click in the student row in the assignment column (ie the cell where the student assignment grade should go) and enter a valid grade ie 50
      The cell background color will change to show that the grade is now overridden (manually set within the gradebook instead of being supplied by the activity)
      Reload the page by clicking on "grader report" in the navigation bar.
      Check your change was actually saved.

      Enter a grade above 100 ie 120
      Reload the page by clicking on "grader report" in the navigation bar.
      Check your change was actually saved.
      Change the grade back to something under 100.

      Turn the site setting "unlimitedgrades" off.
      Enter a grade above 100 ie 120
      You should get an error saying "The grade entered for assignment for Sam Student is more than the maximum allowed"
      The display of the error dialog is kind of messed up. There is a linked issue to fix this.

      Enter a grade less than 100 and check that the change is saved.

      Show
      For this test you will need a course with at least one student in it. Turn the site setting "unlimitedgrades" on. Make sure that the site setting "grade_report_enableajax" is on. Create an assignment with a maximum grade of 100. Go to the grader report. Click in the student row in the assignment column (ie the cell where the student assignment grade should go) and enter a valid grade ie 50 The cell background color will change to show that the grade is now overridden (manually set within the gradebook instead of being supplied by the activity) Reload the page by clicking on "grader report" in the navigation bar. Check your change was actually saved. Enter a grade above 100 ie 120 Reload the page by clicking on "grader report" in the navigation bar. Check your change was actually saved. Change the grade back to something under 100. Turn the site setting "unlimitedgrades" off. Enter a grade above 100 ie 120 You should get an error saying "The grade entered for assignment for Sam Student is more than the maximum allowed" The display of the error dialog is kind of messed up. There is a linked issue to fix this. Enter a grade less than 100 and check that the change is saved.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull 2.4 Branch:
      MDL-32076_unlimited2_24
    • Pull Master Branch:
      MDL-32076_unlimited2
    • Rank:
      38771

      Description

      With both Unlimited Grades and AJAX Editing for the grader report turned on, the grader report will not allow grades higher than the maximum points to be entered via AJAX editing. It will allow grades higher than the maximum if you "Turn Editing On" and save the grade, but doing it via AJAX editing does not work.

      In 2.1.4, we are receiving an error message:
      "Error Click this box to remove it
      The grade entered for ... for student ... is more than the maximum allowed"

      In 2.2.1, I'm not receiving an error message. It looks like it saves the grade but refreshing the page reveals that it didn't save it.

      Steps to reproduce:
      1. Turn on Unlimited Grades in Site admin > Grades > General settings.
      2. Turn on AJAX Editing for Grader report in Site admin > Grades > Report settings > Grader report.
      3. Create an assignment (or probably any graded activity) with some point total, e.g. 10 points.
      4. On grader report, do not click "Turn Editing On." Click the assignment grade cell for any student to edit it.
      5. Enter a point value greater than the maximum set in step 3, e.g. 15 points. Press Enter to save.
      6. On 2.1.4, you'll get an error message.
      7. On 2.2.1, it appears to save. Refresh the page. It didn't save.

      This was reproduced on pure 2.1.4 and 2.2.1 sites with absolutely no non-standard plugins or customizations.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this.

          I've put that on the backlog.

          In the meantime feel free to help us work on this issue.

          Show
          Michael de Raadt added a comment - Thanks for reporting this. I've put that on the backlog. In the meantime feel free to help us work on this issue.
          Hide
          Charles Fulton added a comment -

          We're seeing this in 2.3.3 as well.

          Show
          Charles Fulton added a comment - We're seeing this in 2.3.3 as well.
          Hide
          Andrew Davis added a comment -

          Putting this up for peer review. Once thats done Ill see how far I'll backport it.

          Show
          Andrew Davis added a comment - Putting this up for peer review. Once thats done Ill see how far I'll backport it.
          Hide
          Rajesh Taneja added a comment -

          Hello Andrew,

          Looking at similar implementation in grade/report/grader/lib.php - line 256
          It's getting bounded_grade value and then comparing it with final grade.

          IMO this is the way to go about it.

          FYI: In current code it will be nice to remove extra space in else if. Personally I would combine null and empty check in one if statement.

          if (is_null($finalgrade) || !empty($CFG->unlimitedgrades)) {
          

          Anyway this is not valid as, the correct way is to get the bounded value for comparison.

          Show
          Rajesh Taneja added a comment - Hello Andrew, Looking at similar implementation in grade/report/grader/lib.php - line 256 It's getting bounded_grade value and then comparing it with final grade. IMO this is the way to go about it. FYI: In current code it will be nice to remove extra space in else if. Personally I would combine null and empty check in one if statement. if (is_null($finalgrade) || !empty($CFG->unlimitedgrades)) { Anyway this is not valid as, the correct way is to get the bounded value for comparison.
          Hide
          Andrew Davis added a comment -

          Well spotted I've updated the fix to use bounded_grade() and created 2.4 and 2.3 versions. Putting this up for integration.

          Show
          Andrew Davis added a comment - Well spotted I've updated the fix to use bounded_grade() and created 2.4 and 2.3 versions. Putting this up for integration.
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Looks perfect, but:

          1) It's conflicting around some groups code (grade/report/grader/lib.php)
          2) Couldn't we have this part of the API covered with some unit test to guarantee everything continues working always (optional). Also, why are there 2 places doing the same calculation, smells dupe code (for your consideration, not now).

          Reopening, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Looks perfect, but: 1) It's conflicting around some groups code (grade/report/grader/lib.php) 2) Couldn't we have this part of the API covered with some unit test to guarantee everything continues working always (optional). Also, why are there 2 places doing the same calculation, smells dupe code (for your consideration, not now). Reopening, ciao
          Hide
          CiBoT added a comment -

          Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

          Show
          CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
          Hide
          Andrew Davis added a comment -

          I've raised MDL-37653 to look into removing the duplication. I'll need to wait for current integration to go into master before I can resolve the conflict. I'll add some unit tests while I'm waiting for that.

          Show
          Andrew Davis added a comment - I've raised MDL-37653 to look into removing the duplication. I'll need to wait for current integration to go into master before I can resolve the conflict. I'll add some unit tests while I'm waiting for that.
          Hide
          Andrew Davis added a comment -

          I've added some unit test code. I'm just waiting for the weeklies to be rolled then I'll rebase and put this up for peer review.

          Show
          Andrew Davis added a comment - I've added some unit test code. I'm just waiting for the weeklies to be rolled then I'll rebase and put this up for peer review.
          Hide
          Andrew Davis added a comment -

          Here's a new version. Git was being difficult so I wound up creating a new branch.

          Show
          Andrew Davis added a comment - Here's a new version. Git was being difficult so I wound up creating a new branch.
          Hide
          Rajesh Taneja added a comment -

          Thanks Andrew,

          Patch looks good to me.
          [y] Syntax
          [y] Output
          [y] Whitespace
          [-] Language
          [-] Databases
          [y] Testing
          [-] Security
          [-] Documentation
          [y] Git
          [y] Sanity check

          FYI:

          1. https://github.com/andyjdavis/moodle/compare/master...MDL-32076_unlimited2#L2R55 Missed dot at the end of comment.
          2. Should you consider moving create_report() to data_generator.php, so it can be re-used ?
          Show
          Rajesh Taneja added a comment - Thanks Andrew, Patch looks good to me. [y] Syntax [y] Output [y] Whitespace [-] Language [-] Databases [y] Testing [-] Security [-] Documentation [y] Git [y] Sanity check FYI: https://github.com/andyjdavis/moodle/compare/master...MDL-32076_unlimited2#L2R55 Missed dot at the end of comment. Should you consider moving create_report() to data_generator.php, so it can be re-used ?
          Hide
          Andrew Davis added a comment -

          I've fixed up the comments missing the full stop.

          I suspect that there will be a similar create_report() function in each of the grade report unit test files however they are likely to be subtly different. Once I've got basic unit tests for all of the reports I'll look at refactoring them.

          Putting this up for integration.

          Show
          Andrew Davis added a comment - I've fixed up the comments missing the full stop. I suspect that there will be a similar create_report() function in each of the grade report unit test files however they are likely to be subtly different. Once I've got basic unit tests for all of the reports I'll look at refactoring them. Putting this up for integration.
          Hide
          Dan Poltawski added a comment -

          Integrated to master, 24 and 23. Thanks Andrew

          Show
          Dan Poltawski added a comment - Integrated to master, 24 and 23. Thanks Andrew
          Hide
          Dan Poltawski added a comment -

          Hi Andrew,

          This fails on 2.3 cos of the data generator:
          HP Fatal error: Call to undefined method phpunit_data_generator::enrol_user() in /Users/Shared/Jenkins/Home/git_repositories/MOODLE_23_STABLE/grade/tests/reportgrader_test.php on line 53
          PHP Stack trace:
          PHP 1.

          {main}() /opt/local/bin/phpunit:0
          PHP 2. PHPUnit_TextUI_Command::main() /opt/local/bin/phpunit:46
          PHP 3. PHPUnit_TextUI_Command->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/Command.php:129
          PHP 4. PHPUnit_TextUI_TestRunner->doRun() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/Command.php:176
          PHP 5. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/TestRunner.php:346
          PHP 6. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:705
          PHP 7. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:705
          PHP 8. PHPUnit_Framework_TestSuite->runTest() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:745
          PHP 9. PHPUnit_Framework_TestCase->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:775
          PHP 10. PHPUnit_Framework_TestResult->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:769
          PHP 11. advanced_testcase->runBare() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestResult.php:648
          PHP 12. PHPUnit_Framework_TestCase->runBare() /Users/Shared/Jenkins/Home/git_repositories/MOODLE_23_STABLE/lib/phpunit/classes/advanced_testcase.php:76
          PHP 13. PHPUnit_Framework_TestCase->runTest() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:824
          PHP 14. ReflectionMethod->invokeArgs() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:969
          PHP 15. grade_report_graderlib_testcase->test_process_data() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:969

          Fatal error: Call to undefined method phpunit_data_generator::enrol_user() in /Users/Shared/Jenkins/Home/git_repositories/MOODLE_23_STABLE/grade/tests/reportgrader_test.php on line 53

          Call Stack:
          0.0002 633352 1. {main}

          () /opt/local/bin/phpunit:0
          0.0094 1841264 2. PHPUnit_TextUI_Command::main() /opt/local/bin/phpunit:46
          0.0095 1841992 3. PHPUnit_TextUI_Command->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/Command.php:129
          8.2624 207283504 4. PHPUnit_TextUI_TestRunner->doRun() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/Command.php:176
          8.2683 207689632 5. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/TestRunner.php:346
          236.3819 246479008 6. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:705
          243.6095 249282152 7. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:705
          243.6098 249282552 8. PHPUnit_Framework_TestSuite->runTest() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:745
          243.6098 249282552 9. PHPUnit_Framework_TestCase->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:775
          243.6098 249282552 10. PHPUnit_Framework_TestResult->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:769
          243.6100 249283824 11. advanced_testcase->runBare() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestResult.php:648
          243.6103 249306280 12. PHPUnit_Framework_TestCase->runBare() /Users/Shared/Jenkins/Home/git_repositories/MOODLE_23_STABLE/lib/phpunit/classes/advanced_testcase.php:76
          243.6104 249347528 13. PHPUnit_Framework_TestCase->runTest() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:824
          243.6104 249348952 14. ReflectionMethod->invokeArgs() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:969
          243.6104 249348984 15. grade_report_graderlib_testcase->test_process_data() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:969

          Show
          Dan Poltawski added a comment - Hi Andrew, This fails on 2.3 cos of the data generator: HP Fatal error: Call to undefined method phpunit_data_generator::enrol_user() in /Users/Shared/Jenkins/Home/git_repositories/MOODLE_23_STABLE/grade/tests/reportgrader_test.php on line 53 PHP Stack trace: PHP 1. {main}() /opt/local/bin/phpunit:0 PHP 2. PHPUnit_TextUI_Command::main() /opt/local/bin/phpunit:46 PHP 3. PHPUnit_TextUI_Command->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/Command.php:129 PHP 4. PHPUnit_TextUI_TestRunner->doRun() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/Command.php:176 PHP 5. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/TestRunner.php:346 PHP 6. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:705 PHP 7. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:705 PHP 8. PHPUnit_Framework_TestSuite->runTest() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:745 PHP 9. PHPUnit_Framework_TestCase->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:775 PHP 10. PHPUnit_Framework_TestResult->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:769 PHP 11. advanced_testcase->runBare() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestResult.php:648 PHP 12. PHPUnit_Framework_TestCase->runBare() /Users/Shared/Jenkins/Home/git_repositories/MOODLE_23_STABLE/lib/phpunit/classes/advanced_testcase.php:76 PHP 13. PHPUnit_Framework_TestCase->runTest() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:824 PHP 14. ReflectionMethod->invokeArgs() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:969 PHP 15. grade_report_graderlib_testcase->test_process_data() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:969 Fatal error: Call to undefined method phpunit_data_generator::enrol_user() in /Users/Shared/Jenkins/Home/git_repositories/MOODLE_23_STABLE/grade/tests/reportgrader_test.php on line 53 Call Stack: 0.0002 633352 1. {main} () /opt/local/bin/phpunit:0 0.0094 1841264 2. PHPUnit_TextUI_Command::main() /opt/local/bin/phpunit:46 0.0095 1841992 3. PHPUnit_TextUI_Command->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/Command.php:129 8.2624 207283504 4. PHPUnit_TextUI_TestRunner->doRun() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/Command.php:176 8.2683 207689632 5. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/TextUI/TestRunner.php:346 236.3819 246479008 6. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:705 243.6095 249282152 7. PHPUnit_Framework_TestSuite->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:705 243.6098 249282552 8. PHPUnit_Framework_TestSuite->runTest() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:745 243.6098 249282552 9. PHPUnit_Framework_TestCase->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestSuite.php:775 243.6098 249282552 10. PHPUnit_Framework_TestResult->run() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:769 243.6100 249283824 11. advanced_testcase->runBare() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestResult.php:648 243.6103 249306280 12. PHPUnit_Framework_TestCase->runBare() /Users/Shared/Jenkins/Home/git_repositories/MOODLE_23_STABLE/lib/phpunit/classes/advanced_testcase.php:76 243.6104 249347528 13. PHPUnit_Framework_TestCase->runTest() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:824 243.6104 249348952 14. ReflectionMethod->invokeArgs() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:969 243.6104 249348984 15. grade_report_graderlib_testcase->test_process_data() /opt/local/lib/php53/pear/share/pear/PHPUnit/Framework/TestCase.php:969
          Hide
          Dan Poltawski added a comment -

          Hi, this is failing on master and 24 too:

          grade_report_graderlib_testcase::test_process_data
          Invalid argument supplied for foreach()
          
          /Users/Shared/Jenkins/Home/git_repositories/master/grade/report/grader/lib.php:197
          /Users/Shared/Jenkins/Home/git_repositories/master/grade/tests/reportgrader_test.php:73
          /Users/Shared/Jenkins/Home/git_repositories/master/lib/phpunit/classes/advanced_testcase.php:76
          
          Show
          Dan Poltawski added a comment - Hi, this is failing on master and 24 too: grade_report_graderlib_testcase::test_process_data Invalid argument supplied for foreach() /Users/Shared/Jenkins/Home/git_repositories/master/grade/report/grader/lib.php:197 /Users/Shared/Jenkins/Home/git_repositories/master/grade/tests/reportgrader_test.php:73 /Users/Shared/Jenkins/Home/git_repositories/master/lib/phpunit/classes/advanced_testcase.php:76
          Hide
          Dan Poltawski added a comment -

          I've reverted this as it was breaking tests on all branches.

          Show
          Dan Poltawski added a comment - I've reverted this as it was breaking tests on all branches.
          Hide
          CiBoT added a comment -

          Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

          Show
          CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
          Hide
          Andrew Davis added a comment -

          bah, the workings of process_data() changed, likely by MDL-35074, since I created my branch so the new unit tests don't work correctly. Fixing them now.

          Show
          Andrew Davis added a comment - bah, the workings of process_data() changed, likely by MDL-35074 , since I created my branch so the new unit tests don't work correctly. Fixing them now.
          Hide
          Andrew Davis added a comment -

          The master and 2.4 version unit tests now function with the improved process_data(). The 2.3 version now just contains the core code fix without the unit tests.

          Show
          Andrew Davis added a comment - The master and 2.4 version unit tests now function with the improved process_data(). The 2.3 version now just contains the core code fix without the unit tests.
          Hide
          Damyon Wiese added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          Cheers!

          Show
          Damyon Wiese added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. Cheers!
          Hide
          Dan Poltawski added a comment -

          Integrated, thanks!

          Show
          Dan Poltawski added a comment - Integrated, thanks!
          Hide
          David Monllaó added a comment -

          Tested in 23, 24 and master I've noticed a two things:

          • When unlimitedgrades is disabled an editing mode it turned on, I can set the value without receiving any error (but the wrong value is not saved)
          • When unlimitedgrades is enabled and I use a very high value like 120000 I see the *Error Click this box to remove it
            The grade entered for ASDASDAS for Student 111 is more than the maximum allowed* error

          Waiting for feedback

          Show
          David Monllaó added a comment - Tested in 23, 24 and master I've noticed a two things: When unlimitedgrades is disabled an editing mode it turned on, I can set the value without receiving any error (but the wrong value is not saved) When unlimitedgrades is enabled and I use a very high value like 120000 I see the *Error Click this box to remove it The grade entered for ASDASDAS for Student 111 is more than the maximum allowed* error Waiting for feedback
          Hide
          Andrew Davis added a comment -

          When I load the grader report Im getting JS error although this issue hasnt touched the javascript.

          Timestamp: 13/02/13 11:18:08
          Error: TypeError: this.report.grades is undefined
          Source File: http://localhost/moodle/int/master/lib/javascript.php/1360725302/grade/report/grader/module.js
          Line: 1

          Not sure what the deal is. afaik, the JS hasn't changed this week.

          Show
          Andrew Davis added a comment - When I load the grader report Im getting JS error although this issue hasnt touched the javascript. Timestamp: 13/02/13 11:18:08 Error: TypeError: this.report.grades is undefined Source File: http://localhost/moodle/int/master/lib/javascript.php/1360725302/grade/report/grader/module.js Line: 1 Not sure what the deal is. afaik, the JS hasn't changed this week.
          Hide
          Andrew Davis added a comment -

          Just double checked and it all works fine in my branch but I get the above JS error in integration.

          Show
          Andrew Davis added a comment - Just double checked and it all works fine in my branch but I get the above JS error in integration.
          Hide
          Rajesh Taneja added a comment -

          Can this be related to MDL-37598 ?

          Show
          Rajesh Taneja added a comment - Can this be related to MDL-37598 ?
          Hide
          Rajesh Taneja added a comment -

          Sorry guys, it seems MDL-37598 is not causing this issue.

          Grader report with unlimited grades show error, if grade entered is more then 1000, as maxgrade by default can't be more then 1000.

          David Monllaó If you want it to be more then 1000 then please set $CFG->gradeoverhundredprocentmax and it should work.

          I think it's safe to pass this.

          Show
          Rajesh Taneja added a comment - Sorry guys, it seems MDL-37598 is not causing this issue. Grader report with unlimited grades show error, if grade entered is more then 1000, as maxgrade by default can't be more then 1000. David Monllaó If you want it to be more then 1000 then please set $CFG->gradeoverhundredprocentmax and it should work. I think it's safe to pass this.
          Hide
          David Monllaó added a comment -

          Tested in 23, 24 and master.

          With editing mode enabled and unlimitedgrades disabled a JS error is thrown, when I try to set up a higher value than the max. allowed I see a JS error in the console:

          Uncaught TypeError: Cannot call method 'set' of null module.js:678
          M.gradereport_grader.classes.ajax.submission_outcome module.js:678
          Y.Subscriber._notify simpleyui.js:10169
          Y.Subscriber.notify simpleyui.js:10198
          Y.CustomEvent._notify simpleyui.js:9884
          Y.CustomEvent._procSubs simpleyui.js:9990
          Y.CustomEvent.fireSimple simpleyui.js:9958
          Y.CustomEvent.fire simpleyui.js:9940
          ET.fire simpleyui.js:10996
          IO._evt simpleyui.js:17258
          IO.complete simpleyui.js:17294
          (anonymous function) simpleyui.js:17540
          

          In master I see the same problem:

          Uncaught TypeError: Cannot call method 'set' of null module.js:678
          M.gradereport_grader.classes.ajax.submission_outcome module.js:678
          Y.Subscriber._notify simpleyui.js:10169
          Y.Subscriber.notify simpleyui.js:10198
          Y.CustomEvent._notify simpleyui.js:9884
          Y.CustomEvent._procSubs simpleyui.js:9990
          Y.CustomEvent.fireSimple simpleyui.js:9958
          Y.CustomEvent.fire simpleyui.js:9940
          ET.fire simpleyui.js:10996
          IO._evt simpleyui.js:17258
          IO.complete simpleyui.js:17294
          (anonymous function) simpleyui.js:17540
          

          I'm passing it since I've reproduced the problem in master and it should be another issue, Andrew are you aware of it or related work is being done in another issue?

          Show
          David Monllaó added a comment - Tested in 23, 24 and master. With editing mode enabled and unlimitedgrades disabled a JS error is thrown, when I try to set up a higher value than the max. allowed I see a JS error in the console: Uncaught TypeError: Cannot call method 'set' of null module.js:678 M.gradereport_grader.classes.ajax.submission_outcome module.js:678 Y.Subscriber._notify simpleyui.js:10169 Y.Subscriber.notify simpleyui.js:10198 Y.CustomEvent._notify simpleyui.js:9884 Y.CustomEvent._procSubs simpleyui.js:9990 Y.CustomEvent.fireSimple simpleyui.js:9958 Y.CustomEvent.fire simpleyui.js:9940 ET.fire simpleyui.js:10996 IO._evt simpleyui.js:17258 IO.complete simpleyui.js:17294 (anonymous function) simpleyui.js:17540 In master I see the same problem: Uncaught TypeError: Cannot call method 'set' of null module.js:678 M.gradereport_grader.classes.ajax.submission_outcome module.js:678 Y.Subscriber._notify simpleyui.js:10169 Y.Subscriber.notify simpleyui.js:10198 Y.CustomEvent._notify simpleyui.js:9884 Y.CustomEvent._procSubs simpleyui.js:9990 Y.CustomEvent.fireSimple simpleyui.js:9958 Y.CustomEvent.fire simpleyui.js:9940 ET.fire simpleyui.js:10996 IO._evt simpleyui.js:17258 IO.complete simpleyui.js:17294 (anonymous function) simpleyui.js:17540 I'm passing it since I've reproduced the problem in master and it should be another issue, Andrew are you aware of it or related work is being done in another issue?
          Hide
          David Monllaó added a comment -

          Thanks Rajesh, without the big numbers problem we only have the JS error

          Show
          David Monllaó added a comment - Thanks Rajesh, without the big numbers problem we only have the JS error
          Hide
          Rajesh Taneja added a comment -

          Hello Andrew,

          Just wondering if we have any docs for gradeoverhundredprocentmax ?

          Not sure, if this should be added to config-dist.php, so people can use it.

          Show
          Rajesh Taneja added a comment - Hello Andrew, Just wondering if we have any docs for gradeoverhundredprocentmax ? Not sure, if this should be added to config-dist.php, so people can use it.
          Hide
          Andrew Davis added a comment -

          Hi. I actually haven't seen gradeoverhundredprocentmax before that I can recall By all means raise one or more MDLs and I'll get onto these problems and gaps in the documentation.

          Show
          Andrew Davis added a comment - Hi. I actually haven't seen gradeoverhundredprocentmax before that I can recall By all means raise one or more MDLs and I'll get onto these problems and gaps in the documentation.
          Hide
          Damyon Wiese added a comment -

          Congratulations this fix has been added to Moodle!

          You may want to dedicate this issue to someone special on this Valentines day.

          Thanks!

          Show
          Damyon Wiese added a comment - Congratulations this fix has been added to Moodle! You may want to dedicate this issue to someone special on this Valentines day. Thanks!

            People

            • Votes:
              11 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: