Skip to content

Commit d830217

Browse files
committed
Fix some phpcs issues phpcbf could not fix automatically
1 parent 1571e31 commit d830217

File tree

9 files changed

+42
-9
lines changed

9 files changed

+42
-9
lines changed

addcourse.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17+
/**
18+
* Link another course for evaluation with this Moodle course
19+
*
20+
* @package block_evasys_sync
21+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22+
*/
23+
1724
require_once('../../config.php');
1825
$id = required_param('id', PARAM_INT);
1926

@@ -30,7 +37,7 @@
3037
echo get_string('forbidden', 'block_evasys_sync');
3138
echo $OUTPUT->footer();
3239
return;
33-
} else if(!array_key_exists('lsf_unification', core_plugin_manager::instance()->get_plugins_of_type('local'))){
40+
} else if (!array_key_exists('lsf_unification', core_plugin_manager::instance()->get_plugins_of_type('local'))) {
3441
echo $OUTPUT->header();
3542
throw new \moodle_exception('nohisconnection_error', 'block_evasys_sync');
3643
echo $OUTPUT->footer();
@@ -76,7 +83,9 @@
7683
// Once retrieve the teachers course list in order to search for its values later.
7784
$coursesofteacher = get_teachers_course_list($USER->username, false, true);
7885

79-
// Add all courses that were already mapped prior to the current change (even if the logged in user does not own these courses herself).
86+
// Add all courses that were already mapped prior to the current
87+
// change (even if the logged in user does not own these courses
88+
// herself).
8089
foreach ($preexistingmappings as $veranstid) {
8190
$iscourseofteacher = !empty($coursesofteacher[$veranstid]);
8291
if (!$iscourseofteacher && !is_siteadmin()) {

alterstandardtime.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17+
/**
18+
* @package block_evasys_sync
19+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
20+
*/
21+
1722
require_once('../../config.php');
1823

1924
require_login();

block_evasys_sync.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17-
defined('MOODLE_INTERNAL') || die();
17+
/**
18+
* @package block_evasys_sync
19+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
20+
*/
1821

1922
class block_evasys_sync extends block_base {
2023

@@ -252,4 +255,3 @@ public function has_config() {
252255
return true;
253256
}
254257
}
255-

coursesearch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
}
105105
$queuedtasks = \core\task\manager::get_adhoc_tasks(evasys_bulk_task::class);
106106
$tasksofcurrentmodule = array_filter($queuedtasks, fn($task) => $task->get_custom_data()->categoryid === $id);
107-
if(empty($tasksofcurrentmodule)){
107+
if (empty($tasksofcurrentmodule)) {
108108
$task = new evasys_bulk_task();
109109
$data = new stdClass();
110110
$data->courses = (array) $courses;

managecategory_manual.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
$courses = required_param_array('ids', PARAM_INT);
5353
$queuedtasks = \core\task\manager::get_adhoc_tasks(evasys_bulk_task::class);
5454
$tasksofcurrentmodule = array_filter($queuedtasks, fn($task) => $task->get_custom_data()->categoryid === $id);
55-
if(empty($tasksofcurrentmodule)){
55+
if (empty($tasksofcurrentmodule)) {
5656
$task = new evasys_bulk_task();
5757
$data = new stdClass();
5858
$data->courses = $courses;

managecategory_remaining.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767
$queuedtasks = \core\task\manager::get_adhoc_tasks(evasys_bulk_task::class);
6868
$tasksofcurrentmodule = array_filter($queuedtasks, fn($task) => $task->get_custom_data()->categoryid === $id);
69-
if(empty($tasksofcurrentmodule)){
69+
if (empty($tasksofcurrentmodule)) {
7070
$task = new evasys_bulk_task();
7171
$data = new stdClass();
7272
$data->courses = $courses;
@@ -122,7 +122,7 @@
122122

123123
$mform->display();
124124

125-
if(!empty($tasksofcurrentmodule)){
125+
if (!empty($tasksofcurrentmodule)) {
126126
$category = \core_course_category::get($id);
127127
\core\notification::warning(get_string("running_crontask", "block_evasys_sync", $category->name));
128128
}

settings.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17+
/**
18+
* @package block_evasys_sync
19+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
20+
*/
21+
1722
defined('MOODLE_INTERNAL') || die;
1823

1924
if ($hassiteconfig) { // Needs this condition or there is error on login page.

sync.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17+
/**
18+
* @package block_evasys_sync
19+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
20+
*/
21+
1722
use block_evasys_sync\course_evaluation_allocation;
1823
use block_evasys_sync\date_decoder;
1924

@@ -36,7 +41,7 @@
3641
if (!optional_param('activate_standard', false, PARAM_BOOL)) {
3742

3843
if (optional_param('datedisabled', false, PARAM_BOOL)) {
39-
// We already have an evaluation request for this course: fetch the start- and enddates
44+
// We already have an evaluation request for this course: fetch the start- and enddates.
4045
$sql = 'SELECT v.id, v.starttime, v.endtime, max(v.timemodified) as time FROM {' . \block_evasys_sync\dbtables::EVAL_VERANSTS . '} v INNER JOIN ' .
4146
'{' . \block_evasys_sync\dbtables::EVAL_COURSES . '} c on v.evalid=c.evalid WHERE c.courseid = :courseid GROUP BY v.id, v.starttime ORDER BY time DESC';
4247
$record = $DB->get_record_sql($sql, ['courseid' => $courseid]);

version.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17+
/**
18+
* Version information for this plugin.
19+
*
20+
* @package block_evasys_sync
21+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22+
*/
23+
1724
defined('MOODLE_INTERNAL') || die();
1825

1926
$plugin->component = 'block_evasys_sync';

0 commit comments

Comments
 (0)