Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 91... Línea 91...
91
     * @param manager $manager the current instance manager
91
     * @param manager $manager the current instance manager
92
     * @param string $templatecontent the template string to use
92
     * @param string $templatecontent the template string to use
93
     * @param array $options an array of extra diplay options
93
     * @param array $options an array of extra diplay options
94
     * @param array $fields alternative array of fields (for preview presets)
94
     * @param array $fields alternative array of fields (for preview presets)
95
     */
95
     */
96
    public function __construct(manager $manager, string $templatecontent, array $options = [], array $fields = null) {
96
    public function __construct(manager $manager, string $templatecontent, array $options = [], ?array $fields = null) {
97
        $this->manager = $manager;
97
        $this->manager = $manager;
98
        $this->instance = $manager->get_instance();
98
        $this->instance = $manager->get_instance();
99
        $this->templatecontent = $templatecontent;
99
        $this->templatecontent = $templatecontent;
Línea 100... Línea 100...
100
 
100
 
Línea 477... Línea 477...
477
        $checkbox = new checkbox_toggleall('listview-entries', false, [
477
        $checkbox = new checkbox_toggleall('listview-entries', false, [
478
            'id' => "entry_{$entry->id}",
478
            'id' => "entry_{$entry->id}",
479
            'name' => 'delcheck[]',
479
            'name' => 'delcheck[]',
480
            'classes' => 'recordcheckbox',
480
            'classes' => 'recordcheckbox',
481
            'value' => $entry->id,
481
            'value' => $entry->id,
-
 
482
            'label' => get_string('selectfordeletion', 'data'),
-
 
483
            'labelclasses' => 'visually-hidden',
482
        ]);
484
        ]);
483
        return $OUTPUT->render($checkbox);
485
        return $OUTPUT->render($checkbox);
484
    }
486
    }
Línea 485... Línea 487...
485
 
487
 
Línea 797... Línea 799...
797
                'mode' => 'single',
799
                'mode' => 'single',
798
            ]);
800
            ]);
799
            $editurl = new moodle_url('/mod/data/edit.php', $this->baseurl->params());
801
            $editurl = new moodle_url('/mod/data/edit.php', $this->baseurl->params());
800
            $editurl->params([
802
            $editurl->params([
801
                'rid' => $entry->id,
803
                'rid' => $entry->id,
802
                'sesskey' => sesskey(),
-
 
803
                'backto' => urlencode($backurl->out(false))
804
                'backto' => urlencode($backurl->out(false))
804
            ]);
805
            ]);
Línea 805... Línea 806...
805
 
806
 
806
            $actionmenu->add(new action_menu_link_secondary(
807
            $actionmenu->add(new action_menu_link_secondary(
Línea 810... Línea 811...
810
            ));
811
            ));
Línea 811... Línea 812...
811
 
812
 
812
            // Delete entry.
813
            // Delete entry.
813
            $deleteurl = new moodle_url($this->baseurl, [
814
            $deleteurl = new moodle_url($this->baseurl, [
814
                'delete' => $entry->id,
-
 
815
                'sesskey' => sesskey(),
815
                'delete' => $entry->id,
816
                'mode' => 'single',
816
                'mode' => 'single',
Línea 817... Línea 817...
817
            ]);
817
            ]);
818
 
818