mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
Display a button to run aggregation process
This commit is contained in:
parent
f8236f649b
commit
e807e9a342
@ -341,3 +341,13 @@
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
/**
|
||||
* Misc
|
||||
*/
|
||||
.mod-workshop div.buttonsbar {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mod-workshop div.buttonwithhelp div {
|
||||
display: inline;
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ case workshop::PHASE_ASSESSMENT:
|
||||
case workshop::PHASE_EVALUATION:
|
||||
$pagingvar = 'page';
|
||||
$page = optional_param($pagingvar, 0, PARAM_INT);
|
||||
$perpage = 1000; // todo let the user modify this
|
||||
$perpage = 10; // todo let the user modify this
|
||||
$groups = ''; // todo let the user choose the group
|
||||
$sortby = 'totalgrade'; // todo let the user choose the column to sort by
|
||||
$sorthow = 'DESC'; // todo detto
|
||||
@ -168,6 +168,23 @@ case workshop::PHASE_EVALUATION:
|
||||
$showauthornames = has_capability('mod/workshop:viewauthornames', $PAGE->context);
|
||||
$showreviewernames = has_capability('mod/workshop:viewreviewernames', $PAGE->context);
|
||||
|
||||
if (has_capability('mod/workshop:overridegrades', $PAGE->context)) {
|
||||
$form = new html_form();
|
||||
$form->url = $workshop->aggregate_url();
|
||||
$form->button = new html_button();
|
||||
$form->button->text = get_string('aggregategrades', 'workshop');
|
||||
$form->method = 'post';
|
||||
|
||||
$helpicon = new moodle_help_icon();
|
||||
$helpicon->page = 'aggregate';
|
||||
$helpicon->text = get_string('aggregategrades', 'workshop');
|
||||
$helpicon->module = 'workshop';
|
||||
|
||||
echo $OUTPUT->box_start('buttonsbar');
|
||||
echo $OUTPUT->box($OUTPUT->button($form) . $OUTPUT->help_icon($helpicon), 'buttonwithhelp');
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
|
||||
// prepare paging bar
|
||||
$pagingbar = new moodle_paging_bar();
|
||||
$pagingbar->totalcount = $data->totalcount;
|
||||
|
Loading…
x
Reference in New Issue
Block a user