MDL-19803 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
|
||||
$timenow = time();
|
||||
|
||||
$table = new html_table();
|
||||
|
||||
if ($course->format == "weeks") {
|
||||
$table->head = array ($strweek, $strname, $strassignmenttype, $strduedate, $strsubmitted, $strgrade);
|
||||
$table->align = array ("center", "left", "left", "left", "right");
|
||||
@@ -114,7 +116,7 @@
|
||||
|
||||
echo "<br />";
|
||||
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
?>
|
||||
|
||||
@@ -302,7 +302,7 @@ class assignment_base {
|
||||
echo '<tr>';
|
||||
echo '<td class="left picture">';
|
||||
if ($teacher) {
|
||||
print_user_picture($teacher, $this->course->id, $teacher->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($teacher, $this->course->id));
|
||||
}
|
||||
echo '</td>';
|
||||
echo '<td class="topic">';
|
||||
@@ -937,7 +937,7 @@ class assignment_base {
|
||||
global $USER;
|
||||
$teacher = $USER;
|
||||
}
|
||||
print_user_picture($teacher, $this->course->id, $teacher->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($teacher, $this->course->id));
|
||||
echo '</td>';
|
||||
echo '<td class="content">';
|
||||
echo '<form id="submitform" action="submissions.php" method="post">';
|
||||
@@ -1029,7 +1029,7 @@ class assignment_base {
|
||||
///End of teacher info row, Start of student info row
|
||||
echo '<tr>';
|
||||
echo '<td class="picture user">';
|
||||
print_user_picture($user, $this->course->id, $user->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($user, $this->course->id));
|
||||
echo '</td>';
|
||||
echo '<td class="topic">';
|
||||
echo '<div class="from">';
|
||||
@@ -1248,7 +1248,7 @@ class assignment_base {
|
||||
|
||||
/// Calculate user status
|
||||
$auser->status = ($auser->timemarked > 0) && ($auser->timemarked >= $auser->timemodified);
|
||||
$picture = print_user_picture($auser, $course->id, $auser->picture, false, true);
|
||||
$picture = $OUTPUT->user_picture(moodle_user_picture::make($auser, $course->id));
|
||||
|
||||
if (empty($auser->submissionid)) {
|
||||
$auser->grade = -1; //no submission yet
|
||||
@@ -2860,7 +2860,7 @@ function assignment_print_recent_mod_activity($activity, $courseid, $detail, $mo
|
||||
echo '<table border="0" cellpadding="3" cellspacing="0" class="assignment-recent">';
|
||||
|
||||
echo "<tr><td class=\"userpicture\" valign=\"top\">";
|
||||
print_user_picture($activity->user->userid, $courseid, $activity->user->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($activity->user, $courseid));
|
||||
echo "</td><td>";
|
||||
|
||||
if ($detail) {
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
print_header_simple($str->assignments, "", $navigation, "", "", true, "", navmenu($course));
|
||||
|
||||
foreach ($views as $view) {
|
||||
print_container_start(true,'generalbox assignment');
|
||||
echo $OUTPUT->container_start('clearfix generalbox assignment');
|
||||
|
||||
// info bit
|
||||
echo $OUTPUT->heading("$view->section - $view->name", 3, 'mdl-left');
|
||||
@@ -148,17 +148,17 @@
|
||||
echo '<div class="description">'.$view->description.'</div>';
|
||||
|
||||
//submission part
|
||||
print_container_start(false,'generalbox submission');
|
||||
echo $OUTPUT->container_start('generalbox submission');
|
||||
echo '<div class="submissiondate">'.$view->submissiondate.'</div>';
|
||||
echo "<p>$view->submissiontext</p>\n";
|
||||
echo "<p>$view->editlink</p>\n";
|
||||
print_container_end();
|
||||
echo $OUTPUT->container_end();
|
||||
|
||||
// feedback part
|
||||
$onlineinstance = new assignment_online( $view->cm );
|
||||
$onlineinstance->view_feedback();
|
||||
|
||||
print_container_end();
|
||||
echo $OUTPUT->container_end();
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
@@ -115,8 +115,8 @@ class assignment_online extends assignment_base {
|
||||
echo $OUTPUT->box_end();
|
||||
if (!$editmode && $editable) {
|
||||
echo "<div style='text-align:center'>";
|
||||
print_single_button('view.php', array('id'=>$this->cm->id,'edit'=>'1'),
|
||||
get_string('editmysubmission', 'assignment'));
|
||||
echo $OUTPUT->button(html_form::make_button('view.php', array('id'=>$this->cm->id,'edit'=>'1'),
|
||||
get_string('editmysubmission', 'assignment')));
|
||||
echo "</div>";
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ class assignment_upload extends assignment_base {
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="left picture">';
|
||||
print_user_picture($teacher, $this->course->id, $teacher->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($teacher, $this->course->id));
|
||||
echo '</td>';
|
||||
echo '<td class="topic">';
|
||||
echo '<div class="from">';
|
||||
@@ -180,7 +180,7 @@ class assignment_upload extends assignment_base {
|
||||
if ($this->can_update_notes($submission)) {
|
||||
$options = array ('id'=>$this->cm->id, 'action'=>'editnotes');
|
||||
echo '<div style="text-align:center">';
|
||||
print_single_button('upload.php', $options, get_string('edit'), 'post', '_self', false);
|
||||
echo $OUTPUT->button(html_form::make_button('upload.php', $options, get_string('edit')));
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
@@ -372,10 +372,10 @@ class assignment_upload extends assignment_base {
|
||||
if ($this->drafts_tracked() and $this->isopen() and has_capability('mod/assignment:grade', $this->context) and $mode != '') { // we do not want it on view.php page
|
||||
if ($this->can_unfinalize($submission)) {
|
||||
$options = array ('id'=>$this->cm->id, 'userid'=>$userid, 'action'=>'unfinalize', 'mode'=>$mode, 'offset'=>$offset);
|
||||
$output .= print_single_button('upload.php', $options, get_string('unfinalize', 'assignment'), 'post', '_self', true);
|
||||
$output .= $OUTPUT->button(html_form::make_button('upload.php', $options, get_string('unfinalize', 'assignment')));
|
||||
} else if ($this->can_finalize($submission)) {
|
||||
$options = array ('id'=>$this->cm->id, 'userid'=>$userid, 'action'=>'finalizeclose', 'mode'=>$mode, 'offset'=>$offset);
|
||||
$output .= print_single_button('upload.php', $options, get_string('finalize', 'assignment'), 'post', '_self', true);
|
||||
$output .= $OUTPUT->button(html_form::make_button('upload.php', $options, get_string('finalize', 'assignment')));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ class assignment_upload extends assignment_base {
|
||||
$optionsyes = array ('id'=>$this->cm->id, 'confirm'=>1, 'action'=>'finalize');
|
||||
$this->view_header(get_string('submitformarking', 'assignment'));
|
||||
echo $OUTPUT->heading(get_string('submitformarking', 'assignment'));
|
||||
notice_yesno(get_string('onceassignmentsent', 'assignment'), 'upload.php', 'view.php', $optionsyes, $optionsno, 'post', 'get');
|
||||
echo $OUTPUT->confirm(get_string('onceassignmentsent', 'assignment'), new moodle_url('upload.php', $optionsyes),new moodle_url( 'view.php', $optionsno));
|
||||
$this->view_footer();
|
||||
die;
|
||||
|
||||
@@ -756,7 +756,7 @@ class assignment_upload extends assignment_base {
|
||||
$offset = required_param('offset', PARAM_INT);
|
||||
$confirm = optional_param('confirm', 0, PARAM_BOOL);
|
||||
|
||||
$returnurl = "submissions.php?id={$this->cm->id}&userid=$userid&mode=$mode&offset=$offset";
|
||||
$returnurl = "submissions.php?id={$this->cm->id}&userid=$userid&mode=$mode&offset=$offset";
|
||||
|
||||
if (!$this->can_manage_responsefiles()) {
|
||||
redirect($returnurl);
|
||||
@@ -769,7 +769,7 @@ class assignment_upload extends assignment_base {
|
||||
$optionsyes = array ('id'=>$this->cm->id, 'file'=>$file, 'userid'=>$userid, 'confirm'=>1, 'action'=>'response', 'mode'=>$mode, 'offset'=>$offset);
|
||||
print_header(get_string('delete'));
|
||||
echo $OUTPUT->heading(get_string('delete'));
|
||||
notice_yesno(get_string('confirmdeletefile', 'assignment', $file), 'delete.php', $urlreturn, $optionsyes, $optionsreturn, 'post', 'get');
|
||||
echo $OUTPUT->confirm(get_string('confirmdeletefile', 'assignment', $file), new moodle_url('delete.php', $optionsyes), new moodle_url($urlreturn, $optionsreturn));
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
@@ -809,7 +809,7 @@ class assignment_upload extends assignment_base {
|
||||
} else {
|
||||
$urlreturn = 'submissions.php';
|
||||
$optionsreturn = array('id'=>$this->cm->id, 'offset'=>$offset, 'mode'=>$mode, 'userid'=>$userid);
|
||||
$returnurl = "submissions.php?id={$this->cm->id}&offset=$offset&mode=$mode&userid=$userid";
|
||||
$returnurl = "submissions.php?id={$this->cm->id}&offset=$offset&mode=$mode&userid=$userid";
|
||||
}
|
||||
|
||||
if (!$submission = $this->get_submission($userid) // incorrect submission
|
||||
@@ -829,7 +829,7 @@ class assignment_upload extends assignment_base {
|
||||
print_header(get_string('delete'));
|
||||
}
|
||||
echo $OUTPUT->heading(get_string('delete'));
|
||||
notice_yesno(get_string('confirmdeletefile', 'assignment', $file), 'delete.php', $urlreturn, $optionsyes, $optionsreturn, 'post', 'get');
|
||||
echo $OUTPUT->confirm(get_string('confirmdeletefile', 'assignment', $file), new moodle_url('delete.php', $optionsyes), new moodle_url($urlreturn, $optionsreturn));
|
||||
if (empty($mode)) {
|
||||
$this->view_footer();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user