Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 3a611d5

Browse files
author
mkocagoel
committed
bugfixing selfenrollments
1 parent 0f20485 commit 3a611d5

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

lbplanner/classes/helpers/course_helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static function check_access($courseid, $userid) : bool {
132132
global $DB;
133133
$enrolmentids = $DB->get_records(self::ENROL_TABLE, array('courseid' => $courseid), '', 'id');
134134
foreach ($enrolmentids as $enrolmentid) {
135-
if ($DB->record_exists(self::USER_ENROL_TABLE, array('enrolid' => $enrolmentid, 'userid' => $userid))) {
135+
if ($DB->record_exists(self::USER_ENROL_TABLE, array('enrolid' => $enrolmentid->id, 'userid' => $userid))) {
136136
return true;
137137
}
138138
}

lbplanner/classes/helpers/user_helper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ public static function get_mdl_user_info(int $userid):stdClass {
112112
*/
113113
public static function assert_access(int $userid) {
114114
global $USER;
115-
;
116115
if ($USER->id != $userid) {
117116
throw new \moodle_exception('Access denied');
118117
}

lbplanner/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020

2121
$plugin->component = 'local_lbplanner';
2222
$plugin->release = 'Alpha v.'.$release;
23-
$plugin->version = 2022100103;
23+
$plugin->version = 2022120800;
2424

2525
set_config('release', $release, 'local_lbplanner');

0 commit comments

Comments
 (0)