|
@ -14,11 +14,19 @@ |
|
|
// You should have received a copy of the GNU General Public License |
|
|
// You should have received a copy of the GNU General Public License |
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* This file contains the forms to add |
|
|
|
|
|
* |
|
|
|
|
|
* @package mod_attendance |
|
|
|
|
|
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com> |
|
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
require_once($CFG->libdir.'/formslib.php'); |
|
|
require_once($CFG->libdir.'/formslib.php'); |
|
|
|
|
|
|
|
|
class mod_attforblock_add_form extends moodleform { |
|
|
class mod_attforblock_add_form extends moodleform { |
|
|
|
|
|
|
|
|
function definition() { |
|
|
public function definition() { |
|
|
|
|
|
|
|
|
global $CFG, $USER; |
|
|
global $CFG, $USER; |
|
|
$mform =& $this->_form; |
|
|
$mform =& $this->_form; |
|
@ -27,9 +35,7 @@ class mod_attforblock_add_form extends moodleform { |
|
|
$cm = $this->_customdata['cm']; |
|
|
$cm = $this->_customdata['cm']; |
|
|
$modcontext = $this->_customdata['modcontext']; |
|
|
$modcontext = $this->_customdata['modcontext']; |
|
|
|
|
|
|
|
|
|
|
|
$mform->addElement('header', 'general', get_string('addsession','attforblock')); |
|
|
$mform->addElement('header', 'general', get_string('addsession','attforblock'));//fill in the data depending on page params |
|
|
|
|
|
//later using set_data |
|
|
|
|
|
|
|
|
|
|
|
$groupmode = groups_get_activity_groupmode($cm); |
|
|
$groupmode = groups_get_activity_groupmode($cm); |
|
|
switch ($groupmode) { |
|
|
switch ($groupmode) { |
|
|