Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 13... Línea 13...
13
//
13
//
14
// You should have received a copy of the GNU General Public License
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
Línea 16... Línea 16...
16
 
16
 
17
/**
17
/**
18
 * Atto text editor manage files plugin form.
18
 * TinyMCE Media plugin form.
19
 *
19
 *
20
 * @package   tiny_media
20
 * @package   tiny_media
21
 * @copyright 2022, Stevani Andolo <stevani@hotmail.com.au>
21
 * @copyright 2022, Stevani Andolo <stevani@hotmail.com.au>
22
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Línea 100... Línea 100...
100
 
100
 
101
        $mform->addElement('header', 'deletefileshdr', get_string('unusedfilesheader', 'tiny_media'));
101
        $mform->addElement('header', 'deletefileshdr', get_string('unusedfilesheader', 'tiny_media'));
Línea 102... Línea 102...
102
        $mform->addElement('static', '', '', html_writer::tag('div', get_string('unusedfilesdesc', 'tiny_media')));
102
        $mform->addElement('static', '', '', html_writer::tag('div', get_string('unusedfilesdesc', 'tiny_media')));
103
 
103
 
104
        foreach ($files as $hash => $file) {
104
        foreach ($files as $hash => $file) {
105
            $mform->addElement('checkbox', "deletefile[{$hash}]", '', $file, ['data-filename' => $file]);
105
            $mform->addElement('checkbox', "deletefile[{$hash}]", '', $file, ['data-filename' => $file, 'data-filehash' => $hash]);
Línea 106... Línea 106...
106
            $mform->setType("deletefile[{$hash}]", PARAM_INT);
106
            $mform->setType("deletefile[{$hash}]", PARAM_INT);
Línea 107... Línea 107...
107
        }
107
        }
108
 
-
 
109
        $mform->addElement('submit', 'delete', get_string('deleteselected', 'tiny_media'));
108
 
110
 
109
        $mform->addElement('submit', 'delete', get_string('deleteselected', 'tiny_media'));
111
        $PAGE->requires->js_call_amd('tiny_media/usedfiles', 'init', [
110
 
112
            'files' => array_flip($files),
111
        $PAGE->requires->js_call_amd('tiny_media/usedfiles', 'init', [
113
            'usercontext' => $usercontext->id,
112
            'usercontext' => $usercontext->id,