Skip to content

Commit

Permalink
Setting help element for each file formats, TODO help filles
Browse files Browse the repository at this point in the history
  • Loading branch information
ppichet committed Apr 24, 2010
1 parent f942cd7 commit 05f7f7c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions question/export_form.php
Expand Up @@ -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('<br />'),false);
$mform->setHelpButton("formathelp[$i]", array("$shortname",$fileformatname,"qformat_$shortname"));
$i++ ;
}
$mform->addGroup($radioarray,'format','',array('<br />'),false);
$mform->setHelpButton('format', array("$shortname",$fileformatname,"qformat_$shortname"));
$mform->addRule('format',null,'required',null,'client');

//--------------------------------------------------------------------------------
$mform->addElement('header','general', get_string('general', 'form'));

Expand Down

0 comments on commit 05f7f7c

Please sign in to comment.