-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.7.2
-
None
-
MOODLE_27_STABLE
When accessing the Assignment grading page, the following debugging message is shown when Assignments per page option is set to All.: Negative limitnum parameter detected: -1, did you pass the correct arguments?
Initial report of this issue can be found at https://moodle.org/mod/forum/discuss.php?d=264251
I've tested this in v2.6.3 and v2.7.2+ and this issue seems to be introduced from v2.7. There are no issues with v2.6.
This debug message comes from normalise_limit_from_num() in /lib/dml/moodle_database.php, which is introduced from v2.7.
The value of $limitnum passed from the assign module is '-1' of type string so the following check on $limitnum fails:
if ($limitnum === null || $limitnum === '' || $limitnum === -1) { |
$limitnum = 0; |
}
|
Either the value passed from the assign module needs to be an integer or the above check needs to first convert $limitnum to integer.
In v2.6, the value of $limitnum was casted to int in get_records_sql() in /lib/dml/mysqli_native_moodle_database.php as shown:
$limitnum = (int)$limitnum; |
- duplicates
-
MDL-47378 mod_assign: Grading table incorrect type of perpage preference
-
- Closed
-