//the main-check is in view.php $evaluation_can_submit = true; if ($evaluation->multiple_submit == 0) { if (evaluation_is_already_submitted($evaluation->id, $classid)) { $evaluation_can_submit = false; } } if ($evaluation_can_submit) { //preserving the items if ($preservevalues == 1) { if (!isset($SESSION->evaluation->is_started) OR ! $SESSION->evaluation->is_started == true) { print_error('error', '', $CFG->wwwroot . '/class/view.php?id=' . $classid); } //checken, ob alle required items einen wert haben if (evaluation_check_values($startitempos, $lastitempos)) { if ($completedid = evaluation_save_values($userid, true,$trainee_id)) { if ($userid > 0) { add_to_log($classid, 'evaluation', 'startcomplete', 'view.php?id=' . $cm->id, $evaluation->id, $classid, $userid); } if (!$gonextpage AND ! $gopreviouspage) { $preservevalues = false; //es kann gespeichert werden } } else { $savereturn = 'failed'; if (isset($lastpage)) { $gopage = $lastpage; } else { print_error('missingparameter'); } } } else {
$evaluation_can_submit = true; if ($evaluation->multiple_submit == 0) { if (evaluation_is_already_submitted($evaluation->id, $classid)) { $evaluation_can_submit = false; } } if ($evaluation_can_submit) { //preserving the items if ($preservevalues == 1) { if (!isset($SESSION->evaluation->is_started) OR ! $SESSION->evaluation->is_started == true) { print_error('error', '', $CFG->wwwroot . '/class/view.php?id=' . $classid); } //checken, ob alle required items einen wert haben if (evaluation_check_values($startitempos, $lastitempos)) { $userid = $USER->id; //arb if ($completedid = evaluation_save_values($USER->id, true)) { if ($userid > 0) { add_to_log($classid, 'evaluation', 'startcomplete', 'view.php?id=' . $cm->id, $evaluation->id, $classid, $userid); } if (!$gonextpage AND ! $gopreviouspage) { $preservevalues = false; //es kann gespeichert werden } } else { $savereturn = 'failed'; if (isset($lastpage)) { $gopage = $lastpage; } else { print_error('missingparameter'); } } } else {