Skip to content

Commit

Permalink
ewallah#26 - fix: Variable "currentCmId" must be all lower-case
Browse files Browse the repository at this point in the history
  • Loading branch information
danowar2k committed Feb 21, 2024
1 parent 160ac14 commit 1e0f3da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected function get_javascript_init_params($course, cm_info $cm = null, secti
}
$activitysel = [];
if ($course->enablecompletion != 0) {
$currentCmId = $cm ? $cm->id : 0;
$currentcmid = $cm ? $cm->id : 0;
$modinfo = get_fast_modinfo($course);

$s = [];
Expand All @@ -79,7 +79,7 @@ protected function get_javascript_init_params($course, cm_info $cm = null, secti
}
$s['coursemodules'] = [];
foreach ($section as $cmid) {
if ($currentCmId == $cmid) {
if ($currentcmid == $cmid) {
continue;
}
$module = $modinfo->get_cm($cmid);
Expand Down

0 comments on commit 1e0f3da

Please sign in to comment.