From 05f7f7c1b4c5753c82b1b0894d9b2a74306519cf Mon Sep 17 00:00:00 2001 From: Pierre Pichet Date: Sat, 24 Apr 2010 09:25:32 +0000 Subject: [PATCH] Setting help element for each file formats, TODO help filles --- question/export_form.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/question/export_form.php b/question/export_form.php index 6f9aa4e9aa2be..d58aa553e647c 100644 --- a/question/export_form.php +++ b/question/export_form.php @@ -14,14 +14,15 @@ function definition() { $mform->addElement('header','fileformat',get_string('fileformat','quiz')); $fileformatnames = get_import_export_formats('export'); $radioarray = array(); + $i = 0 ; foreach ($fileformatnames as $shortname => $fileformatname) { - $radioelement = &MoodleQuickForm::createElement('radio','format','',$fileformatname,$shortname); - $radioarray[] = $radioelement; + $currentgrp1 = array(); + $currentgrp1[] = &$mform->createElement('radio','format','',$fileformatname,$shortname); + $mform->addGroup($currentgrp1,"formathelp[$i]",'',array('
'),false); + $mform->setHelpButton("formathelp[$i]", array("$shortname",$fileformatname,"qformat_$shortname")); + $i++ ; } - $mform->addGroup($radioarray,'format','',array('
'),false); - $mform->setHelpButton('format', array("$shortname",$fileformatname,"qformat_$shortname")); $mform->addRule('format',null,'required',null,'client'); - //-------------------------------------------------------------------------------- $mform->addElement('header','general', get_string('general', 'form'));