Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 77... Línea 77...
77
        $data = new \stdClass();
77
        $data = new \stdClass();
78
        $plugin = $assign->get_submission_plugin_by_type('file');
78
        $plugin = $assign->get_submission_plugin_by_type('file');
79
        $plugin->save($submission, $data);
79
        $plugin->save($submission, $data);
80
    }
80
    }
Línea 81... Línea 81...
81
 
81
 
82
    public function test_comments_quick_list() {
82
    public function test_comments_quick_list(): void {
83
        $this->resetAfterTest();
83
        $this->resetAfterTest();
84
        $course = $this->getDataGenerator()->create_course();
84
        $course = $this->getDataGenerator()->create_course();
Línea 85... Línea 85...
85
        $teacher = $this->getDataGenerator()->create_and_enrol($course, 'teacher');
85
        $teacher = $this->getDataGenerator()->create_and_enrol($course, 'teacher');
Línea 101... Línea 101...
101
 
101
 
102
        $comments = comments_quick_list::get_comments();
102
        $comments = comments_quick_list::get_comments();
103
        $this->assertEmpty($comments);
103
        $this->assertEmpty($comments);
Línea 104... Línea 104...
104
    }
104
    }
105
 
105
 
106
    public function test_page_editor() {
106
    public function test_page_editor(): void {
107
        $this->resetAfterTest();
107
        $this->resetAfterTest();
108
        $course = $this->getDataGenerator()->create_course();
108
        $course = $this->getDataGenerator()->create_course();
109
        $teacher = $this->getDataGenerator()->create_and_enrol($course, 'teacher');
109
        $teacher = $this->getDataGenerator()->create_and_enrol($course, 'teacher');
Línea 200... Línea 200...
200
 
200
 
201
        $notempty = page_editor::has_annotations_or_comments($grade->id, false);
201
        $notempty = page_editor::has_annotations_or_comments($grade->id, false);
202
        $this->assertFalse($notempty);
202
        $this->assertFalse($notempty);
Línea 203... Línea 203...
203
    }
203
    }
204
 
204
 
205
    public function test_document_services() {
205
    public function test_document_services(): void {
206
        $this->require_ghostscript();
206
        $this->require_ghostscript();
207
        $this->resetAfterTest();
207
        $this->resetAfterTest();
208
        $course = $this->getDataGenerator()->create_course();
208
        $course = $this->getDataGenerator()->create_course();
Línea 339... Línea 339...
339
    /**
339
    /**
340
     * Test Convert submission ad-hoc task.
340
     * Test Convert submission ad-hoc task.
341
     *
341
     *
342
     * @covers \assignfeedback_editpdf\task\convert_submission
342
     * @covers \assignfeedback_editpdf\task\convert_submission
343
     */
343
     */
344
    public function test_conversion_task() {
344
    public function test_conversion_task(): void {
345
        $this->require_ghostscript();
345
        $this->require_ghostscript();
346
        $this->resetAfterTest();
346
        $this->resetAfterTest();
347
        \core\cron::setup_user();
347
        \core\cron::setup_user();
Línea 348... Línea 348...
348
 
348
 
Línea 393... Línea 393...
393
 
393
 
394
    /**
394
    /**
395
     * Test that modifying the annotated pdf form return true when modified
395
     * Test that modifying the annotated pdf form return true when modified
396
     * and false when not modified.
396
     * and false when not modified.
397
     */
397
     */
398
    public function test_is_feedback_modified() {
398
    public function test_is_feedback_modified(): void {
399
        $this->require_ghostscript();
399
        $this->require_ghostscript();
400
        $this->resetAfterTest();
400
        $this->resetAfterTest();
401
        $course = $this->getDataGenerator()->create_course();
401
        $course = $this->getDataGenerator()->create_course();
402
        $teacher = $this->getDataGenerator()->create_and_enrol($course, 'teacher');
402
        $teacher = $this->getDataGenerator()->create_and_enrol($course, 'teacher');
Línea 527... Línea 527...
527
    /**
527
    /**
528
     * Test that overwriting a submission file deletes any associated conversions.
528
     * Test that overwriting a submission file deletes any associated conversions.
529
     *
529
     *
530
     * @covers \core_files\conversion::get_conversions_for_file
530
     * @covers \core_files\conversion::get_conversions_for_file
531
     */
531
     */
532
    public function test_submission_file_overridden() {
532
    public function test_submission_file_overridden(): void {
533
        $this->resetAfterTest();
533
        $this->resetAfterTest();
534
        $course = $this->getDataGenerator()->create_course();
534
        $course = $this->getDataGenerator()->create_course();
535
        $student = $this->getDataGenerator()->create_and_enrol($course, 'student');
535
        $student = $this->getDataGenerator()->create_and_enrol($course, 'student');
536
        $assign = $this->create_instance($course, [
536
        $assign = $this->create_instance($course, [
537
            'assignsubmission_onlinetext_enabled' => 1,
537
            'assignsubmission_onlinetext_enabled' => 1,
Línea 583... Línea 583...
583
    /**
583
    /**
584
     * Tests that when the plugin is not enabled for an assignment it does not create conversion tasks.
584
     * Tests that when the plugin is not enabled for an assignment it does not create conversion tasks.
585
     *
585
     *
586
     * @covers \assignfeedback_editpdf\event\observer
586
     * @covers \assignfeedback_editpdf\event\observer
587
     */
587
     */
588
    public function test_submission_not_enabled() {
588
    public function test_submission_not_enabled(): void {
589
        $this->require_ghostscript();
589
        $this->require_ghostscript();
590
        $this->resetAfterTest();
590
        $this->resetAfterTest();
591
        \core\cron::setup_user();
591
        \core\cron::setup_user();
Línea 592... Línea 592...
592
 
592