Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-35427: Remove resetting of $_POST - use $mform->setConstant to fo…

…rce update to rownum instead.
  • Loading branch information...
commit b32868bed3b2df83c803dbbaaaf40f708e69e7fe 1 parent 0272a0c
Damyon Wiese authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 mod/assign/locallib.php
View
5 mod/assign/locallib.php
@@ -2009,10 +2009,6 @@ private function view_single_grade_page($mform, $offset=0) {
if ($rownum == count($useridlist) - 1) {
$last = true;
}
- // the placement of this is important so can pass the list of userids above
- if ($offset) {
- $_POST = array();
- }
if (!$userid) {
throw new coding_exception('Row is out of bounds for the current grading table: ' . $rownum);
}
@@ -3852,6 +3848,7 @@ public function add_grade_form_elements(MoodleQuickForm $mform, stdClass $data,
$mform->setType('id', PARAM_INT);
$mform->addElement('hidden', 'rownum', $rownum);
$mform->setType('rownum', PARAM_INT);
+ $mform->setConstant('rownum', $rownum);
$mform->addElement('hidden', 'useridlist', implode(',', $useridlist));
$mform->setType('useridlist', PARAM_TEXT);
$mform->addElement('hidden', 'ajax', optional_param('ajax', 0, PARAM_INT));
Please sign in to comment.
Something went wrong with that request. Please try again.