当前位置: 首页>>代码示例>>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;未经允许,请勿转载。