Skip to content

Commit

Permalink
Merge pull request #15 from mebis-lp/Fix_up_small_codechecker_complaints
Browse files Browse the repository at this point in the history
Fix small codechecker complaints
  • Loading branch information
PM84 authored Apr 13, 2022
2 parents 4dc6acc + 14c0e3a commit 217c480
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 26 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ Icon by Dunja Speckner
Dragging of SVG elements by Peter Collingridge

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
GNU General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
2 changes: 1 addition & 1 deletion classes/mapworker.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct(string $svgcode, array $placestore) {
global $CFG;
$this->svgcode = $svgcode;
$this->placestore = $placestore;
// This fixes a problem for loading SVG DTD on Windows locally
// This fixes a problem for loading SVG DTD on Windows locally.
if (strcasecmp(substr(PHP_OS, 0, 3), 'WIN') == 0) {
$dtd = '' . new \moodle_url('/mod/learningmap/pix/svg11.dtd');
} else {
Expand Down
18 changes: 9 additions & 9 deletions db/upgrade.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php
// mod_learningmap - A moodle plugin for easy visualization of learning paths
// This file is part of Moodle - https://moodle.org/
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.

/**
* Upgrade functions for mod_learningmap
Expand Down
18 changes: 9 additions & 9 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php
// mod_learningmap - A moodle plugin for easy visualization of learning paths
// This file is part of Moodle - https://moodle.org/
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.

/**
* Index.php for mod_learningmap
Expand Down
5 changes: 4 additions & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

require_once(__DIR__ . '/deprecatedlib.php');

/**
Expand Down Expand Up @@ -185,7 +187,8 @@ function learningmap_cm_info_view(cm_info $cm) : void {
if ($cm->showdescription == 1) {
$cm->set_content(learningmap_get_learningmap($cm), true);
$cm->set_extra_classes('label'); // ToDo: Add extra CSS.
$PAGE->requires->js_call_amd('mod_learningmap/manual-completion-watch', 'init', ['coursemodules' => learningmap_get_place_cm($cm)]);
$PAGE->requires->js_call_amd('mod_learningmap/manual-completion-watch', 'init',
['coursemodules' => learningmap_get_place_cm($cm)]);
}
}

Expand Down

0 comments on commit 217c480

Please sign in to comment.