MDL-27550 workshop: rendering links to the submission and the assessment page
This usability improvement helps to provide feedback quickly during the grading evaluation phase.
This commit is contained in:
@@ -91,7 +91,14 @@ class mod_workshop_renderer extends plugin_renderer_base {
|
||||
}
|
||||
$o .= $this->output->container_start($classes);
|
||||
$o .= $this->output->container_start('header');
|
||||
$o .= $this->output->heading(format_string($submission->title), 3, 'title');
|
||||
|
||||
$title = $this->output->heading(format_string($submission->title), 3, 'title');
|
||||
|
||||
if ($this->page->url != $submission->url) {
|
||||
$o .= html_writer::link($submission->url, $title);
|
||||
} else {
|
||||
$o .= $title;
|
||||
}
|
||||
|
||||
if (!$anonymous) {
|
||||
$author = new stdclass();
|
||||
@@ -554,9 +561,14 @@ class mod_workshop_renderer extends plugin_renderer_base {
|
||||
$o .= $this->output->container_start('header');
|
||||
|
||||
if (!empty($assessment->title)) {
|
||||
$o .= $this->output->container(s($assessment->title), 'title');
|
||||
$title = s($assessment->title);
|
||||
} else {
|
||||
$o .= $this->output->container(get_string('assessment', 'workshop'), 'title');
|
||||
$title = get_string('assessment', 'workshop');
|
||||
}
|
||||
if ($this->page->url != $assessment->url) {
|
||||
$o .= $this->output->container(html_writer::link($assessment->url, $title), 'title');
|
||||
} else {
|
||||
$o .= $this->output->container($title, 'title');
|
||||
}
|
||||
|
||||
if (!$anonymous) {
|
||||
|
||||
@@ -43,7 +43,11 @@ if (isguestuser()) {
|
||||
$workshop = $DB->get_record('workshop', array('id' => $cm->instance), '*', MUST_EXIST);
|
||||
$workshop = new workshop($workshop, $cm, $course);
|
||||
|
||||
$PAGE->set_url($workshop->submission_url(), array('cmid' => $cmid, 'id' => $id, 'edit' => $edit));
|
||||
$PAGE->set_url($workshop->submission_url(), array('cmid' => $cmid, 'id' => $id));
|
||||
|
||||
if ($edit) {
|
||||
$PAGE->url->param('edit', $edit);
|
||||
}
|
||||
|
||||
if ($id) { // submission is specified
|
||||
$submission = $workshop->get_submission_by_id($id);
|
||||
|
||||
Reference in New Issue
Block a user