Merge branch 'MDL-51932-master-workshopswitch' of git://github.com/mudrd8mz/moodle
This commit is contained in:
@@ -297,12 +297,18 @@ $string['subplugintype_workshopform'] = 'Grading strategy';
|
||||
$string['subplugintype_workshopform_plural'] = 'Grading strategies';
|
||||
$string['switchingphase'] = 'Switching phase';
|
||||
$string['switchphase'] = 'Switch phase';
|
||||
$string['switchphaseauto'] = 'Switching has been scheduled';
|
||||
$string['switchphasenext'] = 'Switch to the next phase';
|
||||
$string['switchphase10'] = 'Switch to the setup phase';
|
||||
$string['switchphase10info'] = 'You are about to switch the workshop into the <strong>Setup phase</strong>. In this phase, users cannot modify their submissions or their assessments. Teachers may use this phase to change workshop settings, modify the grading strategy or tweak assessment forms.';
|
||||
$string['switchphase20'] = 'Switch to the submission phase';
|
||||
$string['switchphase20info'] = 'You are about to switch the workshop into the <strong>Submission phase</strong>. Students may submit their work during this phase (within the submission access control dates, if set). Teachers may allocate submissions for peer review.';
|
||||
$string['switchphase30'] = 'Switch to the assessment phase';
|
||||
$string['switchphase30auto'] = 'Workshop will automatically switch into the assessment phase after {$a->daydatetime} ({$a->distanceday})';
|
||||
$string['switchphase30info'] = 'You are about to switch the workshop into the <strong>Assessment phase</strong>. In this phase, reviewers may assess the submissions they have been allocated (within the assessment access control dates, if set).';
|
||||
$string['switchphase40'] = 'Switch to the evaluation phase';
|
||||
$string['switchphase40info'] = 'You are about to switch the workshop into the <strong>Grading evaluation phase</strong>. In this phase, users cannot modify their submissions or their assessments. Teachers may use the grading evaluation tools to calculate final grades and provide feedback for reviewers.';
|
||||
$string['switchphase50'] = 'Close workshop';
|
||||
$string['switchphase50info'] = 'You are about to close the workshop. This will result in the calculated grades appearing in the gradebook. Students may view their submissions and their submission assessments.';
|
||||
$string['taskassesspeers'] = 'Assess peers';
|
||||
$string['taskassesspeersdetails'] = 'total: {$a->total}<br />pending: {$a->todo}';
|
||||
|
||||
+20
-15
@@ -295,31 +295,36 @@ class mod_workshop_renderer extends plugin_renderer_base {
|
||||
foreach ($plan->phases as $phasecode => $phase) {
|
||||
$o .= html_writer::start_tag('dl', array('class' => 'phase'));
|
||||
$actions = '';
|
||||
foreach ($phase->actions as $action) {
|
||||
switch ($action->type) {
|
||||
case 'switchphase':
|
||||
$icon = 'i/marker';
|
||||
if ($phasecode == workshop::PHASE_ASSESSMENT
|
||||
and $plan->workshop->phase == workshop::PHASE_SUBMISSION
|
||||
and $plan->workshop->phaseswitchassessment) {
|
||||
$icon = 'i/scheduled';
|
||||
|
||||
if ($phase->active) {
|
||||
// Mark the section as the current one.
|
||||
$icon = $this->output->pix_icon('i/marked', '', 'moodle', ['role' => 'presentation']);
|
||||
$actions .= get_string('userplancurrentphase', 'workshop').' '.$icon;
|
||||
|
||||
} else {
|
||||
// Display a control widget to switch to the given phase or mark the phase as the current one.
|
||||
foreach ($phase->actions as $action) {
|
||||
if ($action->type === 'switchphase') {
|
||||
if ($phasecode == workshop::PHASE_ASSESSMENT && $plan->workshop->phase == workshop::PHASE_SUBMISSION
|
||||
&& $plan->workshop->phaseswitchassessment) {
|
||||
$icon = new pix_icon('i/scheduled', get_string('switchphaseauto', 'mod_workshop'));
|
||||
} else {
|
||||
$icon = new pix_icon('i/marker', get_string('switchphase'.$phasecode, 'mod_workshop'));
|
||||
}
|
||||
$actions .= $this->output->action_icon($action->url,
|
||||
new pix_icon($icon, get_string('switchphase', 'workshop')));
|
||||
break;
|
||||
$actions .= $this->output->action_icon($action->url, $icon, null, null, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($actions)) {
|
||||
$actions = $this->output->container($actions, 'actions');
|
||||
}
|
||||
$title = html_writer::span($phase->title, '', array('id' => 'mod_workshop-userplancurrenttasks'));
|
||||
if ($phase->active) {
|
||||
$title .= ' ' . html_writer::span(get_string('userplancurrentphase', 'workshop'), 'accesshide');
|
||||
}
|
||||
$classes = 'phase' . $phasecode;
|
||||
if ($phase->active) {
|
||||
$title = html_writer::span($phase->title, 'phasetitle', ['id' => 'mod_workshop-userplancurrenttasks']);
|
||||
$classes .= ' active';
|
||||
} else {
|
||||
$title = html_writer::span($phase->title, 'phasetitle');
|
||||
$classes .= ' nonactive';
|
||||
}
|
||||
$o .= html_writer::start_tag('dt', array('class' => $classes));
|
||||
|
||||
@@ -251,13 +251,16 @@
|
||||
.path-mod-workshop .userplan dt.active {
|
||||
vertical-align: top;
|
||||
color: black;
|
||||
font-size: 140%;
|
||||
border: 1px solid #ddd;
|
||||
border-bottom: 0;
|
||||
border-top: 0;
|
||||
background: #e7f1c3;
|
||||
}
|
||||
|
||||
.path-mod-workshop .userplan dt.active .phasetitle {
|
||||
font-size: 140%;
|
||||
}
|
||||
|
||||
.path-mod-workshop .userplan dl {
|
||||
width: 20%;
|
||||
float: left;
|
||||
@@ -355,7 +358,7 @@
|
||||
}
|
||||
|
||||
.path-mod-workshop .userplan dt .actions {
|
||||
display: inline;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.path-mod-workshop .userplan dd.phasetasks li {
|
||||
|
||||
Reference in New Issue
Block a user