]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13259 Redirecting to creation of new scale when none exists. Merging from MOODLE_...
authornicolasconnault <nicolasconnault>
Fri, 17 Oct 2008 14:33:05 +0000 (14:33 +0000)
committernicolasconnault <nicolasconnault>
Fri, 17 Oct 2008 14:33:05 +0000 (14:33 +0000)
grade/edit/outcome/edit.php
lang/en_utf8/grades.php

index a8bbe7a5263a4e223fac10d05363b54255824add..1e6b9f2c8eb0d28fa852ba404b46c606194f3b0e 100644 (file)
@@ -133,6 +133,12 @@ if ($courseid) {
     admin_externalpage_print_header();
 }
 
+if (!grade_scale::fetch_all_local($courseid) && !grade_scale::fetch_all_global()) {
+    notice_yesno(get_string('noscales', 'grades'), $CFG->wwwroot.'/grade/edit/scale/edit.php?courseid='.$courseid, $returnurl);
+    print_footer($course);
+    die();
+}
+
 $mform->display();
 
 if ($courseid) {
index 64e85395e19f6478b4a92a17b7a61f07b2784125..b72a3a56f3948248f2e52a3f1a367bdf9e600035 100644 (file)
@@ -349,6 +349,7 @@ $string['nonweightedpct'] = 'non-weighted %%';
 $string['nooutcome'] = 'No outcome';
 $string['nooutcomes'] = 'Outcome items must be linked to a course outcome, but there are no outcomes for this course. Would you like to add one?';
 $string['nopublish'] = 'Do not publish';
+$string['noscales'] = 'Outcomes must be linked to a course scale or global scale, but there are none. Would you like to add one?';
 $string['noselectedcategories'] = 'no categories were selected.';
 $string['noselecteditems'] = 'no items were selected.';
 $string['notteachererror'] = 'You must be a teacher to use this feature.';