From a1e3e9894b4875a6f3a207573a2c29b8c6a10617 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Mon, 15 May 2006 02:03:03 +0000 Subject: [PATCH] merged fix for 5465 --- mod/data/edit.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/mod/data/edit.php b/mod/data/edit.php index 40fc404ef2..81126d9228 100755 --- a/mod/data/edit.php +++ b/mod/data/edit.php @@ -166,7 +166,16 @@ redirect($CFG->wwwroot.'/mod/data/view.php?d='.$data->id.'&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! @@ -222,16 +231,6 @@ } } } // 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 -- 2.39.5