MDL-29808 qformats: use standard pluginname string and add version.php

AMOS BEGIN
 MOV [aiken,qformat_aiken],[pluginname,qformat_aiken]
 MOV [aiken_help,qformat_aiken],[pluginname_help,qformat_aiken]
 MOV [aiken_link,qformat_aiken],[pluginname_link,qformat_aiken]
 MOV [blackboard,qformat_blackboard],[pluginname,qformat_blackboard]
 MOV [blackboard_help,qformat_blackboard],[pluginname_help,qformat_blackboard]
 MOV [blackboard_six,qformat_blackboard_six],[pluginname,qformat_blackboard_six]
 MOV [blackboard_six_help,qformat_blackboard_six],[pluginname_help,qformat_blackboard_six]
 MOV [examview,qformat_examview],[pluginname,qformat_examview]
 MOV [examview_help,qformat_examview],[pluginname_help,qformat_examview]
 MOV [gift_help,qformat_gift],[pluginname_help,qformat_gift]
 MOV [gift_link,qformat_gift],[pluginname_link,qformat_gift]
 MOV [learnwise,qformat_learnwise],[pluginname,qformat_learnwise]
 MOV [learnwise_help,qformat_learnwise],[pluginname_help,qformat_learnwise]
 MOV [missingword,qformat_missingword],[pluginname,qformat_missingword]
 MOV [missingword_help,qformat_missingword],[pluginname_help,qformat_missingword]
 MOV [missingword_link,qformat_missingword],[pluginname_link,qformat_missingword]
 MOV [multianswer,qformat_multianswer],[pluginname,qformat_multianswer]
 MOV [multianswer_help,qformat_multianswer],[pluginname_help,qformat_multianswer]
 MOV [multianswer_link,qformat_multianswer],[pluginname_link,qformat_multianswer]
 MOV [webct_help,qformat_webct],[pluginname_help,qformat_webct]
 MOV [webct_link,qformat_webct],[pluginname_link,qformat_webct]
 MOV [xhtml,qformat_xhtml],[pluginname,qformat_xhtml]
 MOV [xhtml_help,qformat_xhtml],[pluginname_help,qformat_xhtml]
 MOV [xhtml_link,qformat_xhtml],[pluginname_link,qformat_xhtml]
 MOV [xml_help,qformat_xml],[pluginname_help,qformat_xml]
 MOV [xml_link,qformat_xml],[pluginname_link,qformat_xml]
AMOS END
This commit is contained in:
Tim Hunt 2011-11-03 11:16:14 +00:00
parent 75a31c9039
commit 646791794d
28 changed files with 420 additions and 57 deletions

View File

