if (!($cm = get_record("course_modules", "id", $id))) { error("Course Module ID was incorrect"); } if (!($course = get_record("course", "id", $cm->course))) { error("Course is misconfigured"); } if (!($feedback = get_record("feedback", "id", $cm->instance))) { error("Course module is incorrect"); } } require_login($course->id); if (!(isteacher($course->id) || isadmin())) { error(get_string('error')); } //action handler lines ------------------------------------------- feedback_action_handler($id, '/mod/feedback/edit.php'); //item holen oder erstellen $formdata->itemid = isset($formdata->itemid) ? $formdata->itemid : NULL; if ($item = get_record('feedback_item', 'id', $formdata->itemid)) { $typ = $item->typ; $position = $item->position; } else { $formdata->position = isset($formdata->position) ? $formdata->position : NULL; $position = $formdata->position == '' ? $position : $formdata->position; if ($position == '') { $position = 0; } $formdata->typ = isset($formdata->typ) ? $formdata->typ : NULL; $typ = $formdata->typ == '' ? $typ : $formdata->typ; if ($typ == '') { $typ = 0;
if (!($cm = get_record("course_modules", "id", $id))) { error("Course Module ID was incorrect"); } if (!($course = get_record("course", "id", $cm->course))) { error("Course is misconfigured"); } if (!($feedback = get_record("feedback", "id", $cm->instance))) { error("Course module is incorrect"); } } require_login($course->id); if (!(isteacher($course->id) || isadmin())) { error(get_string('error')); } //action handler lines, feedback_action_handler($id); /// Print the page header if ($course->category) { $navigation = "<a href=\"../../course/view.php?id={$course->id}\">{$course->shortname}</a> ->"; } $strfeedbacks = get_string("modulenameplural", "feedback"); $strfeedback = get_string("modulename", "feedback"); print_header("{$course->shortname}: {$feedback->name}", "{$course->fullname}", "{$navigation} <a href=\"index.php?id={$course->id}\">{$strfeedbacks}</a> -> {$feedback->name}", "", "", true, update_module_button($cm->id, $course->id, $strfeedback), navmenu($course, $cm)); /// Print the main part of the page /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// print_heading($feedback->name); //action handler error reported, affected by constant feedback_ACTIONS_DEBUG in picture\lib.php feedback_print_errors(); echo "<br /><br /><br /> \n";