Skip to content
Snippets Groups Projects
course_format_iena_message.php 1.92 KiB
<?php
	/**
	 * Created by PhpStorm.
	 * User: softia
	 * Date: 13/03/18
	 * Time: 11:26
	 */

// 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/>.
	
	/**
	 *
	 * course_format_iena_sections
	 *
	 * @package    format_iena
	 * @category   format
	 * @copyright  2021 Softia/Université lorraine
	 * @author     Delaruelle Myriam
	 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
	 */

	require_once("{$CFG->libdir}/formslib.php");


	class course_format_iena_message extends moodleform
	{
		public function definition()
		{
			// TODO: Implement definition() method.
		
			$mform = $this->_form; // Don't forget the underscore!

			$description = "";
			
			$mform->addElement('editor', 'summary', get_string('summary', 'format_iena'));
			$mform->setType('summary', PARAM_RAW);
			$mform->addRule('summary', get_string('error'), 'required', null, null, false, false);
			$mform->setDefault('summary', array('text' => $description));
			$mform->addElement('hidden', 'back_url', '');
			$mform->setType('back_url', PARAM_TEXT);
			$mform->setDefault('back_url', $this->_customdata['back_url']);
			$mform->addElement('hidden', 'students', '');
			$mform->setType('students', PARAM_TEXT);
			$mform->setDefault('students', $this->_customdata['students']);

			$this->add_action_buttons(true, "Envoyer");
			
			
		}
		
	}