@ -1432,22 +1432,6 @@ class plugintype_qtype extends plugintype_base implements plugin_information {
}
}
/**
* Class for question formats
*/
class plugintype_qformat extends plugintype_base implements plugin_information {
/**
* @see plugin_information::init_display_name()
*/
public function init_display_name() {
if (get_string_manager()->string_exists('pluginname', $this->component)) {
$this->displayname = get_string('pluginname', $this->component);
} else {
$this->displayname = get_string($this->name, $this->component);
}
}
}
/**
* Class for authentication plugins

View File

@ -1207,11 +1207,7 @@ function get_import_export_formats($type) {
if ($provided) {
list($notused, $fileformat) = explode('_', $component, 2);
if (get_string_manager()->string_exists('pluginname', $component)) {
$fileformatnames[$fileformat] = get_string('pluginname', $component);
} else {
$fileformatnames[$fileformat] = get_string($fileformat, $component);
}
$fileformatnames[$fileformat] = get_string('pluginname', $component);
}
}

View File

@ -876,8 +876,7 @@ function lesson_get_import_export_formats($type) {
$provided = $format_class->provide_export();
}
if ($provided) {
$formatname = get_string($fileformat, 'qformat_'.$fileformat);
$fileformatnames[$fileformat] = $formatname;
$fileformatnames[$fileformat] = get_string('pluginname', 'qformat_'.$fileformat);
}
}
natcasesort($fileformatnames);

View File

@ -51,8 +51,12 @@ class question_export_form extends moodleform {
foreach ($fileformatnames as $shortname => $fileformatname) {
$currentgrp1 = array();
$currentgrp1[] = $mform->createElement('radio', 'format', '', $fileformatname, $shortname);
$mform->addGroup($currentgrp1, "formathelp[$i]", '', array('<br />'), false);
$mform->addHelpButton("formathelp[$i]", $shortname, 'qformat_' . $shortname);
$mform->addGroup($currentgrp1, "formathelp[$i]", '&#160;', array('<br />'), false);
if (get_string_manager()->string_exists('pluginname_help', 'qformat_' . $shortname)) {
$mform->addHelpButton("formathelp[$i]", 'pluginname', 'qformat_' . $shortname);
}
$i++ ;
}
$mform->addRule("formathelp[0]", null, 'required', null, 'client');

View File

@ -23,6 +23,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['aiken'] = 'Aiken format';
$string['aiken_help'] = 'This is a simple format for importing multiple choice questions from a text file.';
$string['aiken_link'] = 'qformat/aiken';
$string['pluginname'] = 'Aiken format';
$string['pluginname_help'] = 'This is a simple format for importing multiple choice questions from a text file.';
$string['pluginname_link'] = 'qformat/aiken';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage aiken
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_aiken';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -23,5 +23,5 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['blackboard'] = 'Blackboard';
$string['blackboard_help'] = 'Blackboard format enables questions saved in the Blackboard version 5 "POOL" type export format to be imported.';
$string['pluginname'] = 'Blackboard';
$string['pluginname_help'] = 'Blackboard format enables questions saved in the Blackboard version 5 "POOL" type export format to be imported.';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage blackboard
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_blackboard';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -23,5 +23,5 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['blackboard_six'] = 'Blackboard V6+';
$string['blackboard_six_help'] = 'Blackboard V6+ format enables questions saved in Blackboard\'s export format to be imported via zip file. It provides limited support for Blackboard Version 6 and 7.';
$string['pluginname'] = 'Blackboard V6+';
$string['pluginname_help'] = 'Blackboard V6+ format enables questions saved in Blackboard\'s export format to be imported via zip file. It provides limited support for Blackboard Version 6 and 7.';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage blackboard_six
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_blackboard_six';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -23,5 +23,5 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['examview'] = 'Examview';
$string['examview_help'] = 'Examview format enables the import of questions from Examview 4 XML files. For newer versions of Examview, Blackboard format may be used.';
$string['pluginname'] = 'Examview';
$string['pluginname_help'] = 'Examview format enables the import of questions from Examview 4 XML files. For newer versions of Examview, Blackboard format may be used.';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage examview
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_examview';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -24,10 +24,6 @@
*/
$string['braceerror'] = 'Could not find {...} around answers';
$string['gift'] = 'Gift format';
$string['gift_help'] = 'Gift format enables multiple-choice, true-false, short answer, matching, missing word, numerical and essay questions to be imported or exported via text file.';
$string['gift_link'] = 'qformat/gift';
$string['gift'] = 'GIFT format';
$string['giftleftbraceerror'] = 'Could not find a {';
$string['giftmatchingformat'] = 'Matching question answers are improperly formatted';
$string['giftnonumericalanswers'] = 'No answers found for numerical question';
@ -37,3 +33,5 @@ $string['giftrightbraceerror'] = 'Could not find a }';
$string['importminerror'] = 'There is an error in the question. There are not enough answers for this question type';
$string['nohandler'] = 'No handler for question type {$a}';
$string['pluginname'] = 'Gift format';
$string['pluginname_help'] = 'Gift format enables multiple-choice, true-false, short answer, matching, missing word, numerical and essay questions to be imported or exported via text file.';
$string['pluginname_link'] = 'qformat/gift';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage gift
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_gift';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -23,5 +23,5 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['learnwise'] = 'Learnwise format';
$string['learnwise_help'] = 'This format enables the import of multiple choice questions saved in Learnwise\'s XML format.';
$string['pluginname'] = 'Learnwise format';
$string['plugidnname_help'] = 'This format enables the import of multiple choice questions saved in Learnwise\'s XML format.';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage learnwise
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_learnwise';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -23,6 +23,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['missingword'] = 'Missing word format';
$string['missingword_help'] = 'Missing word format enables questions to be imported via text file.';
$string['missingword_link'] = 'Missing word format';
$string['pluginname'] = 'Missing word format';
$string['pluginname_help'] = 'Missing word format enables questions to be imported via text file.';
$string['pluginname_link'] = 'Missing word format';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage missingword
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_missingword';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -23,6 +23,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['multianswer'] = 'Embedded answers (Cloze)';
$string['multianswer_help'] = 'Embedded answers (Cloze) format enables the import of a passage of text with questions such as multiple-choice and short answer embedded within it.';
$string['multianswer_link'] = 'question/type/multianswer';
$string['pluginname'] = 'Embedded answers (Cloze)';
$string['pluginname_help'] = 'Embedded answers (Cloze) format enables the import of a passage of text with questions such as multiple-choice and short answer embedded within it.';
$string['pluginname_link'] = 'question/type/multianswer';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage multianswer
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_multianswer';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -0,0 +1,17 @@
This files describes API changes for question import/export format plugins.
=== 2.2 ===
* The plugin name used to be defined in a string called the same thing as the
format, with assoicated help strings, for example:
$string['aiken'] = 'Aiken format';
$string['aiken_help'] = 'This is a simple format ...';
$string['aiken_link'] = 'qformat/aiken';
This needs to be changed to use the standard string name pluginname, as for
other plugin types.
$string['pluginname'] = 'Aiken format';
$string['pluginname_help'] = 'This is a simple format ...';
$string['pluginname_link'] = 'qformat/aiken';

