mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-27508 display submission link at the manual allocator page
This commit is contained in:
parent
25bae250ee
commit
74f54102dc
@ -318,6 +318,7 @@ class workshop_manual_allocator implements workshop_allocator {
|
||||
|
||||
// prepare data to be rendered
|
||||
$data = new workshopallocation_manual_allocations();
|
||||
$data->workshop = $this->workshop;
|
||||
$data->allocations = $allocations;
|
||||
$data->userinfo = $userinfo;
|
||||
$data->authors = $this->workshop->get_potential_authors();
|
||||
@ -358,6 +359,9 @@ class workshop_manual_allocator implements workshop_allocator {
|
||||
*/
|
||||
class workshopallocation_manual_allocations implements renderable {
|
||||
|
||||
/** @var workshop module instance */
|
||||
public $workshop;
|
||||
|
||||
/** @var array of stdClass, indexed by userid, properties userid, submissionid, (array)reviewedby, (array)reviewerof */
|
||||
public $allocations;
|
||||
|
||||
|
@ -31,6 +31,9 @@ defined('MOODLE_INTERNAL') || die();
|
||||
*/
|
||||
class workshopallocation_manual_renderer extends mod_workshop_renderer {
|
||||
|
||||
/** @var workshop module instance */
|
||||
protected $workshop;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// External rendering API
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@ -42,6 +45,9 @@ class workshopallocation_manual_renderer extends mod_workshop_renderer {
|
||||
* @return string html code
|
||||
*/
|
||||
protected function render_workshopallocation_manual_allocations(workshopallocation_manual_allocations $data) {
|
||||
|
||||
$this->workshop = $data->workshop;
|
||||
|
||||
$allocations = $data->allocations; // array prepared array of all allocations data
|
||||
$userinfo = $data->userinfo; // names and pictures of all required users
|
||||
$authors = $data->authors; // array potential reviewees
|
||||
@ -101,7 +107,8 @@ class workshopallocation_manual_renderer extends mod_workshop_renderer {
|
||||
if (is_null($allocation->submissionid)) {
|
||||
$o .= $this->output->container(get_string('nosubmissionfound', 'workshop'), 'info');
|
||||
} else {
|
||||
$o .= $this->output->container(format_string($allocation->submissiontitle), 'title');
|
||||
$link = $this->workshop->submission_url($allocation->submissionid);
|
||||
$o .= $this->output->container(html_writer::link($link, format_string($allocation->submissiontitle)), 'title');
|
||||
if (is_null($allocation->submissiongrade)) {
|
||||
$o .= $this->output->container(get_string('nogradeyet', 'workshop'), array('grade', 'missing'));
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user