]> git.mjollnir.org Git - moodle.git/commitdiff
validation should not watch out for teacher and students string anymore
authortoyomoyo <toyomoyo>
Mon, 18 Sep 2006 09:16:49 +0000 (09:16 +0000)
committertoyomoyo <toyomoyo>
Mon, 18 Sep 2006 09:16:49 +0000 (09:16 +0000)
course/edit.php

index 1a04be17af634fc9725628fc8ba002a3cffca48a..14fce41f01de51f1acc935b6459b4ee4cd83e550 100644 (file)
                     } else {         // Add current teacher and send to course
 
                         // find a role with legacy:edittingteacher
-                        
                         if ($teacherroles = get_roles_with_capability('moodle/legacy:editingteacher', CAP_ALLOW, $context)) {
                             // assign the role to this user
                             $teachereditrole = array_shift($teacherroles);
@@ -306,11 +305,11 @@ function validate_form($course, &$form, &$err) {
     if (empty($form->summary))
         $err["summary"] = get_string("missingsummary");
 
-    if (empty($form->teacher))
-        $err["teacher"] = get_string("missingteacher");
+    //if (empty($form->teacher))
+    //    $err["teacher"] = get_string("missingteacher");
 
-    if (empty($form->student))
-        $err["student"] = get_string("missingstudent");
+    //if (empty($form->student))
+    //    $err["student"] = get_string("missingstudent");
 
     if (! $form->category)
         $err["category"] = get_string("missingcategory");