Fix: Exception was thrown during install when db was not yet created

Added Dutch translation
This commit is contained in:
pmk 2018-09-24 12:21:55 +02:00
parent 0ca88959be
commit 2dca35341d
3 changed files with 61 additions and 9 deletions

View File

@ -127,17 +127,19 @@ class block_gradelevel_levelset {
{
global $DB;
// FIXME: Make this more efficient by joining it into one sql statement.
$records = $DB->get_records('block_gradelevel_course_link', array('course_id' => $course_id));
if(count($records) > 0)
{
$levelset = $DB->get_record('block_gradelevel_levelset', array('id' => array_values($records)[0]->levelset_id));
if($levelset)
try {
// FIXME: Make this more efficient by joining it into one sql statement.
$records = $DB->get_records('block_gradelevel_course_link', array('course_id' => $course_id));
if(count($records) > 0)
{
return new static($levelset->id,$levelset);
$levelset = $DB->get_record('block_gradelevel_levelset', array('id' => array_values($records)[0]->levelset_id));
if($levelset)
{
return new static($levelset->id,$levelset);
}
}
}
catch(Exception $x){} // catch error if table does not (yet exist)
return null; // return null if no current levelset linked
}

View File

@ -0,0 +1,50 @@
<?php
$string['pluginname'] = 'Cijferniveaus';
$string['gradelevel'] = 'GradeLevel';
$string['title'] = 'Voortgang Level';
$string['gradelevel:addinstance'] = 'Voeg een GradeLevel block toe';
$string['gradelevel:myaddinstance'] = 'Voeg een GradeLevel block aan mijn moodle toe';
$string['blockstring'] = 'Tekst in het blok';
$string['levelup_at'] = 'Voortgang: ';
$string['levelup_done'] = 'Klaar';
$string['unattached_course'] = 'Koppel deze cursus aan een skill in de eigenschappen van het blok.';
$string['teacher_view_results'] = 'Bekijk resultaten studenten';
$string['edit_pickskill'] = "Koppelen aan skill";
$string['edit_noneskill'] = "Geen";
$string['cfgpage_generic'] = "GradeLevel instellingen";
$string['cfgpage_globallevels'] = "Standaard levels";
$string['cfgpage_skilllevels'] = "Levels aanpassen";
$string['cfgpage_skills'] = "Skills beheren";
$string['cfgpage_editskill'] = "Skill aanpassen";
$string['results_heading'] = "Resultaten voor ";
$string['results_ungrouped'] = "Overig";
$string['descconfig'] = "Instellingen voor GradeLevel blok";
$string['labeltitle'] = "Titel van het gradelevel blok";
$string['desctitle'] = "De titel van het blok in de cursus";
$string['labelshowtitle'] = "Laat titelbalk in het blok zien";
$string['descshowtitle'] = "Geef aan of wel of niet de titel van het blok moet worden getoond";
$string['levelcfg_description'] = "Levels worden na opslaan gesorteerd op punten. Laat aantel punten leeg om een level te verwijderen";
$string['levelcfg_head_points'] = "Punten";
$string['levelcfg_head_color'] = "Badgekleur";
$string['levelcfg_addlevel'] = "Level toevoegen";
$string['tooltip_editicon'] = "Icoon aanpassen";
$string['tooltip_editname'] = "Naam aanpassen";
$string['tooltip_deleteskill'] = "Skill verwijderen";
$string['tooltip_deleteskill_disabled'] = "Skill kan niet worden verwijderd, omdat er cursussen aan gekoppeld zijn.";
$string['defaults_name'] = "Nieuwe skill";
$string['cfg_resetlevels'] = "Reset levels naar standaard";
$string['cfg_addskill'] = "Skill toevoegen";
$string['title_confirmdelete'] = "Bevestig verwijderen";
$string['dialog_confirmdeleteskill'] = "Week je zeker dat je deze skill witl verwijderen?";
//$string[''] = "";

View File

@ -1,4 +1,4 @@
<?php
$plugin->component = 'block_gradelevel'; // Recommended since 2.0.2 (MDL-26035). Required since 3.0 (MDL-48494)
$plugin->version = 2018092300; // YYYYMMDDHH (year, month, day, 24-hr time)
$plugin->version = 2018092400; // YYYYMMDDHH (year, month, day, 24-hr time)
$plugin->requires = 2018050800; // YYYYMMDDHH (This is the release version for Moodle 3.5)