-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
2.6.4
-
None
-
MOODLE_26_STABLE
I believe that the fix for MDL-20245 isn't sufficient. We have a professor who is trying to hide a section in her gradebook, and when she does, she's getting the error message:
Coding error detected, it must be fixed by a programmer: Invalid value in set_user_preference() call, value is is too long for the value column
Turning the debugging up to developer, the page gives:
Debug info:
Error code: codingerror
Stack trace:line 1838 of /lib/moodlelib.php: coding_exception thrown
line 1563 of /grade/report/grader/lib.php: call to set_user_preference()
line 110 of /grade/report/grader/index.php: call to grade_report_grader::do_process_action()
I added 'print($value);' to the very top of the set_user_preferences() function in moodlelib.php, and re-attempted the action, and this is what's trying to be loaded into that db column, which is more than the 1333 character limit:
a:2:{s:14:"aggregatesonly";a:53:{i:19;s:4:"1794";i:33;s:4:"9442";i:35;s:4:"7584";i:39;s:4:"7546";i:40;s:5:"11721";i:41;s:4:"6172";i:42;s:5:"10122";i:43;s:5:"10121";i:44;s:5:"10124";i:45;s:5:"10123";i:46;s:4:"9262";i:60;s:5:"13411";i:61;s:5:"13410";i:62;s:5:"13409";i:64;s:5:"13416";i:75;s:5:"13418";i:90;s:5:"13415";i:91;s:5:"13417";i:93;s:5:"13426";i:94;s:5:"16761";i:95;s:5:"13425";i:96;s:5:"13424";i:100;s:5:"14773";i:101;s:5:"14774";i:102;s:5:"14775";i:103;s:5:"14776";i:104;s:5:"18046";i:107;s:5:"18426";i:108;s:5:"18427";i:109;s:5:"18425";i:110;s:5:"18423";i:117;s:5:"18748";i:118;s:5:"18746";i:119;s:5:"18745";i:120;s:5:"18747";i:121;s:5:"18744";i:123;s:5:"18757";i:132;s:5:"18759";i:139;s:5:"21162";i:141;s:5:"18754";i:143;s:5:"18751";i:145;s:5:"18756";i:146;s:5:"18758";i:147;s:5:"21161";i:148;s:5:"18753";i:149;s:5:"13420";i:150;s:5:"23578";i:153;s:5:"23576";i:154;s:5:"23575";i:155;s:5:"23577";i:156;s:5:"23567";i:157;s:5:"23568";i:158;s:5:"23566";}s:10:"gradesonly";a:22:{i:3;s:4:"1785";i:4;s:4:"1787";i:5;s:4:"1789";i:6;s:4:"1788";i:7;s:4:"4062";i:8;s:4:"1541";i:10;s:4:"1795";i:12;s:4:"4063";i:15;s:4:"9481";i:16;s:4:"9441";i:17;s:4:"7545";i:18;s:4:"7547";i:19;s:5:"12088";i:20;s:5:"13414";i:24;s:5:"18752";i:25;s:5:"18750";i:26;s:5:"13419";i:27;s:5:"13421";i:28;s:5:"22529";i:29;s:5:"22530";i:30;s:5:"22528";i:31;s:5:"22527";}}
|
So, I don't know if this means that we need to increase the value to something huge (since we have some classes where this could realistically be in the thousands of characters potentially,) or if the "preference" idea for this needs to be re-developed entirely?
- will be (partly) resolved by
-
MDL-30668 Prevent the grader report from storing serialized data in the user_preferences table
-
- Closed
-