mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 19:36:41 +02:00
Added the setting of League Table options to the Administration page.
This commit is contained in:
parent
2e54fffcaa
commit
bfd68abc58
2 changed files with 53 additions and 0 deletions
|
@ -1372,6 +1372,29 @@
|
|||
}
|
||||
|
||||
|
||||
/*************** update (league table options teacher) ***************************/
|
||||
elseif ($action == 'updateleaguetable') {
|
||||
|
||||
if (!isteacher($course->id)) {
|
||||
error("Only teachers can look at this page");
|
||||
}
|
||||
|
||||
$form = (object)$_POST;
|
||||
|
||||
// save number of entries in showleaguetable option
|
||||
if ($form->nentries == 'All') {
|
||||
$form->nentries = 99;
|
||||
}
|
||||
set_field("workshop", "showleaguetable", $form->nentries, "id", "$workshop->id");
|
||||
|
||||
// save the anonymous option
|
||||
set_field("workshop", "anonymous", $form->anonymous, "id", "$workshop->id");
|
||||
add_to_log($course->id, "workshop", "league table", "view.php?id=$cm->id", $form->nentries);
|
||||
|
||||
redirect("submissions.php?action=adminlist&id=$cm->id");
|
||||
}
|
||||
|
||||
|
||||
/*************** update over allocation (by teacher) ***************************/
|
||||
elseif ($action == 'updateoverallocation') {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue