Skip to content

Commit

Permalink
CTP-3973 fix commit f4f33e7
Browse files Browse the repository at this point in the history
  • Loading branch information
watson8 committed Oct 29, 2024
1 parent 75fa986 commit 555d121
Show file tree
Hide file tree
Showing 2 changed files with 2 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 @@ -64,7 +64,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]))) {
$perpage = optional_param('per_page', 0, PARAM_INT);
$perpage = $perpage ?: (get_config('coursework', 'coursework_per_page') ?? 10);
$perpage = $perpage ?: ($CFG->coursework_per_page ?? 10);
$SESSION->allocate_perpage[$coursemoduleid] = $perpage;
} else {
$perpage = optional_param('per_page', $SESSION->allocate_perpage[$coursemoduleid], PARAM_INT);
Expand Down
2 changes: 1 addition & 1 deletion view.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
// (Grab default value from plugin setting).
if (!(isset($SESSION->perpage[$coursemoduleid]))) {
$perpage = optional_param('per_page', 0, PARAM_INT);
$perpage = $perpage ?: (get_config('coursework', 'coursework_per_page') ?? 10);
$perpage = $perpage ?: ($CFG->coursework_per_page ?? 10);
$SESSION->perpage[$coursemoduleid] = $perpage;
} else {
$perpage = optional_param('per_page', $SESSION->perpage[$coursemoduleid], PARAM_INT);
Expand Down

0 comments on commit 555d121

Please sign in to comment.