MDL-19807 Converted print_box* to $OUTPUT->box*
This commit is contained in:
@@ -23,11 +23,11 @@
|
||||
if (! $cm = get_coursemodule_from_id('feedback', $id)) {
|
||||
print_error('invalidcoursemodule');
|
||||
}
|
||||
|
||||
|
||||
if (! $course = $DB->get_record("course", array("id"=>$cm->course))) {
|
||||
print_error('coursemisconf');
|
||||
}
|
||||
|
||||
|
||||
if (! $feedback = $DB->get_record("feedback", array("id"=>$cm->instance))) {
|
||||
print_error('invalidcoursemodule');
|
||||
}
|
||||
@@ -35,11 +35,11 @@
|
||||
$capabilities = feedback_load_capabilities($cm->id);
|
||||
|
||||
require_login($course->id, true, $cm);
|
||||
|
||||
|
||||
if(!$capabilities->deletesubmissions){
|
||||
print_error('error');
|
||||
}
|
||||
|
||||
|
||||
$mform = new mod_feedback_delete_completed_form();
|
||||
$newformdata = array('id'=>$id,
|
||||
'completedid'=>$completedid,
|
||||
@@ -47,11 +47,11 @@
|
||||
'do_show'=>'edit');
|
||||
$mform->set_data($newformdata);
|
||||
$formdata = $mform->get_data();
|
||||
|
||||
|
||||
if ($mform->is_cancelled()) {
|
||||
redirect('show_entries.php?id='.$id.'&do_show=showentries');
|
||||
}
|
||||
|
||||
|
||||
if(isset($formdata->confirmdelete) AND $formdata->confirmdelete == 1){
|
||||
if($completed = $DB->get_record('feedback_completed', array('id'=>$completedid))) {
|
||||
feedback_delete_completed($completedid);
|
||||
@@ -64,13 +64,13 @@
|
||||
$strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
$strfeedback = get_string("modulename", "feedback");
|
||||
$buttontext = update_module_button($cm->id, $course->id, $strfeedback);
|
||||
|
||||
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strfeedbacks, 'link' => "index.php?id=$course->id", 'type' => 'activity');
|
||||
$navlinks[] = array('name' => format_string($feedback->name), 'link' => "", 'type' => 'activityinstance');
|
||||
|
||||
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
|
||||
print_header_simple(format_string($feedback->name), "",
|
||||
$navigation, "", "", true, $buttontext, navmenu($course, $cm));
|
||||
|
||||
@@ -80,12 +80,12 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
echo $OUTPUT->heading(format_text($feedback->name));
|
||||
// print_simple_box_start("center", "60%", "#FFAAAA", 20, "noticebox");
|
||||
print_box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal');
|
||||
echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal');
|
||||
echo $OUTPUT->heading(get_string('confirmdeleteentry', 'feedback'));
|
||||
$mform->display();
|
||||
// print_simple_box_end();
|
||||
print_box_end();
|
||||
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user