Skip to content
Snippets Groups Projects
Commit de7a95ab authored by Elke Kreim's avatar Elke Kreim
Browse files

Clean code according to code checker

parent f4c315bb
Branches
Tags
No related merge requests found
......@@ -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);
......
......@@ -25,8 +25,6 @@
namespace block_hshcourselist\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for block_course_list implementing null_provider.
*
......
......@@ -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(
......
......@@ -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);
......
......@@ -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';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment