Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 42... Línea 42...
42
 * @category  test
42
 * @category  test
43
 * @copyright 2009 Jerome Mouneyrac
43
 * @copyright 2009 Jerome Mouneyrac
44
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
44
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
45
 */
45
 */
46
class filelib_test extends \advanced_testcase {
46
class filelib_test extends \advanced_testcase {
47
    public function test_format_postdata_for_curlcall() {
47
    public function test_format_postdata_for_curlcall(): void {
Línea 48... Línea 48...
48
 
48
 
49
        // POST params with just simple types.
49
        // POST params with just simple types.
50
        $postdatatoconvert = array( 'userid' => 1, 'roleid' => 22, 'name' => 'john');
50
        $postdatatoconvert = array( 'userid' => 1, 'roleid' => 22, 'name' => 'john');
51
        $expectedresult = "userid=1&roleid=22&name=john";
51
        $expectedresult = "userid=1&roleid=22&name=john";
Línea 92... Línea 92...
92
        $expectedresult = "members[0][groupid]=1&members[0][userid]=1&members[1][groupid]=1&members[1][userid]=2";
92
        $expectedresult = "members[0][groupid]=1&members[0][userid]=1&members[1][groupid]=1&members[1][userid]=2";
93
        $postdata = format_postdata_for_curlcall($postdatatoconvert);
93
        $postdata = format_postdata_for_curlcall($postdatatoconvert);
94
        $this->assertEquals($expectedresult, $postdata);
94
        $this->assertEquals($expectedresult, $postdata);
95
    }
95
    }
Línea 96... Línea 96...
96
 
96
 
97
    public function test_download_file_content() {
97
    public function test_download_file_content(): void {
Línea 98... Línea 98...
98
        global $CFG;
98
        global $CFG;
99
 
99
 
Línea 202... Línea 202...
202
    }
202
    }
Línea 203... Línea 203...
203
 
203
 
204
    /**
204
    /**
205
     * Test curl basics.
205
     * Test curl basics.
206
     */
206
     */
207
    public function test_curl_basics() {
207
    public function test_curl_basics(): void {
Línea 208... Línea 208...
208
        global $CFG;
208
        global $CFG;
209
 
209
 
Línea 244... Línea 244...
244
    }
244
    }
Línea 245... Línea 245...
245
 
245
 
246
    /**
246
    /**
247
     * Test a curl basic request with security enabled.
247
     * Test a curl basic request with security enabled.
248
     */
248
     */
249
    public function test_curl_basics_with_security_helper() {
249
    public function test_curl_basics_with_security_helper(): void {
Línea 250... Línea 250...
250
        global $USER;
250
        global $USER;
Línea 251... Línea 251...
251
 
251
 
Línea 305... Línea 305...
305
 
305
 
306
        $events = $sink->get_events();
306
        $events = $sink->get_events();
307
        $this->assertCount(2, $events);
307
        $this->assertCount(2, $events);
Línea 308... Línea 308...
308
    }
308
    }
309
 
309
 
Línea 310... Línea 310...
310
    public function test_curl_redirects() {
310
    public function test_curl_redirects(): void {
Línea 311... Línea 311...
311
        global $CFG;
311
        global $CFG;
Línea 406... Línea 406...
406
    }
406
    }
Línea 407... Línea 407...
407
 
407
 
408
    /**
408
    /**
409
     * Test that redirects to blocked hosts are blocked.
409
     * Test that redirects to blocked hosts are blocked.
410
     */
410
     */
411
    public function test_curl_blocked_redirect() {
411
    public function test_curl_blocked_redirect(): void {
Línea 412... Línea 412...
412
        $this->resetAfterTest();
412
        $this->resetAfterTest();
Línea 413... Línea 413...
413
 
413
 
Línea 438... Línea 438...
438
        $this->assertSame($blockedstring, $contents);
438
        $this->assertSame($blockedstring, $contents);
439
        $this->assertSame(0, $curl->get_errno());
439
        $this->assertSame(0, $curl->get_errno());
440
        $this->assertDebuggingCalled();
440
        $this->assertDebuggingCalled();
441
    }
441
    }
Línea 442... Línea 442...
442
 
442
 
443
    public function test_curl_relative_redirects() {
443
    public function test_curl_relative_redirects(): void {
444
        // Test relative location redirects.
444
        // Test relative location redirects.
Línea 445... Línea 445...
445
        $testurl = $this->getExternalTestFileUrl('/test_relative_redir.php');
445
        $testurl = $this->getExternalTestFileUrl('/test_relative_redir.php');
446
 
446
 
Línea 494... Línea 494...
494
        $this->assertSame(0, $curl->get_errno());
494
        $this->assertSame(0, $curl->get_errno());
495
        $this->assertSame(1, $curl->info['redirect_count']);
495
        $this->assertSame(1, $curl->info['redirect_count']);
496
        $this->assertSame('done', $contents);
496
        $this->assertSame('done', $contents);
497
    }
497
    }
Línea 498... Línea 498...
498
 
498
 
499
    public function test_curl_proxybypass() {
499
    public function test_curl_proxybypass(): void {
500
        global $CFG;
500
        global $CFG;
Línea 501... Línea 501...
501
        $testurl = $this->getExternalTestFileUrl('/test.html');
501
        $testurl = $this->getExternalTestFileUrl('/test.html');
502
 
502
 
Línea 524... Línea 524...
524
    }
524
    }
Línea 525... Línea 525...
525
 
525
 
526
    /**
526
    /**
527
     * Test that duplicate lines in the curl header are removed.
527
     * Test that duplicate lines in the curl header are removed.
528
     */
528
     */
529
    public function test_duplicate_curl_header() {
529
    public function test_duplicate_curl_header(): void {
Línea 530... Línea 530...
530
        $testurl = $this->getExternalTestFileUrl('/test_post.php');
530
        $testurl = $this->getExternalTestFileUrl('/test_post.php');
531
 
531
 
532
        $curl = new \curl();
532
        $curl = new \curl();
Línea 536... Línea 536...
536
        $curl->setHeader($header);
536
        $curl->setHeader($header);
537
        $this->assertCount(1, $curl->header);
537
        $this->assertCount(1, $curl->header);
538
        $this->assertEquals($headerdata, $curl->header[0]);
538
        $this->assertEquals($headerdata, $curl->header[0]);
539
    }
539
    }
Línea 540... Línea 540...
540
 
540
 
541
    public function test_curl_post() {
541
    public function test_curl_post(): void {
Línea 542... Línea 542...
542
        $testurl = $this->getExternalTestFileUrl('/test_post.php');
542
        $testurl = $this->getExternalTestFileUrl('/test_post.php');
543
 
543
 
544
        // Test post request.
544
        // Test post request.
Línea 557... Línea 557...
557
        $this->assertSame('200 OK', reset($response));
557
        $this->assertSame('200 OK', reset($response));
558
        $this->assertSame(0, $curl->get_errno());
558
        $this->assertSame(0, $curl->get_errno());
559
        $this->assertSame('OK', $contents);
559
        $this->assertSame('OK', $contents);
560
    }
560
    }
Línea 561... Línea 561...
561
 
561
 
562
    public function test_curl_file() {
562
    public function test_curl_file(): void {
563
        $this->resetAfterTest();
563
        $this->resetAfterTest();
Línea 564... Línea 564...
564
        $testurl = $this->getExternalTestFileUrl('/test_file.php');
564
        $testurl = $this->getExternalTestFileUrl('/test_file.php');
565
 
565
 
Línea 580... Línea 580...
580
        $curl = new \curl();
580
        $curl = new \curl();
581
        $contents = $curl->post($testurl, $data);
581
        $contents = $curl->post($testurl, $data);
582
        $this->assertSame('OK', $contents);
582
        $this->assertSame('OK', $contents);
583
    }
583
    }
Línea 584... Línea 584...
584
 
584
 
585
    public function test_curl_file_name() {
585
    public function test_curl_file_name(): void {
586
        $this->resetAfterTest();
586
        $this->resetAfterTest();
Línea 587... Línea 587...
587
        $testurl = $this->getExternalTestFileUrl('/test_file_name.php');
587
        $testurl = $this->getExternalTestFileUrl('/test_file_name.php');
588
 
588
 
Línea 603... Línea 603...
603
        $curl = new \curl();
603
        $curl = new \curl();
604
        $contents = $curl->post($testurl, $data);
604
        $contents = $curl->post($testurl, $data);
605
        $this->assertSame('OK', $contents);
605
        $this->assertSame('OK', $contents);
606
    }
606
    }
Línea 607... Línea 607...
607
 
607
 
Línea 608... Línea 608...
608
    public function test_curl_protocols() {
608
    public function test_curl_protocols(): void {
609
 
609
 
610
        // HTTP and HTTPS requests were verified in previous requests. Now check
610
        // HTTP and HTTPS requests were verified in previous requests. Now check
Línea 648... Línea 648...
648
     * Testing prepare draft area
648
     * Testing prepare draft area
649
     *
649
     *
650
     * @copyright 2012 Dongsheng Cai {@link http://dongsheng.org}
650
     * @copyright 2012 Dongsheng Cai {@link http://dongsheng.org}
651
     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
651
     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
652
     */
652
     */
653
    public function test_prepare_draft_area() {
653
    public function test_prepare_draft_area(): void {
654
        global $USER, $DB;
654
        global $USER, $DB;
Línea 655... Línea 655...
655
 
655
 
Línea 656... Línea 656...
656
        $this->resetAfterTest(true);
656
        $this->resetAfterTest(true);
Línea 759... Línea 759...
759
     * Testing deleting original files.
759
     * Testing deleting original files.
760
     *
760
     *
761
     * @copyright 2012 Dongsheng Cai {@link http://dongsheng.org}
761
     * @copyright 2012 Dongsheng Cai {@link http://dongsheng.org}
762
     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
762
     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
763
     */
763
     */
764
    public function test_delete_original_file_from_draft() {
764
    public function test_delete_original_file_from_draft(): void {
765
        global $USER, $DB;
765
        global $USER, $DB;
Línea 766... Línea 766...
766
 
766
 
Línea 767... Línea 767...
767
        $this->resetAfterTest(true);
767
        $this->resetAfterTest(true);
Línea 830... Línea 830...
830
    }
830
    }
Línea 831... Línea 831...
831
 
831
 
832
    /**
832
    /**
833
     * Test avoid file merging when working with draft areas.
833
     * Test avoid file merging when working with draft areas.
834
     */
834
     */
835
    public function test_ignore_file_merging_in_draft_area() {
835
    public function test_ignore_file_merging_in_draft_area(): void {
Línea 836... Línea 836...
836
        global $USER, $DB;
836
        global $USER, $DB;
Línea 837... Línea 837...
837
 
837
 
Línea 899... Línea 899...
899
    }
899
    }
Línea 900... Línea 900...
900
 
900
 
901
    /**
901
    /**
902
     * Testing deleting file_save_draft_area_files won't accidentally wipe unintended files.
902
     * Testing deleting file_save_draft_area_files won't accidentally wipe unintended files.
903
     */
903
     */
904
    public function test_file_save_draft_area_files_itemid_cannot_be_false() {
904
    public function test_file_save_draft_area_files_itemid_cannot_be_false(): void {
905
        global $USER, $DB;
905
        global $USER, $DB;
Línea 906... Línea 906...
906
        $this->resetAfterTest();
906
        $this->resetAfterTest();
907
 
907
 
Línea 921... Línea 921...
921
    }
921
    }
Línea 922... Línea 922...
922
 
922
 
923
    /**
923
    /**
924
     * Tests the strip_double_headers function in the curl class.
924
     * Tests the strip_double_headers function in the curl class.
925
     */
925
     */
926
    public function test_curl_strip_double_headers() {
926
    public function test_curl_strip_double_headers(): void {
927
        // Example from issue tracker.
927
        // Example from issue tracker.
928
        $mdl30648example = <<<EOF
928
        $mdl30648example = <<<EOF
929
HTTP/1.0 407 Proxy Authentication Required
929
HTTP/1.0 407 Proxy Authentication Required
930
Server: squid/2.7.STABLE9
930
Server: squid/2.7.STABLE9
Línea 1166... Línea 1166...
1166
    }
1166
    }
Línea 1167... Línea 1167...
1167
 
1167
 
1168
    /**
1168
    /**
1169
     * Tests the get_mimetype_description function.
1169
     * Tests the get_mimetype_description function.
1170
     */
1170
     */
1171
    public function test_get_mimetype_description() {
1171
    public function test_get_mimetype_description(): void {
Línea 1172... Línea 1172...
1172
        $this->resetAfterTest();
1172
        $this->resetAfterTest();
1173
 
1173
 
1174
        // Test example type (.doc).
1174
        // Test example type (.doc).
Línea 1202... Línea 1202...
1202
    }
1202
    }
Línea 1203... Línea 1203...
1203
 
1203
 
1204
    /**
1204
    /**
1205
     * Tests the get_mimetypes_array function.
1205
     * Tests the get_mimetypes_array function.
1206
     */
1206
     */
1207
    public function test_get_mimetypes_array() {
1207
    public function test_get_mimetypes_array(): void {
Línea 1208... Línea 1208...
1208
        $mimeinfo = get_mimetypes_array();
1208
        $mimeinfo = get_mimetypes_array();
1209
 
1209
 
1210
        // Test example MIME type (doc).
1210
        // Test example MIME type (doc).
Línea 1221... Línea 1221...
1221
    }
1221
    }
Línea 1222... Línea 1222...
1222
 
1222
 
1223
    /**
1223
    /**
1224
     * Tests for get_mimetype_for_sending function.
1224
     * Tests for get_mimetype_for_sending function.
1225
     */
1225
     */
1226
    public function test_get_mimetype_for_sending() {
1226
    public function test_get_mimetype_for_sending(): void {
1227
        // Without argument.
1227
        // Without argument.
Línea 1228... Línea 1228...
1228
        $this->assertEquals('application/octet-stream', get_mimetype_for_sending());
1228
        $this->assertEquals('application/octet-stream', get_mimetype_for_sending());
1229
 
1229
 
Línea 1245... Línea 1245...
1245
    }
1245
    }
Línea 1246... Línea 1246...
1246
 
1246
 
1247
    /**
1247
    /**
1248
     * Test curl agent settings.
1248
     * Test curl agent settings.
1249
     */
1249
     */
1250
    public function test_curl_useragent() {
1250
    public function test_curl_useragent(): void {
1251
        $curl = new testable_curl();
1251
        $curl = new testable_curl();
1252
        $options = $curl->get_options();
1252
        $options = $curl->get_options();
Línea 1253... Línea 1253...
1253
        $this->assertNotEmpty($options);
1253
        $this->assertNotEmpty($options);
Línea 1294... Línea 1294...
1294
    }
1294
    }
Línea 1295... Línea 1295...
1295
 
1295
 
1296
    /**
1296
    /**
1297
     * Test file_rewrite_pluginfile_urls.
1297
     * Test file_rewrite_pluginfile_urls.
1298
     */
1298
     */
Línea 1299... Línea 1299...
1299
    public function test_file_rewrite_pluginfile_urls() {
1299
    public function test_file_rewrite_pluginfile_urls(): void {
1300
 
1300
 
Línea 1301... Línea 1301...
1301
        $syscontext = \context_system::instance();
1301
        $syscontext = \context_system::instance();
Línea 1314... Línea 1314...
1314
    }
1314
    }
Línea 1315... Línea 1315...
1315
 
1315
 
1316
    /**
1316
    /**
1317
     * Test file_rewrite_pluginfile_urls with includetoken.
1317
     * Test file_rewrite_pluginfile_urls with includetoken.
1318
     */
1318
     */
1319
    public function test_file_rewrite_pluginfile_urls_includetoken() {
1319
    public function test_file_rewrite_pluginfile_urls_includetoken(): void {
Línea 1320... Línea 1320...
1320
        global $USER, $CFG;
1320
        global $USER, $CFG;
Línea 1321... Línea 1321...
1321
 
1321
 
Línea 1363... Línea 1363...
1363
    }
1363
    }
Línea 1364... Línea 1364...
1364
 
1364
 
1365
    /**
1365
    /**
1366
     * Test file_rewrite_pluginfile_urls with includetoken with slasharguments disabled..
1366
     * Test file_rewrite_pluginfile_urls with includetoken with slasharguments disabled..
1367
     */
1367
     */
1368
    public function test_file_rewrite_pluginfile_urls_includetoken_no_slashargs() {
1368
    public function test_file_rewrite_pluginfile_urls_includetoken_no_slashargs(): void {
Línea 1369... Línea 1369...
1369
        global $USER, $CFG;
1369
        global $USER, $CFG;
Línea 1370... Línea 1370...
1370
 
1370
 
Línea 1435... Línea 1435...
1435
    }
1435
    }
Línea 1436... Línea 1436...
1436
 
1436
 
1437
    /**
1437
    /**
1438
     * Test file_merge_files_from_draft_area_into_filearea
1438
     * Test file_merge_files_from_draft_area_into_filearea
1439
     */
1439
     */
1440
    public function test_file_merge_files_from_draft_area_into_filearea() {
1440
    public function test_file_merge_files_from_draft_area_into_filearea(): void {
Línea 1441... Línea 1441...
1441
        global $USER, $CFG;
1441
        global $USER, $CFG;
1442
 
1442
 
1443
        $this->resetAfterTest(true);
1443
        $this->resetAfterTest(true);
Línea 1540... Línea 1540...
1540
    }
1540
    }
Línea 1541... Línea 1541...
1541
 
1541
 
1542
    /**
1542
    /**
1543
     * Test max area bytes for file_merge_files_from_draft_area_into_filearea
1543
     * Test max area bytes for file_merge_files_from_draft_area_into_filearea
1544
     */
1544
     */
1545
    public function test_file_merge_files_from_draft_area_into_filearea_max_area_bytes() {
1545
    public function test_file_merge_files_from_draft_area_into_filearea_max_area_bytes(): void {
Línea 1546... Línea 1546...
1546
        global $USER;
1546
        global $USER;
1547
 
1547
 
1548
        $this->resetAfterTest(true);
1548
        $this->resetAfterTest(true);
Línea 1563... Línea 1563...
1563
    }
1563
    }
Línea 1564... Línea 1564...
1564
 
1564
 
1565
    /**
1565
    /**
1566
     * Test max file bytes for file_merge_files_from_draft_area_into_filearea
1566
     * Test max file bytes for file_merge_files_from_draft_area_into_filearea
1567
     */
1567
     */
1568
    public function test_file_merge_files_from_draft_area_into_filearea_max_file_bytes() {
1568
    public function test_file_merge_files_from_draft_area_into_filearea_max_file_bytes(): void {
Línea 1569... Línea 1569...
1569
        global $USER;
1569
        global $USER;
1570
 
1570
 
1571
        $this->resetAfterTest(true);
1571
        $this->resetAfterTest(true);
Línea 1591... Línea 1591...
1591
    }
1591
    }
Línea 1592... Línea 1592...
1592
 
1592
 
1593
    /**
1593
    /**
1594
     * Test max file number for file_merge_files_from_draft_area_into_filearea
1594
     * Test max file number for file_merge_files_from_draft_area_into_filearea
1595
     */
1595
     */
1596
    public function test_file_merge_files_from_draft_area_into_filearea_max_files() {
1596
    public function test_file_merge_files_from_draft_area_into_filearea_max_files(): void {
Línea 1597... Línea 1597...
1597
        global $USER;
1597
        global $USER;
1598
 
1598
 
1599
        $this->resetAfterTest(true);
1599
        $this->resetAfterTest(true);
Línea 1617... Línea 1617...
1617
    }
1617
    }
Línea 1618... Línea 1618...
1618
 
1618
 
1619
    /**
1619
    /**
1620
     * Test file_get_draft_area_info.
1620
     * Test file_get_draft_area_info.
1621
     */
1621
     */
1622
    public function test_file_get_draft_area_info() {
1622
    public function test_file_get_draft_area_info(): void {
Línea 1623... Línea 1623...
1623
        global $USER;
1623
        global $USER;
1624
 
1624
 
1625
        $this->resetAfterTest(true);
1625
        $this->resetAfterTest(true);
Línea 1674... Línea 1674...
1674
    }
1674
    }
Línea 1675... Línea 1675...
1675
 
1675
 
1676
    /**
1676
    /**
1677
     * Test file_get_file_area_info.
1677
     * Test file_get_file_area_info.
1678
     */
1678
     */
1679
    public function test_file_get_file_area_info() {
1679
    public function test_file_get_file_area_info(): void {
Línea 1680... Línea 1680...
1680
        global $USER;
1680
        global $USER;
1681
 
1681
 
1682
        $this->resetAfterTest(true);
1682
        $this->resetAfterTest(true);
Línea 1728... Línea 1728...
1728
    }
1728
    }
Línea 1729... Línea 1729...
1729
 
1729
 
1730
    /**
1730
    /**
1731
     * Test confirming that draft files not referenced in the editor text are removed.
1731
     * Test confirming that draft files not referenced in the editor text are removed.
1732
     */
1732
     */
1733
    public function test_file_remove_editor_orphaned_files() {
1733
    public function test_file_remove_editor_orphaned_files(): void {
1734
        global $USER, $CFG;
1734
        global $USER, $CFG;
1735
        $this->resetAfterTest(true);
1735
        $this->resetAfterTest(true);
Línea 1736... Línea 1736...
1736
        $this->setAdminUser();
1736
        $this->setAdminUser();
Línea 1778... Línea 1778...
1778
    }
1778
    }
Línea 1779... Línea 1779...
1779
 
1779
 
1780
    /**
1780
    /**
1781
     * Test that all files in the draftarea are returned.
1781
     * Test that all files in the draftarea are returned.
1782
     */
1782
     */
1783
    public function test_file_get_all_files_in_draftarea() {
1783
    public function test_file_get_all_files_in_draftarea(): void {
1784
        $this->resetAfterTest();
1784
        $this->resetAfterTest();
Línea 1785... Línea 1785...
1785
        $this->setAdminUser();
1785
        $this->setAdminUser();
1786
 
1786
 
Línea 1824... Línea 1824...
1824
        $this->assertEquals($thirdrecord['filename'], $allfiles[2]->filename);
1824
        $this->assertEquals($thirdrecord['filename'], $allfiles[2]->filename);
1825
        $this->assertEquals($fourthrecord['filename'], $allfiles[3]->filename);
1825
        $this->assertEquals($fourthrecord['filename'], $allfiles[3]->filename);
1826
        $this->assertEquals($fifthrecord['filename'], $allfiles[4]->filename);
1826
        $this->assertEquals($fifthrecord['filename'], $allfiles[4]->filename);
1827
    }
1827
    }
Línea 1828... Línea 1828...
1828
 
1828
 
1829
    public function test_file_copy_file_to_file_area() {
1829
    public function test_file_copy_file_to_file_area(): void {
1830
        // Create two files in different draft areas but owned by the same user.
1830
        // Create two files in different draft areas but owned by the same user.
1831
        global $USER;
1831
        global $USER;
1832
        $this->resetAfterTest(true);
1832
        $this->resetAfterTest(true);
Línea 1864... Línea 1864...
1864
    }
1864
    }
Línea 1865... Línea 1865...
1865
 
1865
 
1866
    /**
1866
    /**
1867
     * Test file_is_draft_areas_limit_reached
1867
     * Test file_is_draft_areas_limit_reached
1868
     */
1868
     */
1869
    public function test_file_is_draft_areas_limit_reached() {
1869
    public function test_file_is_draft_areas_limit_reached(): void {
1870
        global $CFG;
1870
        global $CFG;
Línea 1871... Línea 1871...
1871
        $this->resetAfterTest(true);
1871
        $this->resetAfterTest(true);
1872
 
1872
 
Línea 1933... Línea 1933...
1933
    /**
1933
    /**
1934
     * Test text cleaning when preparing text editor data.
1934
     * Test text cleaning when preparing text editor data.
1935
     *
1935
     *
1936
     * @covers ::file_prepare_standard_editor
1936
     * @covers ::file_prepare_standard_editor
1937
     */
1937
     */
1938
    public function test_file_prepare_standard_editor_clean_text() {
1938
    public function test_file_prepare_standard_editor_clean_text(): void {
1939
        $text = "lala <object>xx</object>";
1939
        $text = "lala <object>xx</object>";
Línea 1940... Línea 1940...
1940
 
1940
 
Línea 1941... Línea 1941...
1941
        $syscontext = \context_system::instance();
1941
        $syscontext = \context_system::instance();