From ad028799280b6a9f58dcfb7e3763d0e286b00480 Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Wed, 13 Dec 2023 12:22:34 +0100 Subject: [PATCH] Bugfixes --- classes/corecompletioninfo.php | 4 +--- classes/form/studyplan_editform.php | 2 +- lang/en/local_treestudyplan.php | 2 ++ lang/nl/local_treestudyplan.php | 2 ++ version.php | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/classes/corecompletioninfo.php b/classes/corecompletioninfo.php index dcb8681..bd7e4ce 100644 --- a/classes/corecompletioninfo.php +++ b/classes/corecompletioninfo.php @@ -353,11 +353,9 @@ class corecompletioninfo { "status" => "", ]; } else if ($type == COMPLETION_CRITERIA_TYPE_ROLE) { - $criteria = $criteria->get_title(); - $details = [ "type" => get_string('manualcompletionby', 'completion'), - "criteria" => $criteria, + "criteria" => $criteria->get_title(), "requirement" => get_string('markedcompleteby', 'completion', $criteria), "status" => "", ]; diff --git a/classes/form/studyplan_editform.php b/classes/form/studyplan_editform.php index 925868d..20919b0 100644 --- a/classes/form/studyplan_editform.php +++ b/classes/form/studyplan_editform.php @@ -52,7 +52,7 @@ class studyplan_editform extends formbase { 'maxbytes' => 10*1024*1024, // Max 10MiB should be sufficient for a picture. 'areamaxbytes' => 10485760, 'maxfiles' => 1, // Just one file - 'accepted_types' => ['.jpg', '.png'], + 'accepted_types' => ['.jpg', '.png', '.jpeg', '.svg', '.svgz'], 'return_types' => FILE_INTERNAL | FILE_EXTERNAL, ]; return $customdata; diff --git a/lang/en/local_treestudyplan.php b/lang/en/local_treestudyplan.php index 8f32273..55cc890 100644 --- a/lang/en/local_treestudyplan.php +++ b/lang/en/local_treestudyplan.php @@ -132,6 +132,8 @@ for ($i=1;$i<=5;$i++) { $string["autocohortsync_name"] = 'Study plan automatic cohort sync cascading'; $string["refreshteacherlist_name"] = "Refresh teacher's study plan list"; +$string["no_form_data"] = "The provided information was incorrect. Likely you uploaded an icon in an unsupported format. Please check your input data and try again."; + $string["studyplan_add"] = 'Add study plan'; $string["studyplan_edit"] = 'Edit study plan'; $string["studyplan_remove"] = 'Remove study plan'; diff --git a/lang/nl/local_treestudyplan.php b/lang/nl/local_treestudyplan.php index 6c3c564..4998c30 100644 --- a/lang/nl/local_treestudyplan.php +++ b/lang/nl/local_treestudyplan.php @@ -132,6 +132,8 @@ for ($i=1;$i<=5;$i++) { $string["autocohortsync_name"] = 'Studyplan automatisch site-group synchronisatie doorzetten'; $string["refreshteacherlist_name"] = "Ververs lijst van studieplannen voor leraar"; +$string["no_form_data"] = "Er is iets misgegaan met de ingevoerde gegevens. Waarschijnlijk heb je een afbeelding ingevoegd in een formaat dat niet ondersteund wordt. Controleer je gegevens en probeer het opnieuw."; + $string["studyplan_add"] = 'Nieuw studieplan'; $string["studyplan_edit"] = 'Studieplan bewerken'; $string["studyplan_remove"] = 'Studieplan verwijderen'; diff --git a/version.php b/version.php index 97ffc28..db0ffd6 100644 --- a/version.php +++ b/version.php @@ -22,7 +22,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'local_treestudyplan'; // Recommended since 2.0.2 (MDL-26035). Required since 3.0 (MDL-48494). -$plugin->version = 2023121300; // YYYYMMDDHH (year, month, day, iteration). +$plugin->version = 2023121302; // YYYYMMDDHH (year, month, day, iteration). $plugin->requires = 2021051700; // YYYYMMDDHH (This is the release version for Moodle 3.11). $plugin->release = "1.1.0";