Code checking -

This commit is contained in:
PMKuipers 2024-06-02 18:47:23 +02:00
parent ebdb39c5ca
commit 4c669ff08c
32 changed files with 84 additions and 11993 deletions

11912
amd/build/vue/vue.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -76,7 +76,7 @@ if ($_POST["action"] == "update") {
} }
} else { } else {
$scalecfg = (object)[ "scale_id" => $scale->id, ]; $scalecfg = (object)[ "scale_id" => $scale->id];
$requireinsert = false; $requireinsert = false;
foreach (["min_progress", "min_completed"] as $handle) { foreach (["min_progress", "min_completed"] as $handle) {
$key = "s_{$scale->id}_{$handle}"; $key = "s_{$scale->id}_{$handle}";
@ -154,8 +154,8 @@ foreach ($scales as $scale) {
$scalecfg = $scalecfgs[$scale->id]; $scalecfg = $scalecfgs[$scale->id];
} }
$attrsc = ['value' => '', 'disabled' => 'disabled', ]; $attrsc = ['value' => '', 'disabled' => 'disabled'];
$attrsp = ['value' => '', 'disabled' => 'disabled', ]; $attrsp = ['value' => '', 'disabled' => 'disabled'];
if (!isset($scalecfg) || $scalecfg->min_completed == "") { if (!isset($scalecfg) || $scalecfg->min_completed == "") {
$attrsc["selected"] = "selected"; $attrsc["selected"] = "selected";
@ -198,7 +198,7 @@ foreach ($scales as $scale) {
$data[] = $row; $data[] = $row;
} }
print html_writer::start_tag("form", ["method" => "post", ]); print html_writer::start_tag("form", ["method" => "post"]);
print html_writer::tag("input", null, ['name' => "action", 'value' => 'update', 'type' => 'hidden']); print html_writer::tag("input", null, ['name' => "action", 'value' => 'update', 'type' => 'hidden']);
$table = new html_table(); $table = new html_table();
@ -227,7 +227,7 @@ foreach ($gradecfgs as $g) {
'autocomplete' => 'off']); 'autocomplete' => 'off']);
$row[] = html_writer::tag("input", $row[] = html_writer::tag("input",
null, null,
['name' => "g_{$g->grade_points}_delete", 'type' => 'checkbox', ]); ['name' => "g_{$g->grade_points}_delete", 'type' => 'checkbox']);
$data[] = $row; $data[] = $row;
} }

View file

@ -23,7 +23,7 @@
namespace local_treestudyplan; namespace local_treestudyplan;
use moodle_exception; use moodle_exception;
use \ValueError; use ValueError;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();

View file

@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/externallib.php'); require_once($CFG->libdir.'/externallib.php');
use award_criteria; use award_criteria;
use \core_badges\badge; use core_badges\badge;
use moodle_url; use moodle_url;
/** /**

View file

@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/externallib.php'); require_once($CFG->libdir.'/externallib.php');
use \local_treestudyplan\studyplan; use local_treestudyplan\studyplan;
/** /**
* Task class to synchronize enrolled cohorts in courses with cohorts associated with studyplans these courses are in * Task class to synchronize enrolled cohorts in courses with cohorts associated with studyplans these courses are in

View file

@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/externallib.php'); require_once($CFG->libdir.'/externallib.php');
use \local_treestudyplan\studyplan; use local_treestudyplan\studyplan;
/** /**
* Task class to synchronize enrolled users in courses with users associated with studyplans these courses are in * Task class to synchronize enrolled users in courses with users associated with studyplans these courses are in

View file

@ -25,8 +25,8 @@ defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/externallib.php'); require_once($CFG->libdir.'/externallib.php');
use \grade_item; use grade_item;
use \completion_criteria; use completion_criteria;
/** /**
* Scan course completion criteria for pending grading actions * Scan course completion criteria for pending grading actions

View file

@ -21,7 +21,7 @@
*/ */
namespace local_treestudyplan; namespace local_treestudyplan;
use \context; use context;
/** /**
* Class to abstract information about (category) context for web service export * Class to abstract information about (category) context for web service export

View file

@ -30,9 +30,9 @@ require_once($CFG->dirroot.'/course/lib.php');
use core\check\performance\debugging; use core\check\performance\debugging;
use core_course\local\repository\caching_content_item_readonly_repository; use core_course\local\repository\caching_content_item_readonly_repository;
use core_course\local\repository\content_item_readonly_repository; use core_course\local\repository\content_item_readonly_repository;
use \grade_item; use grade_item;
use \grade_scale; use grade_scale;
use \grade_outcome; use grade_outcome;
/** /**
* Class to collect course completion info for a given course * Class to collect course completion info for a given course

View file

@ -29,9 +29,9 @@ require_once($CFG->dirroot.'/course/lib.php');
use core_course\local\repository\caching_content_item_readonly_repository; use core_course\local\repository\caching_content_item_readonly_repository;
use core_course\local\repository\content_item_readonly_repository; use core_course\local\repository\content_item_readonly_repository;
use \grade_item; use grade_item;
use \grade_scale; use grade_scale;
use \grade_outcome; use grade_outcome;
/** /**
* Class to process information about a course * Class to process information about a course

View file

@ -25,13 +25,13 @@ defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/externallib.php'); require_once($CFG->libdir.'/externallib.php');
use \local_treestudyplan\courseinfo; use local_treestudyplan\courseinfo;
use \local_treestudyplan\associationservice; use local_treestudyplan\associationservice;
use \local_treestudyplan\local\helpers\webservicehelper; use local_treestudyplan\local\helpers\webservicehelper;
use \local_treestudyplan\completionscanner; use local_treestudyplan\completionscanner;
use \local_treestudyplan\gradingscanner; use local_treestudyplan\gradingscanner;
use \local_treestudyplan\debug; use local_treestudyplan\debug;
use \core_course_category; use core_course_category;
use moodle_exception; use moodle_exception;
/** /**

View file

@ -30,10 +30,10 @@ require_once($CFG->dirroot.'/course/lib.php');
use core_course\local\repository\caching_content_item_readonly_repository; use core_course\local\repository\caching_content_item_readonly_repository;
use core_course\local\repository\content_item_readonly_repository; use core_course\local\repository\content_item_readonly_repository;
use core_course\local\entity\content_item; use core_course\local\entity\content_item;
use \grade_item; use grade_item;
use \grade_scale; use grade_scale;
use \grade_outcome; use grade_outcome;
use \core_plugin_manager; use core_plugin_manager;
/** /**
* Collect, process and display information about gradable items * Collect, process and display information about gradable items
*/ */

View file

@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/externallib.php'); require_once($CFG->libdir.'/externallib.php');
use \grade_item; use grade_item;
/** /**
* Scan gradables for a pending grading action * Scan gradables for a pending grading action

View file

@ -22,10 +22,10 @@
namespace local_treestudyplan\local\aggregators; namespace local_treestudyplan\local\aggregators;
use \local_treestudyplan\courseinfo; use local_treestudyplan\courseinfo;
use \local_treestudyplan\gradeinfo; use local_treestudyplan\gradeinfo;
use \local_treestudyplan\studyitem; use local_treestudyplan\studyitem;
use \local_treestudyplan\completion; use local_treestudyplan\completion;
/** /**
* Aggregate course results based on failed/completed states for grades * Aggregate course results based on failed/completed states for grades

View file

@ -24,10 +24,10 @@ namespace local_treestudyplan\local\aggregators;
use core_competency\api as c_api; use core_competency\api as c_api;
use \local_treestudyplan\courseinfo; use local_treestudyplan\courseinfo;
use \local_treestudyplan\gradeinfo; use local_treestudyplan\gradeinfo;
use \local_treestudyplan\studyitem; use local_treestudyplan\studyitem;
use \local_treestudyplan\completion; use local_treestudyplan\completion;
use local_treestudyplan\coursecompetencyinfo; use local_treestudyplan\coursecompetencyinfo;
/** /**

View file

@ -22,11 +22,11 @@
namespace local_treestudyplan\local\aggregators; namespace local_treestudyplan\local\aggregators;
use \local_treestudyplan\courseinfo; use local_treestudyplan\courseinfo;
use \local_treestudyplan\corecompletioninfo; use local_treestudyplan\corecompletioninfo;
use \local_treestudyplan\gradeinfo; use local_treestudyplan\gradeinfo;
use \local_treestudyplan\studyitem; use local_treestudyplan\studyitem;
use \local_treestudyplan\completion; use local_treestudyplan\completion;
/** /**
* Aggregate course results with moodle course completion * Aggregate course results with moodle course completion

View file

@ -22,10 +22,10 @@
namespace local_treestudyplan\local\aggregators; namespace local_treestudyplan\local\aggregators;
use \local_treestudyplan\courseinfo; use local_treestudyplan\courseinfo;
use \local_treestudyplan\gradeinfo; use local_treestudyplan\gradeinfo;
use \local_treestudyplan\studyitem; use local_treestudyplan\studyitem;
use \local_treestudyplan\completion; use local_treestudyplan\completion;
/** /**
* Aggregate course results based on failed, achieved, completed states for grades * Aggregate course results based on failed, achieved, completed states for grades

View file

@ -21,7 +21,7 @@
*/ */
namespace local_treestudyplan\local\helpers; namespace local_treestudyplan\local\helpers;
use \core_course_category; use core_course_category;
use local_treestudyplan\courseservice; use local_treestudyplan\courseservice;
use local_treestudyplan\debug; use local_treestudyplan\debug;

