diff --git a/block_hshcourselist.php b/block_hshcourselist.php index 2c43a94abfa5f8de41010b219ccbfa2e8326ed71..40e304182b2cee894c6cdb74daa7dea17e5efdd5 100644 --- a/block_hshcourselist.php +++ b/block_hshcourselist.php @@ -23,7 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -defined('MOODLE_INTERNAL') || die(); class block_hshcourselist extends block_base { private $globalconf; public function init() { @@ -71,7 +70,12 @@ class block_hshcourselist extends block_base { $anchor = html_writer::tag('a', '', array('name' => 'hshcourselistanchor')); $ordercheckbox = html_writer::empty_tag('input', - array('type' => 'checkbox', 'name' => 'orderbysemestercheckbox', 'id' => 'orderbysemestercheckbox_id', 'checked' => 'true')); + array( + 'type' => 'checkbox', + 'name' => 'orderbysemestercheckbox', + 'id' => 'orderbysemestercheckbox_id', + 'checked' => 'true') + ); $ordercheckbox .= html_writer::start_tag('label', array('for' => 'orderbysemestercheckbox_id')); $ordercheckbox .= get_string('orderbysemester', 'block_hshcourselist'); $ordercheckbox .= html_writer::end_tag('label'); @@ -207,8 +211,8 @@ class block_hshcourselist extends block_base { return $this->content; } - public static function get_courses($search, $blockcontext, $splitterms = false, - $restrictcontext = false, $pagecontext = null, $idsearch, $orderbysemester) { + public static function get_courses($search, $blockcontext, $idsearch, $orderbysemester, $splitterms = false, + $restrictcontext = false, $pagecontext = null) { global $DB; $params = array(SITEID); $keywordarray = explode(" ", $search); @@ -266,4 +270,4 @@ class block_hshcourselist extends block_base { $courses = $DB->get_recordset_select('course', $where, $params, $order, $fields); return $courses; } -} \ No newline at end of file +} diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index 2b36edf8af791fcfb970d12831aacd4173413e1d..8e0e758cc6ccca80a70f2c5198546c7b9076687b 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -25,8 +25,6 @@ namespace block_hshcourselist\privacy; -defined('MOODLE_INTERNAL') || die(); - /** * Privacy Subsystem for block_course_list implementing null_provider. * @@ -44,4 +42,4 @@ class provider implements \core_privacy\local\metadata\null_provider { public static function get_reason() : string { return 'privacy:metadata'; } -} \ No newline at end of file +} diff --git a/db/access.php b/db/access.php index 2386f46c63d8803965e2be18e14594fbebb8bfb2..6fa9c898f91e9d579b9d75e2d0b30ad58d708867 100644 --- a/db/access.php +++ b/db/access.php @@ -22,6 +22,8 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die(); + $capabilities = array( 'block/hshcourselist:myaddinstance' => array( @@ -46,4 +48,4 @@ $capabilities = array( 'clonepermissionsfrom' => 'moodle/site:manageblocks' ), -); \ No newline at end of file +); diff --git a/edit_form.php b/edit_form.php index 806d2052b661b9d42163111e0add2fc8b9e84c62..90dcb91a7e9bcb08760496072d52a7b97225e682 100644 --- a/edit_form.php +++ b/edit_form.php @@ -55,4 +55,4 @@ class block_hshcourselist_edit_form extends block_edit_form { $mform->addElement('text', 'config_footer', get_string('blockfooter', 'block_hshcourselist')); $mform->setType('config_footer', PARAM_RAW); } -} \ No newline at end of file +} diff --git a/hshcourselist.php b/hshcourselist.php index 4c0a0c6b3be163355a348682ea3a142789dbb0ec..597aeb873f626b0ef652c9d6b97e777114436113 100644 --- a/hshcourselist.php +++ b/hshcourselist.php @@ -27,6 +27,7 @@ require_once('../../config.php'); require_once($CFG->dirroot . '/blocks/moodleblock.class.php'); require_once($CFG->dirroot . '/blocks/hshcourselist/block_hshcourselist.php'); +require_login(); $instanceid = required_param('instanceid', PARAM_INT); $context = context_block::instance($instanceid); $course = required_param('course', PARAM_TEXT); @@ -57,4 +58,4 @@ function utf8ize($d) { return utf8_encode($d); } return $d; -} \ No newline at end of file +} diff --git a/lang/en/block_hshcourselist.php b/lang/en/block_hshcourselist.php index 85aa8ac410d73c0b69fb188b285f3b89d8286eda..1d554725ca1e0a58f98343abbefc416e83fc6007 100644 --- a/lang/en/block_hshcourselist.php +++ b/lang/en/block_hshcourselist.php @@ -61,4 +61,4 @@ $string["hsh_search_help"] = 'Die Kurssuche ist eine Volltextsuche in der Sie au Verschiedene Suchbegriffe werden einzeln in den Kursnamen gesucht und dann eine vollständige Liste angezeigt. Bsp: WiSe Programmieren => zeigt Ihnen alle Kurse, dessen Kursname oder Kurskurzname "WiSe" ODER "Programmieren" enthalten. Kurzsuche: Möchten Sie einen Kurs schnell über die "id" finden, so können Sie dies durch das Voranstellen einer Raute "#" erreichen. -Bsp: #3303 zeigt Ihnen den Kurs "Moodle Demo-Kurs, ELC"'; \ No newline at end of file +Bsp: #3303 zeigt Ihnen den Kurs "Moodle Demo-Kurs, ELC"'; diff --git a/version.php b/version.php index cfbba12fafdd0798c754f3f9089f693e1ab46498..d5db790a6fef3a8dda25e833e54f0515044a1b98 100644 --- a/version.php +++ b/version.php @@ -26,6 +26,6 @@ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2022122000; -$plugin->requires = 2022112800.00 ; // Moodle 4.1 +$plugin->requires = 2022112800.00; // Moodle 4.1. $plugin->component = 'block_hshcourselist'; $plugin->release = 'hsh_v4.1.0';