Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.0.1
    • Fix Version/s: None
    • Component/s: Gradebook
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Rank:
      16020

      Description

      am using moodle 2.0.1 when I try collapse the categories on the grade book I get Error writing to database with a button that says continue. If I click on the continue it takes me back to the main site.

      Debug info: Data too long for column 'value' at row 1
      UPDATE mdl_user_preferences SET value = ? WHERE id = ?
      [array (
      0 => 'a:2:{s:14:"aggregatesonly";a:13:

      {i:5;s:3:"108";i:7;s:3:"114";i:8;s:2:"60";i:9;s:2:"59";i:10;s:2:"62";i:11;s:3:"219";i:12;s:3:"107";i:17;s:3:"218";i:18;s:2:"61";i:23;s:3:"177";i:24;s:3:"174";i:25;s:3:"176";i:26;s:3:"175";}

      s:10:"gradesonly";a:4:{i:0;s:2:"69";i:1;s:3:"205";i:2;s:3:"217";i:3;s:3:"221";}}',
      1 => '806',
      )]
      Stack trace:

      line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1046 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1441 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->set_field_select()
      line 1416 of /lib/moodlelib.php: call to moodle_database->set_field()
      line 1518 of /grade/report/grader/lib.php: call to set_user_preference()
      line 104 of /grade/report/grader/index.php: call to grade_report_grader::process_action()

        Issue Links

          Activity

          Hide
          Salvador Meneses added a comment -

          Client having the same problem, a database error when Aggregates only minus sign is clicked, Several courses affected.

          Debug info: Data too long for column 'value' at row 1
          UPDATE mdl_user_preferences SET value = ? WHERE id = ?
          [array (
          0 => 'a:2:{s:14:"aggregatesonly";a:8:

          {i:0;s:2:"31";i:4;s:4:"1363";i:8;s:4:"1369";i:9;s:4:"1372";i:10;s:4:"1534";i:11;s:4:"1634";i:12;s:4:"1636";i:13;s:4:"1604";}

          s:10:"gradesonly";a:6:{i:2;s:4:"1371";i:3;s:4:"1370";i:4;s:4:"1368";i:5;s:4:"1367";i:6;s:4:"1360";i:7;s:4:"1635";}}',
          1 => '4949',
          )]
          Stack trace:
          line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
          line 1056 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
          line 1450 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->set_field_select()
          line 1418 of /lib/moodlelib.php: call to moodle_database->set_field()
          line 1540 of /grade/report/grader/lib.php: call to set_user_preference()
          line 104 of /grade/report/grader/index.php: call to grade_report_grader::process_action()

          Show
          Salvador Meneses added a comment - Client having the same problem, a database error when Aggregates only minus sign is clicked, Several courses affected. Debug info: Data too long for column 'value' at row 1 UPDATE mdl_user_preferences SET value = ? WHERE id = ? [array ( 0 => 'a:2:{s:14:"aggregatesonly";a:8: {i:0;s:2:"31";i:4;s:4:"1363";i:8;s:4:"1369";i:9;s:4:"1372";i:10;s:4:"1534";i:11;s:4:"1634";i:12;s:4:"1636";i:13;s:4:"1604";} s:10:"gradesonly";a:6:{i:2;s:4:"1371";i:3;s:4:"1370";i:4;s:4:"1368";i:5;s:4:"1367";i:6;s:4:"1360";i:7;s:4:"1635";}}', 1 => '4949', )] Stack trace: line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown line 1056 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() line 1450 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->set_field_select() line 1418 of /lib/moodlelib.php: call to moodle_database->set_field() line 1540 of /grade/report/grader/lib.php: call to set_user_preference() line 104 of /grade/report/grader/index.php: call to grade_report_grader::process_action()
          Hide
          Robert Northcutt added a comment - - edited

          Same issue...running 2.1.1+ (August 26 release).

          Show
          Robert Northcutt added a comment - - edited Same issue...running 2.1.1+ (August 26 release).
          Hide
          Robert Northcutt added a comment -

          Is there a workaround for this problem. I cannot see all students grades on assignments at the same time. This is very cumbersome when trying to view grades for a class with multiple grading categories and assignments, that you would like to be able to collapse and expand.

          Show
          Robert Northcutt added a comment - Is there a workaround for this problem. I cannot see all students grades on assignments at the same time. This is very cumbersome when trying to view grades for a class with multiple grading categories and assignments, that you would like to be able to collapse and expand.
          Hide
          Jay Hickman added a comment -

          I find it interesting that there are not more reports of this issue if it is a base issue. I had originally thought that it was attributed to having to many category/grade types, but surely there are more people than this using the multiple grade types.

          I am now wondering if this might be an artifact created from bulk grade uploads into multiple category gradebooks as this was the activity I was doing when the problem arose and I have not been able to duplicate the issue as of yet in any of my lab instances of moodle.

          Show
          Jay Hickman added a comment - I find it interesting that there are not more reports of this issue if it is a base issue. I had originally thought that it was attributed to having to many category/grade types, but surely there are more people than this using the multiple grade types. I am now wondering if this might be an artifact created from bulk grade uploads into multiple category gradebooks as this was the activity I was doing when the problem arose and I have not been able to duplicate the issue as of yet in any of my lab instances of moodle.
          Hide
          Robert Northcutt added a comment -

          Happy to help try to debug but not sure where to start. It is happening for all of my courses...whether migrated from 1.9 to 2.0 or whether created new. Also independent of theme selected.

          Show
          Robert Northcutt added a comment - Happy to help try to debug but not sure where to start. It is happening for all of my courses...whether migrated from 1.9 to 2.0 or whether created new. Also independent of theme selected.
          Hide
          Robert Northcutt added a comment - - edited

          Disregard my earlier posts...

          This works some times but not others. I have no idea what is really going on.

          Show
          Robert Northcutt added a comment - - edited Disregard my earlier posts... This works some times but not others. I have no idea what is really going on.
          Hide
          Jay Hickman added a comment -

          If I am understanding the issue, when you change the view (expand or collapse grade items) moodle attempts to remember your settings by writing to database and if you have a lot of grade items/categories the value it attempts to write exceeds a 255 character limitation in the database.

          Not that it is a fix to issue, but is there a way to simply turn off the "remember/write to db" function for this action. To my teachers the ability to collapse is much more important than the fact that moodle remember that action. Especially as we have a extended category schema involving semesters, quarters, and grade categories.

          Any help or hints would be much appreciated.

          Jay

          Show
          Jay Hickman added a comment - If I am understanding the issue, when you change the view (expand or collapse grade items) moodle attempts to remember your settings by writing to database and if you have a lot of grade items/categories the value it attempts to write exceeds a 255 character limitation in the database. Not that it is a fix to issue, but is there a way to simply turn off the "remember/write to db" function for this action. To my teachers the ability to collapse is much more important than the fact that moodle remember that action. Especially as we have a extended category schema involving semesters, quarters, and grade categories. Any help or hints would be much appreciated. Jay
          Hide
          Jay Hickman added a comment - - edited

          Did a little digging into the table that is throwing the error "mdl_user_preferences" and as I am seeing it, the error is triggered by the number of course gradebooks that you have set an expand/collapse aggregate view preferences in. The error can be cleared very temporarily by deleting the value for "grade_report_grader_collapsed_categories" however once you have set 10 to 12 preferences the error reappears because you have reached the table character limit.

          Not a coder, but it seems if this setting was recorded in a different table on a per course basis for each user, it might prevent the character limit from being reached.

          Jay

          Show
          Jay Hickman added a comment - - edited Did a little digging into the table that is throwing the error "mdl_user_preferences" and as I am seeing it, the error is triggered by the number of course gradebooks that you have set an expand/collapse aggregate view preferences in. The error can be cleared very temporarily by deleting the value for "grade_report_grader_collapsed_categories" however once you have set 10 to 12 preferences the error reappears because you have reached the table character limit. Not a coder, but it seems if this setting was recorded in a different table on a per course basis for each user, it might prevent the character limit from being reached. Jay
          Hide
          Robert Northcutt added a comment - - edited

          As the number of assignments and quizzes grows by quarter and semester, this issue is making using the Grader view more and more cumbersome (i.e., a real pain). Teachers must scroll to the right many pages to see the most recent quarter and assignments - since they cannot collapse prior quarters or categories within quarters. Any chance of someone taking a look at this ASAP and FIXING IT?

          Show
          Robert Northcutt added a comment - - edited As the number of assignments and quizzes grows by quarter and semester, this issue is making using the Grader view more and more cumbersome (i.e., a real pain). Teachers must scroll to the right many pages to see the most recent quarter and assignments - since they cannot collapse prior quarters or categories within quarters. Any chance of someone taking a look at this ASAP and FIXING IT?
          Hide
          Charles Fulton added a comment -

          There are several fixes discussed at MDL-20245, which sounds like the same issue.

          Show
          Charles Fulton added a comment - There are several fixes discussed at MDL-20245 , which sounds like the same issue.
          Hide
          Andrew Davis added a comment -

          Sorry to everyone who has posted in this issue and voted for it but I am closing it as its a clear duplicate bug report. Both this and MDL-20245 have roughly the same number of votes but MDL-20245 was opened first.

          Show
          Andrew Davis added a comment - Sorry to everyone who has posted in this issue and voted for it but I am closing it as its a clear duplicate bug report. Both this and MDL-20245 have roughly the same number of votes but MDL-20245 was opened first.

            People

            • Votes:
              24 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: