2010-06-21 07:55:18 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// This file is part of Moodle - http://moodle.org/
|
|
|
|
//
|
|
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
/**
|
2010-07-03 13:37:13 +00:00
|
|
|
* A moodle form to manage folder files
|
2010-06-21 07:55:18 +00:00
|
|
|
*
|
2014-02-14 17:04:59 +13:00
|
|
|
* @package mod_folder
|
|
|
|
* @copyright 2010 Dongsheng Cai <dongsheng@moodle.com>
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
2010-06-21 07:55:18 +00:00
|
|
|
*/
|
|
|
|
|
2010-07-03 13:37:13 +00:00
|
|
|
defined('MOODLE_INTERNAL') || die();
|
|
|
|
|
|
|
|
require_once("$CFG->libdir/formslib.php");
|
|
|
|
|
2010-06-21 07:55:18 +00:00
|
|
|
class mod_folder_edit_form extends moodleform {
|
|
|
|
function definition() {
|
2010-07-03 13:37:13 +00:00
|
|
|
$mform = $this->_form;
|
|
|
|
|
|
|
|
$data = $this->_customdata['data'];
|
|
|
|
$options = $this->_customdata['options'];
|
|
|
|
|
|
|
|
$mform->addElement('hidden', 'id', $data->id);
|
2013-04-15 17:59:25 -04:00
|
|
|
$mform->setType('id', PARAM_INT);
|
2010-07-03 13:37:13 +00:00
|
|
|
$mform->addElement('filemanager', 'files_filemanager', get_string('files'), null, $options);
|
2012-05-22 09:36:29 +08:00
|
|
|
$submit_string = get_string('savechanges');
|
2010-06-23 02:50:13 +00:00
|
|
|
$this->add_action_buttons(true, $submit_string);
|
2010-07-03 13:37:13 +00:00
|
|
|
|
|
|
|
$this->set_data($data);
|
2010-06-21 07:55:18 +00:00
|
|
|
}
|
|
|
|
}
|