Skip to content

Commit

Permalink
General feedback cmid error
Browse files Browse the repository at this point in the history
  • Loading branch information
watson8 committed Oct 29, 2024
1 parent 21c173f commit a8a1141
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actions/allocate.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

// If a session variable holding perpage preference for the specific coursework is not set, set default value (10).
if (!(isset($SESSION->allocate_perpage[$coursemoduleid]))) {
$SESSION->allocate_perpage[$coursemoduleid] = optional_param('per_page', $CFG->coursework_per_page, PARAM_INT);
$SESSION->allocate_perpage[$coursemoduleid] = optional_param('per_page', 10, PARAM_INT);
$perpage = $SESSION->allocate_perpage[$coursemoduleid];
} else {
$perpage = optional_param('per_page', $SESSION->allocate_perpage[$coursemoduleid], PARAM_INT);
Expand Down
2 changes: 1 addition & 1 deletion actions/general_feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$cmid = required_param('cmid', PARAM_INT);
$ajax = optional_param('ajax', false, PARAM_BOOL);

$cm = get_coursemodule_from_instance('coursework', $cmid);
$cm = get_coursemodule_from_id('coursework', $cmid, 0, false, MUST_EXIST);
$course = $DB->get_record('course', ['id' => $cm->course]);
require_login($course, false, $cm);

Expand Down
1 change: 1 addition & 0 deletions classes/models/personal_deadline.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* @property mixed allocatableid
* @package mod_coursework\models
*/
#[\AllowDynamicProperties]
class personal_deadline extends table_base {

/**
Expand Down

0 comments on commit a8a1141

Please sign in to comment.