Proyectos de Subversion Moodle

Rev

Rev 11 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 11 Rev 1441
Línea 28... Línea 28...
28
 * @package    mod_assign
28
 * @package    mod_assign
29
 * @category   test
29
 * @category   test
30
 * @copyright  2017 Andrés Melo <andres.torres@blackboard.com>
30
 * @copyright  2017 Andrés Melo <andres.torres@blackboard.com>
31
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
31
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
32
 */
32
 */
33
class markerallocation_test extends \advanced_testcase {
33
final class markerallocation_test extends \advanced_testcase {
Línea 34... Línea 34...
34
 
34
 
35
    /** @var \stdClass course record. */
35
    /** @var \stdClass course record. */
Línea 36... Línea 36...
36
    private $course;
36
    private $course;
Línea 47... Línea 47...
47
 
47
 
48
        // Setting assing module, markingworkflow and markingallocation set to 1 to enable marker allocation.
48
        // Setting assing module, markingworkflow and markingallocation set to 1 to enable marker allocation.
49
        $record = new \stdClass();
49
        $record = new \stdClass();
Línea 50... Línea 50...
50
        $record->course = $this->course;
50
        $record->course = $this->course;
51
 
51
 
52
        $modulesettings = array(
52
        $modulesettings = [
53
            'alwaysshowdescription'             => 1,
53
            'alwaysshowdescription'             => 1,
54
            'submissiondrafts'                  => 1,
54
            'submissiondrafts'                  => 1,
55
            'requiresubmissionstatement'        => 0,
55
            'requiresubmissionstatement'        => 0,
Línea 62... Línea 62...
62
            'cutoffdate'                        => 0,
62
            'cutoffdate'                        => 0,
63
            'teamsubmission'                    => 0,
63
            'teamsubmission'                    => 0,
64
            'requireallteammemberssubmit'       => 0,
64
            'requireallteammemberssubmit'       => 0,
65
            'teamsubmissiongroupingid'          => 0,
65
            'teamsubmissiongroupingid'          => 0,
66
            'blindmarking'                      => 0,
66
            'blindmarking'                      => 0,
67
            'attemptreopenmethod'               => 'none',
67
            'attemptreopenmethod'               => 'untilpass',
68
            'maxattempts'                       => -1,
68
            'maxattempts'                       => 1,
69
            'markingworkflow'                   => 1,
69
            'markingworkflow'                   => 1,
70
            'markingallocation'                 => 1,
70
            'markingallocation'                 => 1,
71
        );
71
        ];
Línea 72... Línea 72...
72
 
72
 
Línea 73... Línea 73...
73
        $assignelement = $this->getDataGenerator()->create_module('assign', $record, $modulesettings);
73
        $assignelement = $this->getDataGenerator()->create_module('assign', $record, $modulesettings);
Línea 74... Línea 74...
74
 
74
 
75
        $coursesectionid = course_add_cm_to_section($this->course->id, $assignelement->id, 1);
75
        $coursesectionid = course_add_cm_to_section($this->course->id, $assignelement->id, 1, null, 'assign');
76
 
76
 
77
        // Adding users to the course.
77
        // Adding users to the course.