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

Commit

Permalink
bugfixing selfenrollments
Browse files Browse the repository at this point in the history
  • Loading branch information
mkocagoel committed Dec 8, 2022
1 parent 0f20485 commit 3a611d5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lbplanner/classes/helpers/course_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public static function check_access($courseid, $userid) : bool {
global $DB;
$enrolmentids = $DB->get_records(self::ENROL_TABLE, array('courseid' => $courseid), '', 'id');
foreach ($enrolmentids as $enrolmentid) {
if ($DB->record_exists(self::USER_ENROL_TABLE, array('enrolid' => $enrolmentid, 'userid' => $userid))) {
if ($DB->record_exists(self::USER_ENROL_TABLE, array('enrolid' => $enrolmentid->id, 'userid' => $userid))) {
return true;
}
}
Expand Down
1 change: 0 additions & 1 deletion lbplanner/classes/helpers/user_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ public static function get_mdl_user_info(int $userid):stdClass {
*/
public static function assert_access(int $userid) {
global $USER;
;
if ($USER->id != $userid) {
throw new \moodle_exception('Access denied');
}
Expand Down
2 changes: 1 addition & 1 deletion lbplanner/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@

$plugin->component = 'local_lbplanner';
$plugin->release = 'Alpha v.'.$release;
$plugin->version = 2022100103;
$plugin->version = 2022120800;

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

0 comments on commit 3a611d5

Please sign in to comment.