Skip to content

Commit

Permalink
Codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
eynimeni committed Jul 15, 2024
1 parent 96d73f5 commit d1991b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion classes/booking_option_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@ private function load_sessions_from_db(int $optionid) {
$singlesession->id = 0;
$singlesession->coursestarttime = $this->coursestarttime;
$singlesession->courseendtime = $this->courseendtime;
$singlesession->daystonotify = 0; // We don't take the value from the booking instance anymore, as this led to confusion.
// We don't take the daystonotify value from the booking instance anymore, as this led to confusion.
$singlesession->daystonotify = 0;
$this->sessions[] = $singlesession;
} else {
// Else we have no sessions.
Expand Down
7 changes: 3 additions & 4 deletions classes/local/connectedcourse.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ public static function return_tagged_template_courses() {
|| !has_capability('moodle/backup:backupcourse', $context)
|| !has_capability('moodle/restore:restorecourse', $context)
|| !has_capability('moodle/question:add', $context)
// || !has_capability('moodle/role:assign', $context)
) {
unset($courses[$key]);
}
Expand Down Expand Up @@ -319,11 +318,11 @@ protected static function get_course_records($whereclause, $params) {
*
*/
private static function clean_text($text) {
// Convert the text to lowercase
// Convert the text to lowercase.
$lowertext = strtolower($text);
// Remove all whitespace characters (spaces, tabs, newlines, etc.)
// Remove all whitespace characters (spaces, tabs, newlines, etc.).
$nowhitespacetext = preg_replace('/\s+/', '', $lowertext);
// Remove all non-alphanumeric characters
// Remove all non-alphanumeric characters.
$cleantext = preg_replace('/[^a-z0-9]/', '', $nowhitespacetext);
return $cleantext;
}
Expand Down
2 changes: 1 addition & 1 deletion classes/option/fields/courseid.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public static function instance_form_definition(MoodleQuickForm &$mform, array &
[],
$options);
$mform->hideIf('coursetemplateid', 'chooseorcreatecourse', 'neq', 3);
$mform->addHelpButton('coursetemplateid','createnewmoodlecoursefromtemplate', 'mod_booking');
$mform->addHelpButton('coursetemplateid', 'createnewmoodlecoursefromtemplate', 'mod_booking');
}

/**
Expand Down

0 comments on commit d1991b5

Please sign in to comment.