MDL-14620 - need to check vars are set before using. - adding check so I can include this form type in SCORM

This commit is contained in:
danmarsden
2008-08-20 21:59:21 +00:00
parent 8ba190827b
commit 24f40ab74e
+1 -1
View File
@@ -90,7 +90,7 @@ class MoodleQuickForm_choosecoursefileorimsrepo extends MoodleQuickForm_group
$button->updateAttributes($buttonattributes);
/// With repository active, show the button to browse it
if ($CFG->repositoryactivate) {
if (isset($CFG->repositoryactivate) && $CFG->repositoryactivate) {
$this->_elements[2] =& MoodleQuickForm::createElement('button', 'imsrepo', get_string('browserepository', 'resource'));
$imsbutton =& $this->_elements[2];
$url = "/mod/resource/type/ims/finder.php?directory=&choose=".$choose;