mod-feedback MDL-16706 Removed inline JS and replaced with new PAGE methods

This commit is contained in:
samhemelryk 2009-06-26 07:32:52 +00:00
parent 0763ab2c65
commit a39fe289b0
2 changed files with 7 additions and 11 deletions

View File

@ -133,17 +133,7 @@
echo '<input type="hidden" name="courseitemfilter" value="'.$courseitemfilter.'" />';
echo '<input type="hidden" name="courseitemfiltertyp" value="'.$courseitemfiltertyp.'" />';
echo '<input type="hidden" name="courseid" value="'.$courseid.'" />';
echo '<script language="javascript" type="text/javascript">
<!--
function setcourseitemfilter(item, item_typ) {
document.report.courseitemfilter.value = item;
document.report.courseitemfiltertyp.value = item_typ;
document.report.submit();
}
-->
</script>';
$PAGE->requires->js('mod/feedback/feedback.js')->asap();
$sql = 'select c.id, c.shortname from {course} c, '.
'{feedback_value} fv, {feedback_item} fi '.
'where c.id = fv.course_id and fv.item = fi.id '.

View File

@ -8,4 +8,10 @@ function set_item_focus(itemid) {
function feedbackGo2delete(form) {
form.action = moodle_cfg.wwwroot+'/mod/feedback/delete_completed.php';
form.submit();
}
function setcourseitemfilter(item, item_typ) {
document.report.courseitemfilter.value = item;
document.report.courseitemfiltertyp.value = item_typ;
document.report.submit();
}