Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

Unit tests for Random allocation

Copyright: 2009 David Mudrak <david.mudrak@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 324 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes


Class: workshopallocation_random_testcase  - X-Ref

setUp()   X-Ref
No description

tearDown()   X-Ref
No description

test_self_allocation_empty_values()   X-Ref
No description

test_self_allocation_equal_user_groups()   X-Ref
No description

test_self_allocation_different_user_groups()   X-Ref
No description

test_self_allocation_skip_existing()   X-Ref
No description

test_get_author_ids()   X-Ref
No description

test_index_submissions_by_authors()   X-Ref
No description

test_index_submissions_by_authors_duplicate_author()   X-Ref


test_get_unique_allocations()   X-Ref
No description

test_get_unkept_assessments_no_keep_selfassessments()   X-Ref
No description

test_get_unkept_assessments_keep_selfassessments()   X-Ref
No description

test_convert_assessments_to_links()   X-Ref
Aggregates assessment info per author and per reviewer


test_convert_assessments_to_links_empty()   X-Ref
Trivial case


test_get_element_with_lowest_workload_deterministic()   X-Ref
If there is a single element with the lowest workload, it should be chosen


test_get_element_with_lowest_workload_impossible()   X-Ref
If there are no elements available, must return false


test_get_element_with_lowest_workload_random()   X-Ref
If there are several elements with the lowest workload, one of them should be chosen randomly


test_get_element_with_lowest_workload_random_floats()   X-Ref
Floats should be rounded before they are compared

This should test

test_filter_current_assessments()   X-Ref
Filter new assessments so they do not contain existing