View File

@ -28,10 +28,9 @@ $string['missinganswer'] = 'Too few :ANSWER, :Lx, :Rx statements for question li
$string['missingquestion'] = 'Missing question label after line {$a}';
$string['paragraphquestion'] = 'Paragraph question';
$string['pluginname'] = 'WebCT format';
$string['pluginname_help'] = 'WebCT format enables multiple-choice and short answer questions saved in WebCT\'s text-based format to be imported.';
$string['pluginname_link'] = 'qformat/webct';
$string['questionnametoolong'] = 'Question name too long at line {$a} (255 char. max). It has been truncated.';
$string['unknowntype'] = 'Unknown type';
$string['warningsdetected'] = '{$a} warning(s) detected';
$string['webct'] = 'WebCT format';
$string['webct_help'] = 'WebCT format enables multiple-choice and short answer questions saved in WebCT\'s text-based format to be imported.';
$string['webct_link'] = 'qformat/webct';
$string['wronggrade'] = 'Wrong grade (after line {$a}) :';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage webct
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_webct';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -23,6 +23,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['xhtml'] = 'XHTML format';
$string['xhtml_help'] = 'XHTML format enables all questions in the category to be exported to a single page of strict XHTML for possible use in another application.';
$string['xhtml_link'] = 'qformat/xhtml';
$string['pluginname'] = 'XHTML format';
$string['pluginname_help'] = 'XHTML format enables all questions in the category to be exported to a single page of strict XHTML for possible use in another application.';
$string['pluginname_link'] = 'qformat/xhtml';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage xhtml
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_xhtml';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -25,11 +25,10 @@
$string['invalidxml'] = 'Invalid XML file - string expected (use CDATA?)';
$string['pluginname'] = 'Moodle XML format';
$string['pluginname_help'] = 'This is a Moodle-specific format for importing and exporting questions.';
$string['pluginname_link'] = 'qformat/xml';
$string['truefalseimporterror'] = '<b>Warning</b>: The true/false question \'{$a->questiontext}\' could not be imported properly. It was not clear whether the correct answer is true or false. The question has been imported assuming that the answer is \'{$a->answer}\'. If this is not correct, you will need to edit the question.';
$string['unsupportedexport'] = 'Question type {$a} is not supported by XML export';
$string['xml'] = 'Moodle XML format';
$string['xml_help'] = 'This is a Moodle-specific format for importing and exporting questions.';
$string['xml_link'] = 'qformat/xml';
$string['xmlimportnoname'] = 'Missing question name in XML file';
$string['xmlimportnoquestion'] = 'Missing question text in XML file';
$string['xmltypeunsupported'] = 'Question type {$a} is not supported by XML import';

View File

@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Version information for the calculated question type.
*
* @package qformat
* @subpackage xml
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'qformat_xml';
$plugin->version = 2011102700;
$plugin->requires = 2011102700;
$plugin->maturity = MATURITY_STABLE;

View File

@ -53,8 +53,12 @@ class question_import_form extends moodleform {
foreach ($fileformatnames as $shortname => $fileformatname) {
$currentgrp1 = array();
$currentgrp1[] = $mform->createElement('radio', 'format', '', $fileformatname, $shortname);
$mform->addGroup($currentgrp1, "formathelp[$i]", '', array('<br />'), false);
$mform->addHelpButton("formathelp[$i]", $shortname, 'qformat_' . $shortname);
$mform->addGroup($currentgrp1, "formathelp[$i]", '&#160;', array('<br />'), false);
if (get_string_manager()->string_exists('pluginname_help', 'qformat_' . $shortname)) {
$mform->addHelpButton("formathelp[$i]", 'pluginname', 'qformat_' . $shortname);
}
$i++ ;
}
$mform->addRule("formathelp[0]", null, 'required', null, 'client');