MDL-29808 qtypes: use standard pluginname strings and update version.php
AMOS BEGIN MOV [calculated,qtype_calculated],[pluginname,qtype_calculated] MOV [calculated_help,qtype_calculated],[pluginname_help,qtype_calculated] MOV [calculated_link,qtype_calculated],[pluginname_link,qtype_calculated] MOV [addingcalculated,qtype_calculated],[pluginnameadding,qtype_calculated] MOV [editingcalculated,qtype_calculated],[pluginnameediting,qtype_calculated] MOV [calculatedsummary,qtype_calculated],[pluginnamesummary,qtype_calculated] MOV [calculatedmulti,qtype_calculatedmulti],[pluginname,qtype_calculatedmulti] MOV [calculatedmulti_help,qtype_calculatedmulti],[pluginname_help,qtype_calculatedmulti] MOV [calculatedmulti_link,qtype_calculatedmulti],[pluginname_link,qtype_calculatedmulti] MOV [addingcalculatedmulti,qtype_calculatedmulti],[pluginnameadding,qtype_calculatedmulti] MOV [editingcalculatedmulti,qtype_calculatedmulti],[pluginnameediting,qtype_calculatedmulti] MOV [calculatedmultisummary,qtype_calculatedmulti],[pluginnamesummary,qtype_calculatedmulti] MOV [calculatedsimple,qtype_calculatedsimple],[pluginname,qtype_calculatedsimple] MOV [calculatedsimple_help,qtype_calculatedsimple],[pluginname_help,qtype_calculatedsimple] MOV [calculatedsimple_link,qtype_calculatedsimple],[pluginname_link,qtype_calculatedsimple] MOV [addingcalculatedsimple,qtype_calculatedsimple],[pluginnameadding,qtype_calculatedsimple] MOV [editingcalculatedsimple,qtype_calculatedsimple],[pluginnameediting,qtype_calculatedsimple] MOV [calculatedsimplesummary,qtype_calculatedsimple],[pluginnamesummary,qtype_calculatedsimple] MOV [description,qtype_description],[pluginname,qtype_description] MOV [description_help,qtype_description],[pluginname_help,qtype_description] MOV [addingdescription,qtype_description],[pluginnameadding,qtype_description] MOV [editingdescription,qtype_description],[pluginnameediting,qtype_description] MOV [descriptionsummary,qtype_description],[pluginnamesummary,qtype_description] MOV [essay,qtype_essay],[pluginname,qtype_essay] MOV [essay_help,qtype_essay],[pluginname_help,qtype_essay] MOV [essay_link,qtype_essay],[pluginname_link,qtype_essay] MOV [addingessay,qtype_essay],[pluginnameadding,qtype_essay] MOV [editingessay,qtype_essay],[pluginnameediting,qtype_essay] MOV [essaysummary,qtype_essay],[pluginnamesummary,qtype_essay] MOV [match,qtype_match],[pluginname,qtype_match] MOV [match_help,qtype_match],[pluginname_help,qtype_match] MOV [match_link,qtype_match],[pluginname_link,qtype_match] MOV [addingmatch,qtype_match],[pluginnameadding,qtype_match] MOV [editingmatch,qtype_match],[pluginnameediting,qtype_match] MOV [matchsummary,qtype_match],[pluginnamesummary,qtype_match] MOV [missingtype,qtype_missingtype],[pluginname,qtype_missingtype] MOV [addingmissingtype,qtype_missingtype],[pluginnameadding,qtype_missingtype] MOV [editingmissingtype,qtype_missingtype],[pluginnameediting,qtype_missingtype] MOV [multianswer,qtype_multianswer],[pluginname,qtype_multianswer] MOV [multianswer_help,qtype_multianswer],[pluginname_help,qtype_multianswer] MOV [multianswer_link,qtype_multianswer],[pluginname_link,qtype_multianswer] MOV [addingmultianswer,qtype_multianswer],[pluginnameadding,qtype_multianswer] MOV [editingmultianswer,qtype_multianswer],[pluginnameediting,qtype_multianswer] MOV [multianswersummary,qtype_multianswer],[pluginnamesummary,qtype_multianswer] MOV [multichoice,qtype_multichoice],[pluginname,qtype_multichoice] MOV [multichoice_help,qtype_multichoice],[pluginname_help,qtype_multichoice] MOV [multichoice_link,qtype_multichoice],[pluginname_link,qtype_multichoice] MOV [addingmultichoice,qtype_multichoice],[pluginnameadding,qtype_multichoice] MOV [editingmultichoice,qtype_multichoice],[pluginnameediting,qtype_multichoice] MOV [multichoicesummary,qtype_multichoice],[pluginnamesummary,qtype_multichoice] MOV [numerical,qtype_numerical],[pluginname,qtype_numerical] MOV [numerical_help,qtype_numerical],[pluginname_help,qtype_numerical] MOV [numerical_link,qtype_numerical],[pluginname_link,qtype_numerical] MOV [addingnumerical,qtype_numerical],[pluginnameadding,qtype_numerical] MOV [editingnumerical,qtype_numerical],[pluginnameediting,qtype_numerical] MOV [numericalsummary,qtype_numerical],[pluginnamesummary,qtype_numerical] MOV [random,qtype_random],[pluginname,qtype_random] MOV [random_help,qtype_random],[pluginname_help,qtype_random] MOV [editingrandom,qtype_random],[pluginnameediting,qtype_random] MOV [shortanswer,qtype_shortanswer],[pluginname,qtype_shortanswer] MOV [shortanswer_help,qtype_shortanswer],[pluginname_help,qtype_shortanswer] MOV [shortanswer_link,qtype_shortanswer],[pluginname_link,qtype_shortanswer] MOV [addingshortanswer,qtype_shortanswer],[pluginnameadding,qtype_shortanswer] MOV [editingshortanswer,qtype_shortanswer],[pluginnameediting,qtype_shortanswer] MOV [shortanswersummary,qtype_shortanswer],[pluginnamesummary,qtype_shortanswer] MOV [truefalse,qtype_truefalse],[pluginname,qtype_truefalse] MOV [truefalse_help,qtype_truefalse],[pluginname_help,qtype_truefalse] MOV [truefalse_link,qtype_truefalse],[pluginname_link,qtype_truefalse] MOV [addingtruefalse,qtype_truefalse],[pluginnameadding,qtype_truefalse] MOV [editingtruefalse,qtype_truefalse],[pluginnameediting,qtype_truefalse] MOV [truefalsesummary,qtype_truefalse],[pluginnamesummary,qtype_truefalse] AMOS END
This commit is contained in:
+2
-29
@@ -1396,36 +1396,9 @@ class plugintype_qbehaviour extends plugintype_base implements plugin_informatio
|
||||
* Class for question types
|
||||
*/
|
||||
class plugintype_qtype 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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see plugintype_base::load_other_required_plugins().
|
||||
*/
|
||||
protected function load_other_required_plugins() {
|
||||
parent::load_other_required_plugins();
|
||||
if (!empty($this->dependencies)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Standard mechanism did not find anything, so try the legacy way.
|
||||
global $CFG;
|
||||
require_once($CFG->libdir . '/questionlib.php');
|
||||
$required = question_bank::get_qtype($this->name)->requires_qtypes();
|
||||
foreach ($required as $other) {
|
||||
$this->dependencies['qtype_' . $other] = ANY_VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
* @see plugin_information::get_uninstall_url()
|
||||
*/
|
||||
public function get_uninstall_url() {
|
||||
return new moodle_url('/admin/qtypes.php',
|
||||
array('delete' => $this->name, 'sesskey' => sesskey()));
|
||||
|
||||
Reference in New Issue
Block a user