<?php // require_once "../../config.php"; require_once "lib.php"; require_once 'easy_excel.php'; optional_variable($id); // Course Module ID, or $formdata = data_submitted('nomatch'); if (!empty($formdata->id)) { $id = $formdata->id; } if ($id) { 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')); } $filename = "feedback.xls"; //Dem Browser mitteilen, dass jetzt eine Exceldatei zum Downloaden kommt header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename={$filename}");
<?php // require_once "../../config.php"; require_once "lib.php"; optional_variable($id); // Course Module ID, or optional_variable($templateid, false); // Course Module ID, or $formdata = data_submitted('nomatch'); if (!empty($formdata->id)) { $id = $formdata->id; } $templateid = $formdata->templateid == '' ? $templateid : $formdata->templateid; if (isset($formdata->canceladd) && $formdata->canceladd == 1) { redirect('edit.php?id=' . $id); } if (!$templateid) { redirect('edit.php?id=' . $id); } if ($id) { 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"); } }
<?php // // add or edit an item require_once "../../config.php"; require_once "lib.php"; optional_variable($id); // Course Module ID, or optional_variable($position); // position of item optional_variable($typ, false); // typ of item if (!$typ) { redirect('edit.php?id=' . $id); } // set up some general variables $usehtmleditor = can_use_html_editor(); $formdata = data_submitted('nomatch'); if (!empty($formdata->id)) { $id = $formdata->id; } if ($id) { 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"); }
<?php // require_once "../../config.php"; require_once "lib.php"; optional_variable($id); // Course Module ID, or optional_variable($lstgroupid, -2); //groupid (aus der Listbox gewaehlt) //checken, ob eine gruppe ausgewaehlt wurde if ($lstgroupid == -1) { $SESSION->lstgroupid = false; } else { if (!isset($SESSION->lstgroupid) || $lstgroupid != -2) { $SESSION->lstgroupid = $lstgroupid; } } if ($id) { 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"); } } if ($feedback->anonymous != feedback_ANONYMOUS_YES) { require_login($course->id); }
<?php // require_once "../../config.php"; require_once "lib.php"; optional_variable($id); // Course Module ID, or optional_variable($userid, false); $formdata = data_submitted('nomatch'); if ($userid) { $formdata->userid = intval($userid); } if ($id) { 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')); } //get the feedbackitems $feedbackitems = get_records('feedback_item', 'feedback', $feedback->id, 'position'); $feedbackcompleted = get_record_select('feedback_completed', 'feedback=' . $feedback->id . ' AND userid=' . $formdata->userid); /// Print the page header
<?php // $Id: view.php,v 1.1 2003/09/30 02:45:19 moodler Exp $ /// This page prints a particular instance of ical /// (Replace ical with the name of your module) require_once $CFG->dirroot . '/config.php'; require_once $CFG->dirroot . '/calendar/lib.php'; optional_variable($id); // Course Module ID, or optional_variable($a); // ical ID if ($id) { 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 (!($ical = get_record("ical", "id", $cm->instance))) { error("Course module is incorrect"); } } else { if (!($ical = get_record("ical", "id", $a))) { error("Course module is incorrect"); } if (!($course = get_record("course", "id", $ical->course))) { error("Course is misconfigured"); } if (!($cm = get_coursemodule_from_instance("ical", $ical->id, $course->id))) { error("Course Module ID was incorrect"); }