當前位置: 首頁>>代碼示例>>PHP>>正文


PHP question_edit_form::get_per_answer_fields方法代碼示例

本文整理匯總了PHP中question_edit_form::get_per_answer_fields方法的典型用法代碼示例。如果您正苦於以下問題:PHP question_edit_form::get_per_answer_fields方法的具體用法?PHP question_edit_form::get_per_answer_fields怎麽用?PHP question_edit_form::get_per_answer_fields使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在question_edit_form的用法示例。


在下文中一共展示了question_edit_form::get_per_answer_fields方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

 function get_per_answer_fields(&$mform, $label, $gradeoptions, &$repeatedoptions, &$answersoption)
 {
     $repeated = parent::get_per_answer_fields($mform, $label, $gradeoptions, $repeatedoptions, $answersoption);
     $tolerance =& $mform->createElement('text', 'tolerance', get_string('acceptederror', 'quiz'));
     $repeatedoptions['tolerance']['type'] = PARAM_NUMBER;
     array_splice($repeated, 3, 0, array($tolerance));
     $repeated[1]->setSize(10);
     return $repeated;
 }
開發者ID:JackCanada,項目名稱:moodle-hacks,代碼行數:9,代碼來源:edit_numerical_form.php

示例2: get_per_answer_fields

 protected function get_per_answer_fields($mform, $label, $gradeoptions, &$repeatedoptions, &$answersoption)
 {
     $repeated = parent::get_per_answer_fields($mform, $label, $gradeoptions, $repeatedoptions, $answersoption);
     $tolerance = $mform->createElement('text', 'tolerance', get_string('acceptederror', 'qtype_numerical'));
     $repeatedoptions['tolerance']['type'] = PARAM_FLOAT;
     $repeatedoptions['tolerance']['default'] = 0;
     array_splice($repeated, 3, 0, array($tolerance));
     $repeated[1]->setSize(10);
     return $repeated;
 }
開發者ID:vinoth4891,項目名稱:clinique,代碼行數:10,代碼來源:edit_numerical_form.php

示例3: get_per_answer_fields

 protected function get_per_answer_fields($mform, $label, $gradeoptions, &$repeatedoptions, &$answersoption)
 {
     $repeated = parent::get_per_answer_fields($mform, $label, $gradeoptions, $repeatedoptions, $answersoption);
     $tolerance = $mform->createElement('text', 'tolerance', get_string('answererror', 'qtype_numerical'), array('size' => 15));
     $repeatedoptions['tolerance']['type'] = PARAM_FLOAT;
     $repeatedoptions['tolerance']['default'] = 0;
     $elements = $repeated[0]->getElements();
     $elements[0]->setSize(15);
     array_splice($elements, 1, 0, array($tolerance));
     $repeated[0]->setElements($elements);
     return $repeated;
 }
開發者ID:EmmanuelYupit,項目名稱:educursos,代碼行數:12,代碼來源:edit_numerical_form.php

示例4: array

 function get_per_answer_fields(&$mform, $label, $gradeoptions, &$repeatedoptions, &$answersoption)
 {
     $repeated = parent::get_per_answer_fields(&$mform, $label, $gradeoptions, $repeatedoptions, $answersoption);
     $mform->setType('answer', PARAM_NOTAGS);
     $addrepeated = array();
     $addrepeated[] =& $mform->createElement('text', 'tolerance', get_string('tolerance', 'qtype_calculated'));
     $repeatedoptions['tolerance']['type'] = PARAM_NUMBER;
     $repeatedoptions['tolerance']['default'] = 0.01;
     $addrepeated[] =& $mform->createElement('select', 'tolerancetype', get_string('tolerancetype', 'quiz'), $this->qtypeobj->tolerance_types());
     $addrepeated[] =& $mform->createElement('select', 'correctanswerlength', get_string('correctanswershows', 'qtype_calculated'), range(0, 9));
     $repeatedoptions['correctanswerlength']['default'] = 2;
     $answerlengthformats = array('1' => get_string('decimalformat', 'quiz'), '2' => get_string('significantfiguresformat', 'quiz'));
     $addrepeated[] =& $mform->createElement('select', 'correctanswerformat', get_string('correctanswershowsformat', 'qtype_calculated'), $answerlengthformats);
     array_splice($repeated, 3, 0, $addrepeated);
     $repeated[1]->setLabel(get_string('correctanswerformula', 'quiz') . '=');
     return $repeated;
 }
開發者ID:nicolasconnault,項目名稱:moodle2.0,代碼行數:17,代碼來源:edit_calculated_form.php


注:本文中的question_edit_form::get_per_answer_fields方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。