mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-19807 Upgraded calls to helpbutton, print_simple_box* and notify
This commit is contained in:
parent
4102b449ef
commit
9fad7b201e
@ -72,7 +72,6 @@
|
||||
|
||||
|
||||
//print analysed items
|
||||
// print_simple_box_start("center", '80%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
|
||||
//get the groupid
|
||||
@ -145,7 +144,6 @@
|
||||
print_heading_with_help(get_string('insufficient_responses_for_this_group', 'feedback'), 'insufficient_responses', 'feedback');
|
||||
}
|
||||
echo '</td></tr></table></div>';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -65,7 +65,6 @@
|
||||
include('tabs.php');
|
||||
|
||||
//print the analysed items
|
||||
// print_simple_box_start("center", '80%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
|
||||
if( $capabilities->viewreports ) {
|
||||
|
@ -149,11 +149,9 @@
|
||||
//check, if the feedback is open (timeopen, timeclose)
|
||||
$checktime = time();
|
||||
if(($feedback->timeopen > $checktime) OR ($feedback->timeclose < $checktime AND $feedback->timeclose > 0)) {
|
||||
// print_simple_box_start('center');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter');
|
||||
echo '<h2><font color="red">'.get_string('feedback_is_not_open', 'feedback').'</font></h2>';
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
echo $OUTPUT->box_end();
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
@ -292,10 +290,8 @@
|
||||
|
||||
if(isset($savereturn) && $savereturn == 'saved') {
|
||||
if($feedback->page_after_submit) {
|
||||
// print_simple_box_start('center', '75%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo format_text($feedback->page_after_submit);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
} else {
|
||||
echo '<p align="center"><b><font color="green">'.get_string('entries_saved','feedback').'</font></b></p>';
|
||||
@ -311,15 +307,15 @@
|
||||
$completion->set_module_viewed($cm);
|
||||
|
||||
if($feedback->site_after_submit) {
|
||||
print_continue(feedback_encode_target_url($feedback->site_after_submit));
|
||||
echo $OUTPUT->continue_button(feedback_encode_target_url($feedback->site_after_submit));
|
||||
}else {
|
||||
if($courseid) {
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$courseid);
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$courseid);
|
||||
}else {
|
||||
if($course->id == SITEID) {
|
||||
print_continue($CFG->wwwroot);
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot);
|
||||
} else {
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -334,7 +330,6 @@
|
||||
|
||||
//print the items
|
||||
if(is_array($feedbackitems)){
|
||||
// print_simple_box_start('center', '75%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo '<div class="mdl-align"><form name="frm" action="'.$ME.'" method="post" onsubmit=" ">';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
@ -430,16 +425,13 @@
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
$SESSION->feedback->is_started = true;
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
}
|
||||
}else {
|
||||
// print_simple_box_start('center');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter');
|
||||
echo '<h2><font color="red">'.get_string('this_feedback_is_already_submitted', 'feedback').'</font></h2>';
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
/// Finish the page
|
||||
|
@ -121,11 +121,9 @@
|
||||
//check, if the feedback is open (timeopen, timeclose)
|
||||
$checktime = time();
|
||||
if(($feedback->timeopen > $checktime) OR ($feedback->timeclose < $checktime AND $feedback->timeclose > 0)) {
|
||||
// print_simple_box_start('center');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter');
|
||||
echo '<h2><font color="red">'.get_string('feedback_is_not_open', 'feedback').'</font></h2>';
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
echo $OUTPUT->box_end();
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
@ -234,10 +232,8 @@
|
||||
|
||||
if(isset($savereturn) && $savereturn == 'saved') {
|
||||
if($feedback->page_after_submit) {
|
||||
// print_simple_box_start('center', '75%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo format_text($feedback->page_after_submit);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
} else {
|
||||
echo '<p align="center"><b><font color="green">'.get_string('entries_saved','feedback').'</font></b></p>';
|
||||
@ -248,19 +244,19 @@
|
||||
}
|
||||
}
|
||||
if($feedback->site_after_submit) {
|
||||
print_continue(feedback_encode_target_url($feedback->site_after_submit));
|
||||
echo $OUTPUT->continue_button(feedback_encode_target_url($feedback->site_after_submit));
|
||||
}else {
|
||||
if($courseid) {
|
||||
if($courseid == SITEID) {
|
||||
print_continue($CFG->wwwroot);
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot);
|
||||
}else {
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$courseid);
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$courseid);
|
||||
}
|
||||
}else {
|
||||
if($course->id == SITEID) {
|
||||
print_continue($CFG->wwwroot);
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot);
|
||||
} else {
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -275,7 +271,6 @@
|
||||
|
||||
//print the items
|
||||
if(is_array($feedbackitems)){
|
||||
// print_simple_box_start('center', '75%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo '<div class="mdl-align"><form name="frm" action="'.$ME.'" method="post" onsubmit=" ">';
|
||||
echo '<table>';
|
||||
@ -368,16 +363,13 @@
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
$SESSION->feedback->is_started = true;
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
}
|
||||
}else {
|
||||
// print_simple_box_start('center');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter');
|
||||
echo '<h2><font color="red">'.get_string('this_feedback_is_already_submitted', 'feedback').'</font></h2>';
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
/// Finish the page
|
||||
|
@ -79,11 +79,9 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
echo $OUTPUT->heading(format_text($feedback->name));
|
||||
// print_simple_box_start("center", "60%", "#FFAAAA", 20, "noticebox");
|
||||
echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal');
|
||||
echo $OUTPUT->heading(get_string('confirmdeleteentry', 'feedback'));
|
||||
$mform->display();
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
|
||||
|
@ -72,12 +72,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
echo $OUTPUT->heading(format_text($feedback->name));
|
||||
// print_simple_box_start("center", "60%", "#FFAAAA", 20, "noticebox");
|
||||
echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal');
|
||||
echo $OUTPUT->heading(get_string('confirmdeleteitem', 'feedback'));
|
||||
print_string('relateditemsdeleted','feedback');
|
||||
$mform->display();
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -91,17 +91,14 @@
|
||||
echo $OUTPUT->heading(get_string('delete_template','feedback'));
|
||||
if($shoulddelete == 1) {
|
||||
|
||||
// print_simple_box_start("center", "60%", "#FFAAAA", 20, "noticebox");
|
||||
echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal');
|
||||
echo $OUTPUT->heading(get_string('confirmdeletetemplate', 'feedback'));
|
||||
$mform->display();
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}else {
|
||||
$templates = feedback_get_template_list($course, true);
|
||||
echo '<div class="mdl-align">';
|
||||
if(!is_array($templates)) {
|
||||
// print_simple_box(get_string('no_templates_available_yet', 'feedback'), "center");
|
||||
echo $OUTPUT->box(get_string('no_templates_available_yet', 'feedback'), 'generalbox boxaligncenter');
|
||||
}else {
|
||||
echo '<table width="30%">';
|
||||
|
@ -182,7 +182,6 @@
|
||||
///print the template-section
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
if($do_show == 'templates') {
|
||||
// print_simple_box_start("center", '80%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
$use_template_form->display();
|
||||
|
||||
@ -199,7 +198,6 @@
|
||||
<a href="'.htmlspecialchars('import.php?id='.$id).'">'.get_string('import_questions', 'feedback').'</a>
|
||||
</p>';
|
||||
}
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -212,13 +210,12 @@
|
||||
if(is_array($feedbackitems)){
|
||||
$itemnr = 0;
|
||||
|
||||
$helpbutton = helpbutton('preview', get_string('preview','feedback'), 'feedback',true,false,'',true);
|
||||
$helpbutton = $OUTPUT->help_icon(moodle_help_icon::make('preview', get_string('preview','feedback'), 'feedback',true));
|
||||
|
||||
echo $OUTPUT->heading($helpbutton . get_string('preview', 'feedback'));
|
||||
if(isset($SESSION->feedback->moving) AND $SESSION->feedback->moving->shouldmoving == 1) {
|
||||
echo $OUTPUT->heading('<a href="'.htmlspecialchars($ME.'?id='.$id).'">'.get_string('cancel_moving', 'feedback').'</a>');
|
||||
}
|
||||
// print_simple_box_start('center', '80%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
|
||||
//check, if there exists required-elements
|
||||
@ -392,10 +389,8 @@
|
||||
|
||||
}
|
||||
echo '</table>';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}else{
|
||||
// print_simple_box(get_string('no_items_available_yet','feedback'),"center");
|
||||
echo $OUTPUT->box(get_string('no_items_available_yet','feedback'),'generalbox boxaligncenter');
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +182,6 @@
|
||||
$item_form->display();
|
||||
|
||||
/*
|
||||
// print_simple_box_start('center');
|
||||
echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter');
|
||||
echo '<form action="'.$ME.'" method="post">';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
@ -224,7 +223,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
// print_simple_box_end();
|
||||
// echo $OUTPUT->box_end();
|
||||
|
||||
if ($typ!='label') {
|
||||
|
@ -93,12 +93,10 @@
|
||||
echo $OUTPUT->heading(get_string('import_questions','feedback'));
|
||||
|
||||
if(isset($importerror->msg) AND is_array($importerror->msg)) {
|
||||
// print_simple_box_start('center', '', '#FFAAAA', 5, 'notifyproblem');
|
||||
echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter');
|
||||
foreach($importerror->msg as $msg) {
|
||||
echo $msg.'<br />';
|
||||
}
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
|
||||
|
@ -100,10 +100,8 @@ class feedback_item_captcha extends feedback_item_base {
|
||||
<td valign="top" align="<?php echo $align;?>">
|
||||
<?php
|
||||
if($readonly){
|
||||
// print_simple_box_start($align);
|
||||
echo $OUTPUT->box_start('generalbox boxalign'.$align);
|
||||
echo $value ? $value : ' ';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}else {
|
||||
?>
|
||||
|
@ -127,10 +127,8 @@ class feedback_item_info extends feedback_item_base {
|
||||
<td valign="top" align="<?php echo $align;?>">
|
||||
<?php
|
||||
if($readonly){
|
||||
// print_simple_box_start($align);
|
||||
echo $OUTPUT->box_start('generalbox boxalign'.$align);
|
||||
echo $value ? UserDate($value):' ';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}else {
|
||||
$feedback = $DB->get_record('feedback', array('id'=>$item->feedback));
|
||||
|
@ -258,15 +258,12 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
}
|
||||
$index++;
|
||||
}
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}else {
|
||||
foreach($presentation as $pres){
|
||||
if($value == $index){
|
||||
// print_simple_box_start($align);
|
||||
echo $OUTPUT->box_start('generalbox boxalign'.$align);
|
||||
echo text_to_html($pres, true, false, false);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
break;
|
||||
}
|
||||
|
@ -215,10 +215,8 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||
foreach($lines as $line){
|
||||
if($value == $index){
|
||||
$item_value = explode(FEEDBACK_MULTICHOICERATED_VALUE_SEP, $line);
|
||||
// print_simple_box_start('left');
|
||||
echo $OUTPUT->box_start('generalbox boxalign'.$align);
|
||||
echo text_to_html($item_value[1], true, false, false);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
break;
|
||||
}
|
||||
|
@ -176,10 +176,8 @@ class feedback_item_numeric extends feedback_item_base {
|
||||
<td valign="top" align="<?php echo $align;?>">
|
||||
<?php
|
||||
if($readonly){
|
||||
// print_simple_box_start($align);
|
||||
echo $OUTPUT->box_start('generalbox boxalign'.$align);
|
||||
echo (is_numeric($value)) ? number_format($value, 2, $this->sep_dec, $this->sep_thous) : ' ';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}else {
|
||||
?>
|
||||
|
@ -122,10 +122,8 @@ class feedback_item_textarea extends feedback_item_base {
|
||||
<td valign="top" align="<?php echo $align;?>">
|
||||
<?php
|
||||
if($readonly){
|
||||
// print_simple_box_start($align);
|
||||
echo $OUTPUT->box_start('generalbox boxalign'.$align);
|
||||
echo $value?str_replace("\n",'<br />',$value):' ';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}else {
|
||||
?>
|
||||
|
@ -119,10 +119,8 @@ class feedback_item_textfield extends feedback_item_base {
|
||||
<td valign="top" align="<?php echo $align;?>">
|
||||
<?php
|
||||
if($readonly){
|
||||
// print_simple_box_start($align);
|
||||
echo $OUTPUT->box_start('generalbox boxalign'.$align);
|
||||
echo $value?$value:' ';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}else {
|
||||
?>
|
||||
|
@ -2288,7 +2288,6 @@ function feedback_print_errors() {
|
||||
return;
|
||||
}
|
||||
|
||||
// print_simple_box_start("center", "60%", "#FFAAAA", 20, "noticebox");
|
||||
echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal');
|
||||
echo $OUTPUT->heading(get_string('handling_error', 'feedback'));
|
||||
|
||||
@ -2296,7 +2295,6 @@ function feedback_print_errors() {
|
||||
print_r($SESSION->feedback->errors) . "\n";
|
||||
echo '</pre></font></b></p>';
|
||||
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
echo '<br /><br />';
|
||||
$SESSION->feedback->errors = array(); //remove errors
|
||||
|
@ -90,9 +90,7 @@
|
||||
|
||||
include('tabs.php');
|
||||
|
||||
// print_simple_box(get_string('mapcourseinfo', 'feedback'), 'center', '80%');
|
||||
echo $OUTPUT->box(get_string('mapcourseinfo', 'feedback'), 'generalbox boxaligncenter boxwidthwide');
|
||||
// print_simple_box_start('center', '70%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo '<form method="post">';
|
||||
echo '<input type="hidden" name="id" value="'.$id.'" />';
|
||||
@ -108,14 +106,14 @@
|
||||
echo ' ' . get_string('courses') . ': ';
|
||||
echo $OUTPUT->select(html_select::make ($courses, 'coursefilter', $coursefilter));
|
||||
echo '<input type="submit" value="'.get_string('mapcourse', 'feedback').'"/>';
|
||||
helpbutton('mapcourses', '', 'feedback', true, true);
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('mapcourses', '', 'feedback', true));
|
||||
echo '<input type="button" value="'.get_string('searchagain').'" onclick="document.location=\'mapcourse.php?id='.$id.'\'"/>';
|
||||
echo '<input type="hidden" name="searchcourse" value="'.$searchcourse.'"/>';
|
||||
echo '<input type="hidden" name="feedbackid" value="'.$feedback->id.'"/>';
|
||||
helpbutton('searchcourses', '', 'feedback', true, true);
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('searchcourses', '', 'feedback', true));
|
||||
} else {
|
||||
echo '<input type="text" name="searchcourse" value="'.$searchcourse.'"/> <input type="submit" value="'.get_string('searchcourses').'"/>';
|
||||
helpbutton('searchcourses', '', 'feedback', true, true);
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('searchcourses', '', 'feedback', true));
|
||||
}
|
||||
|
||||
echo '</form>';
|
||||
@ -137,7 +135,6 @@
|
||||
}
|
||||
|
||||
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -63,7 +63,6 @@
|
||||
if(is_array($feedbackitems)){
|
||||
$itemnr = 0;
|
||||
|
||||
// print_simple_box_start('center', '80%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo '<div class="mdl-align printview"><table>';
|
||||
//print the inserted items
|
||||
@ -88,13 +87,11 @@
|
||||
echo '</table>';
|
||||
echo '<font color="red">(*)' . get_string('items_are_required', 'feedback') . '</font>';
|
||||
echo '</div>';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}else{
|
||||
// print_simple_box(get_string('no_items_available_yet','feedback'),"center");
|
||||
echo $OUTPUT->box(get_string('no_items_available_yet','feedback'),'generalbox boxaligncenter boxwidthwide');
|
||||
}
|
||||
print_continue('view.php?id='.$id);
|
||||
echo $OUTPUT->continue_button('view.php?id='.$id);
|
||||
/// Finish the page
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -112,7 +112,7 @@
|
||||
if($feedback->course == SITEID){
|
||||
echo '<div class="mdl-align"><a href="'.htmlspecialchars('analysis_course.php?id=' . $id . '&courseid='.$courseid).'">';
|
||||
echo get_string('course') .' '. get_string('analysis', 'feedback') . ' ('.get_string('completed_feedbacks', 'feedback').': '.intval($completedFeedbackCount).')</a>';
|
||||
helpbutton('viewcompleted', '', 'feedback', true, true);
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('viewcompleted', '', 'feedback', true));
|
||||
echo '</div>';
|
||||
}else {
|
||||
echo '<div class="mdl-align"><a href="'.htmlspecialchars('analysis.php?id=' . $id . '&courseid='.$courseid).'">';
|
||||
@ -124,14 +124,13 @@
|
||||
//####### viewreports-start
|
||||
if($capabilities->viewreports) {
|
||||
//print the list of students
|
||||
// print_simple_box_start('center', '80%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo isset($groupselect) ? $groupselect : '';
|
||||
echo '<div class="clearer"></div>';
|
||||
echo '<div class="mdl-align"><table><tr><td width="400">';
|
||||
if (!$students) {
|
||||
if($courseid != SITEID){
|
||||
notify(get_string('noexistingstudents'));
|
||||
echo $OUTPUT->notification(get_string('noexistingstudents'));
|
||||
}
|
||||
} else{
|
||||
echo print_string('non_anonymous_entries', 'feedback');
|
||||
@ -198,7 +197,6 @@
|
||||
</table>
|
||||
<?php
|
||||
echo '</td></tr></table></div>';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
|
||||
@ -217,7 +215,6 @@
|
||||
} else {
|
||||
echo '<p align="center">'.get_string('not_completed_yet','feedback').'</p>';
|
||||
}
|
||||
// print_simple_box_start("center", '50%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthnormal');
|
||||
echo '<form>';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
@ -249,10 +246,9 @@
|
||||
echo '</td></tr>';
|
||||
echo '</table>';
|
||||
echo '</form>';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
print_continue(htmlspecialchars('show_entries.php?id='.$id.'&do_show=showentries'));
|
||||
echo $OUTPUT->continue_button(htmlspecialchars('show_entries.php?id='.$id.'&do_show=showentries'));
|
||||
}
|
||||
/// Finish the page
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -80,9 +80,8 @@
|
||||
|
||||
echo $OUTPUT->heading(format_text($feedback->name));
|
||||
|
||||
print_continue(htmlspecialchars('show_entries.php?id='.$id.'&do_show=showentries'));
|
||||
echo $OUTPUT->continue_button(htmlspecialchars('show_entries.php?id='.$id.'&do_show=showentries'));
|
||||
//print the list with anonymous completeds
|
||||
// print_simple_box_start("center");
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
$PAGE->requires->js('mod/feedback/feedback.js');
|
||||
?>
|
||||
@ -116,7 +115,6 @@
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
if(!isset($formdata->completedid)) {
|
||||
$formdata = null;
|
||||
@ -132,7 +130,6 @@
|
||||
} else {
|
||||
echo '<p align="center">'.get_string('not_completed_yet','feedback').'</p>';
|
||||
}
|
||||
// print_simple_box_start("center", '50%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthnormal');
|
||||
echo '<form>';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
@ -160,7 +157,6 @@
|
||||
echo '</td></tr>';
|
||||
echo '</table>';
|
||||
echo '</form>';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
}
|
||||
|
@ -79,13 +79,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
echo $OUTPUT->heading(format_text($feedback->name));
|
||||
|
||||
// print_simple_box_start("center", "60%", "#FFAAAA", 20, "noticebox");
|
||||
echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal');
|
||||
echo $OUTPUT->heading(get_string('confirmusetemplate', 'feedback'));
|
||||
|
||||
$mform->display();
|
||||
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
$templateitems = $DB->get_records('feedback_item', array('template'=>$templateid), 'position');
|
||||
@ -96,7 +94,6 @@
|
||||
if(is_array($templateitems)){
|
||||
$itemnr = 0;
|
||||
echo '<p align="center">'.get_string('preview', 'feedback').'</p>';
|
||||
// print_simple_box_start('center', '75%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo '<div class="mdl-align"><table>';
|
||||
foreach($templateitems as $templateitem){
|
||||
@ -116,10 +113,8 @@
|
||||
echo '<tr><td> </td></tr>';
|
||||
}
|
||||
echo '</table></div>';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}else{
|
||||
// print_simple_box(get_string('no_items_available_at_this_template','feedback'),"center");
|
||||
echo $OUTPUT->box(get_string('no_items_available_at_this_template','feedback'),'generalbox boxaligncenter boxwidthwide');
|
||||
}
|
||||
|
||||
|
@ -112,19 +112,15 @@
|
||||
|
||||
echo $OUTPUT->heading(format_text($feedback->name));
|
||||
|
||||
// print_simple_box_start('center', '80%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
$options = (object)array('noclean'=>true);
|
||||
echo format_module_intro('feedback', $feedback, $cm->id);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
if($capabilities->edititems) {
|
||||
echo $OUTPUT->heading(get_string("page_after_submit", "feedback"), 4);
|
||||
// print_simple_box_start('center', '80%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo format_text($feedback->page_after_submit);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
|
||||
@ -140,18 +136,16 @@
|
||||
//####### mapcourse-start
|
||||
if($capabilities->mapcourse) {
|
||||
if($feedback->course == SITEID) {
|
||||
// print_simple_box_start('center', '80%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo '<div class="mdl-align">';
|
||||
echo '<form action="mapcourse.php" method="get">';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
echo '<input type="hidden" name="id" value="'.$id.'" />';
|
||||
echo '<button type="submit">'.get_string('mapcourses', 'feedback').'</button>';
|
||||
helpbutton('mapcourse', '', 'feedback', true, true);
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make('mapcourse', '', 'feedback', true));
|
||||
echo '</form>';
|
||||
echo '<br />';
|
||||
echo '</div>';
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
}
|
||||
@ -159,16 +153,13 @@
|
||||
|
||||
//####### completed-start
|
||||
if($capabilities->complete) {
|
||||
// print_simple_box_start('center', '80%');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
//check, whether the feedback is open (timeopen, timeclose)
|
||||
$checktime = time();
|
||||
if(($feedback->timeopen > $checktime) OR ($feedback->timeclose < $checktime AND $feedback->timeclose > 0)) {
|
||||
// print_simple_box_start('center');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter');
|
||||
echo '<h2><font color="red">'.get_string('feedback_is_not_open', 'feedback').'</font></h2>';
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
echo $OUTPUT->box_end();
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
@ -202,12 +193,11 @@
|
||||
}else {
|
||||
echo '<h2><font color="red">'.get_string('this_feedback_is_already_submitted', 'feedback').'</font></h2>';
|
||||
if($courseid) {
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$courseid);
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$courseid);
|
||||
}else {
|
||||
print_continue($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
echo $OUTPUT->continue_button($CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
}
|
||||
}
|
||||
// print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
//####### completed-end
|
||||
|
Loading…
x
Reference in New Issue
Block a user