MDL-30135 question formats: trans_format/get_format should be public.

They need to be used by third-party qtype developers.
This commit is contained in:
Tim Hunt
2011-11-07 11:37:49 +00:00
parent f08f22c267
commit 6636527808
+2 -2
View File
@@ -67,7 +67,7 @@ class qformat_xml extends qformat_default {
* @param string name format name from xml file
* @return int Moodle format code
*/
protected function trans_format($name) {
public function trans_format($name) {
$name = trim($name);
if ($name == 'moodle_auto_format') {
@@ -970,7 +970,7 @@ class qformat_xml extends qformat_default {
* @param int id internal code
* @return string format text
*/
protected function get_format($id) {
public function get_format($id) {
switch($id) {
case FORMAT_MOODLE:
return 'moodle_auto_format';