]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12141, category names should be mandatory
authortoyomoyo <toyomoyo>
Tue, 13 Nov 2007 02:53:18 +0000 (02:53 +0000)
committertoyomoyo <toyomoyo>
Tue, 13 Nov 2007 02:53:18 +0000 (02:53 +0000)
grade/edit/tree/category_form.php

index 4c7861de9afa5a03cc34f2a4a8ac2f8d989da1b0..ceb14a8706f67df042c56fb63c4ad6c37a06bb82 100644 (file)
@@ -42,7 +42,8 @@ class edit_category_form extends moodleform {
         // visible elements
         $mform->addElement('header', 'gradecat', get_string('gradecategory', 'grades'));
         $mform->addElement('text', 'fullname', get_string('categoryname', 'grades'));
-
+        $mform->addRule('fullname', null, 'required', null, 'client');
+        
         $mform->addElement('select', 'aggregation', get_string('aggregation', 'grades'), $options);
         $mform->setHelpButton('aggregation', array('aggregation', get_string('aggregation', 'grades'), 'grade'));