]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for 5465
authortoyomoyo <toyomoyo>
Mon, 15 May 2006 02:03:03 +0000 (02:03 +0000)
committertoyomoyo <toyomoyo>
Mon, 15 May 2006 02:03:03 +0000 (02:03 +0000)
mod/data/edit.php

index 40fc404ef2de8d5490a949f0250d99202146f8aa..81126d9228e33a35cf3d322e3e80dceb7bb23ff6 100755 (executable)
 
             redirect($CFG->wwwroot.'/mod/data/view.php?d='.$data->id.'&amp;rid='.$rid);
 
-        } else {                                             /// Add some new records
+        } else { /// Add some new records
+        
+        /// Check if maximum number of entry as specified by this database is reached
+        /// Of course, you can't be stopped if you are an editting teacher! =)
+
+            if (data_atmaxentries($data) and !isteacheredit($course->id)){
+                notify (get_string('atmaxentry','data'));
+                print_footer($course);
+                exit;
+            }
 
             ///Empty form checking - you can't submit an empty form!
 
             }
         }
     }  // End of form processing
-   
-
-/// Check if maximum number of entry as specified by this database is reached
-/// Of course, you can't be stopped if you are an editting teacher! =)
-
-    if (data_atmaxentries($data) and !isteacheredit($course->id)){
-        notify (get_string('atmaxentry','data'));
-        print_footer($course);
-        exit;
-    }
 
     /// Print the browsing interface