View file

@ -22,7 +22,7 @@
namespace local_treestudyplan\local\ungradedscanners; namespace local_treestudyplan\local\ungradedscanners;
use \grade_item; use grade_item;
/** /**
* Base class for activity scanners * Base class for activity scanners

View file

@ -22,17 +22,17 @@
namespace local_treestudyplan\privacy; namespace local_treestudyplan\privacy;
use \core_privacy\local\metadata\collection; use core_privacy\local\metadata\collection;
use \core_privacy\local\request\userlist; use core_privacy\local\request\userlist;
use \core_privacy\local\request\contextlist; use core_privacy\local\request\contextlist;
use \core_privacy\local\request\approved_contextlist; use core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\approved_userlist; use core_privacy\local\request\approved_userlist;
use \core_privacy\local\request\deletion_criteria; use core_privacy\local\request\deletion_criteria;
use \core_privacy\local\request\writer; use core_privacy\local\request\writer;
use \core_privacy\local\request\helper; use core_privacy\local\request\helper;
use \core_privacy\local\request\transform; use core_privacy\local\request\transform;
use \tool_dataprivacy\context_instance; use tool_dataprivacy\context_instance;
use \context; use context;
/** /**
* Privacy provider * Privacy provider

View file

@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/externallib.php'); require_once($CFG->libdir.'/externallib.php');
use \local_treestudyplan\local\helpers\webservicehelper; use local_treestudyplan\local\helpers\webservicehelper;
use local_treestudyplan\task\autocohortsync; use local_treestudyplan\task\autocohortsync;
require_once($CFG->libdir.'/badgeslib.php'); require_once($CFG->libdir.'/badgeslib.php');

View file

@ -25,7 +25,7 @@ namespace local_treestudyplan;
define('CLI_SCRIPT', true); define('CLI_SCRIPT', true);
require(__DIR__ . '/../../../config.php'); require(__DIR__ . '/../../../config.php');
require_once($CFG->libdir . '/clilib.php'); require_once($CFG->libdir . '/clilib.php');
use \core_badges\badge; use core_badges\badge;
use local_treestudyplan\local\randomimage; use local_treestudyplan\local\randomimage;
require_once($CFG->libdir.'/badgeslib.php'); require_once($CFG->libdir.'/badgeslib.php');

View file

@ -22,7 +22,7 @@
namespace local_treestudyplan; namespace local_treestudyplan;
use \local_treestudyplan\local\gradegenerator; use local_treestudyplan\local\gradegenerator;
define('CLI_SCRIPT', true); define('CLI_SCRIPT', true);
require(__DIR__ . '/../../../config.php'); require(__DIR__ . '/../../../config.php');

View file

@ -22,7 +22,7 @@
namespace local_treestudyplan; namespace local_treestudyplan;
use \local_treestudyplan\local\gradegenerator; use local_treestudyplan\local\gradegenerator;
define('CLI_SCRIPT', true); define('CLI_SCRIPT', true);
require(__DIR__ . '/../../../config.php'); require(__DIR__ . '/../../../config.php');

View file

@ -22,7 +22,7 @@
require_once("../../config.php"); require_once("../../config.php");
use \local_treestudyplan\premium; use local_treestudyplan\premium;
require_once($CFG->libdir.'/weblib.php'); require_once($CFG->libdir.'/weblib.php');

View file

@ -24,10 +24,10 @@ require_once("../../config.php");
require_once($CFG->libdir.'/weblib.php'); require_once($CFG->libdir.'/weblib.php');
use \local_treestudyplan\contextinfo; use local_treestudyplan\contextinfo;
use \local_treestudyplan\studyplan; use local_treestudyplan\studyplan;
use \local_treestudyplan\courseservice; use local_treestudyplan\courseservice;
use \local_treestudyplan\debug; use local_treestudyplan\debug;
$systemcontext = context_system::instance(); $systemcontext = context_system::instance();

View file

@ -488,10 +488,9 @@ $string["setting_premium_heading"] = 'Premium features';
$string["settingdesc_premium_heading"] = 'To access premium features, you need a registration key. $string["settingdesc_premium_heading"] = 'To access premium features, you need a registration key.
<br>Premium features include: <br>Premium features include:
<ul> <ul>
<li>Creating more than 5 studyplans per category</li> <li>Overview of grades for all students in a studyplan.</li>
<li>Creating studyplans in more than 20 categories</li> <li>Rows in a studyplan which a student can choose to unlock.</li>
<li>Overview of grades for all students in a studyplan</li> <li>Coach role, which allows a linked coach to follow student progress and limited options to make changes to the studyplan content.</li>
<li>Rows in a studyplan which a student can choose to unlock</li>
</ul>'; </ul>';
$string["setting_premium_status"] = 'Current premium status'; $string["setting_premium_status"] = 'Current premium status';
$string["setting_premium_key"] = 'Activation key'; $string["setting_premium_key"] = 'Activation key';

View file

@ -490,10 +490,9 @@ $string["setting_premium_heading"] = 'Premium features';
$string["settingdesc_premium_heading"] = 'Voor premium toegang is een activeringssleutel vereist. $string["settingdesc_premium_heading"] = 'Voor premium toegang is een activeringssleutel vereist.
<br>Premium toegang bevat onder andere: <br>Premium toegang bevat onder andere:
<ul> <ul>
<li>Meer dan 5 studieplannen per categorie aan kunnen maken</li> <li>Overzichtsrapport van alle resultaten van studenten in een studieplan.</li>
<li>In meer dan 20 categorieën studieplannen kunnen aanmaken</li> <li>Leerlijnen die student kan ontsluiten.</li>
<li>Overzichtsrapport van alle resultaten van studenten in een studieplan</li> <li>Coach rol, waarbij een coach gekoppeld kan worden aan een studieplan, de voortgang van studenten hierin kan volgen en de inhoud hiervan beperkt kan aanpassen.</li>
<li>Leerlijnen die student kan ontsluiten</li>
</ul>'; </ul>';
$string["setting_premium_status"] = 'Premium status'; $string["setting_premium_status"] = 'Premium status';
$string["setting_premium_key"] = 'Activatiesleutel'; $string["setting_premium_key"] = 'Activatiesleutel';

View file

@ -25,7 +25,7 @@
use local_treestudyplan\local\helpers\webservicehelper; use local_treestudyplan\local\helpers\webservicehelper;
use local_treestudyplan\premium; use local_treestudyplan\premium;
use \local_treestudyplan\studyplan; use local_treestudyplan\studyplan;
use local_treestudyplan\studyplanpage; use local_treestudyplan\studyplanpage;
/** /**

View file

@ -23,10 +23,10 @@
require_once("../../config.php"); require_once("../../config.php");
use local_treestudyplan\contextinfo; use local_treestudyplan\contextinfo;
use \local_treestudyplan\courseservice; use local_treestudyplan\courseservice;
use \local_treestudyplan\studyplan; use local_treestudyplan\studyplan;
use \local_treestudyplan\studyplanpage; use local_treestudyplan\studyplanpage;
use \local_treestudyplan\premium; use local_treestudyplan\premium;
require_once($CFG->libdir.'/weblib.php'); require_once($CFG->libdir.'/weblib.php');

View file

@ -23,7 +23,7 @@
require_once("../../config.php"); require_once("../../config.php");
use local_treestudyplan\contextinfo; use local_treestudyplan\contextinfo;
use \local_treestudyplan\courseservice; use local_treestudyplan\courseservice;
require_once($CFG->libdir.'/weblib.php'); require_once($CFG->libdir.'/weblib.php');