From d982f8797849b9115310b0c25c8ed2a8d9bdfd37 Mon Sep 17 00:00:00 2001 From: jamiesensei Date: Mon, 13 Nov 2006 09:18:47 +0000 Subject: [PATCH] shifted hidden elements from standard_coursemodule_elements() into standard_hidden_coursemodule_elements() so that they can be included in a form without the other visible standard elements. --- lib/formslib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/formslib.php b/lib/formslib.php index f64744b331..c40779ad71 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -336,12 +336,15 @@ class moodleform_mod extends moodleform { function standard_coursemodule_elements(){ $mform=$this->_form; $mform->addElement('header', '', get_string('modstandardels', 'form')); + $mform->addElement('modgroupmode', 'groupmode', get_string('groupmode')); - $mform->setType('groupmode', PARAM_INT); $mform->addElement('modvisible', 'visible', get_string('visible')); - $mform->setType('visible', PARAM_INT); + $this->standard_hidden_coursemodule_elements(); + } + function standard_hidden_coursemodule_elements(){ + $mform=$this->_form; $mform->addElement('hidden', 'course', 0); $mform->setType('course', PARAM_INT); -- 2.39.5