MDL-26633 workshop: Allow to randomly allocate more than 30 reviews

For classes with many students, there may be valid cases for having more
than 30 reviews per submission / reviewer.

The patch changes the type of the input field so that it can freely
editable to any integer value.
This commit is contained in:
David Mudrák
2021-10-08 17:46:43 +02:00
parent e746dc75af
commit 78f9ea3b1c
2 changed files with 29 additions and 7 deletions
+9 -5
View File
@@ -263,13 +263,17 @@ class workshop_random_allocator implements workshop_allocator {
* @return array of integers
*/
public static function available_numofreviews_list() {
$options = array();
$options[30] = 30;
$options[20] = 20;
$options[15] = 15;
for ($i = 10; $i >= 0; $i--) {
$options = [];
for ($i = 100; $i > 20; $i = $i - 10) {
$options[$i] = $i;
}
for ($i = 20; $i >= 0; $i--) {
$options[$i] = $i;
}
return $options;
}