diff --git a/mod/data/add.php b/mod/data/add.php index 470fe8b2424..a6da935c1a2 100755 --- a/mod/data/add.php +++ b/mod/data/add.php @@ -104,16 +104,12 @@ include('tabs.php'); -/******************************************** - * code to handle form processing * - * add individual data_content * - ********************************************/ - $entrysaved = false; //flag for displaying entry saved msg - - $ignorenames = array('MAX_FILE_SIZE','sesskey','d','rid'); // strings to be ignored in input data +/// Process incoming data for adding/updating records if ($datarecord = data_submitted($CFG->wwwroot.'/mod/data/add.php') and confirm_sesskey()) { + $ignorenames = array('MAX_FILE_SIZE','sesskey','d','rid'); // strings to be ignored in input data + if ($rid) { /// Update some records /// All student edits are marked unapproved by default @@ -200,8 +196,9 @@ } // 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! =) +/// 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); diff --git a/mod/data/field/checkbox/field.class.php b/mod/data/field/checkbox/field.class.php index 81f8f76a01d..d81a986738b 100755 --- a/mod/data/field/checkbox/field.class.php +++ b/mod/data/field/checkbox/field.class.php @@ -30,7 +30,6 @@ class data_field_checkbox extends data_field_base { parent::data_field_base($field, $data); } - function display_add_field($recordid=0) { global $CFG; @@ -41,11 +40,11 @@ class data_field_checkbox extends data_field_base { $content = explode('##', $content); } - $str = '