diff --git a/actions/allocate.php b/actions/allocate.php index b03d378..4003357 100644 --- a/actions/allocate.php +++ b/actions/allocate.php @@ -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); diff --git a/view.php b/view.php index 3ca98f3..91f7a7e 100644 --- a/view.php +++ b/view.php @@ -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);