当前位置: 首页>>代码示例>>PHP>>正文


PHP question_attempt_step::get_qt_var方法代码示例

本文整理汇总了PHP中question_attempt_step::get_qt_var方法的典型用法代码示例。如果您正苦于以下问题:PHP question_attempt_step::get_qt_var方法的具体用法?PHP question_attempt_step::get_qt_var怎么用?PHP question_attempt_step::get_qt_var使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在question_attempt_step的用法示例。


在下文中一共展示了question_attempt_step::get_qt_var方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: apply_attempt_state

 public function apply_attempt_state(question_attempt_step $step)
 {
     $saquestions = explode(',', $step->get_qt_var('_stemorder'));
     foreach ($saquestions as $questionid) {
         $this->stems[$questionid] = $step->get_qt_var('_stem_' . $questionid);
         $this->stemformat[$questionid] = $step->get_qt_var('_stemformat_' . $questionid);
         $key = $step->get_qt_var('_right_' . $questionid);
         $this->right[$questionid] = $key;
         $this->choices[$key] = $step->get_qt_var('_choice_' . $key);
     }
     parent::apply_attempt_state($step);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:12,代码来源:question.php

示例2: test_set_var

 public function test_set_var() {
     $step = new question_attempt_step();
     $step->set_qt_var('_x', 1);
     $step->set_behaviour_var('_x', 2);
     $this->assertEquals('1', $step->get_qt_var('_x'));
     $this->assertEquals('2', $step->get_behaviour_var('_x'));
 }
开发者ID:JP-Git,项目名称:moodle,代码行数:7,代码来源:questionattemptstep_test.php

示例3: apply_attempt_state

 public function apply_attempt_state(question_attempt_step $step)
 {
     $this->stemorder = explode(',', $step->get_qt_var('_stemorder'));
     $this->set_choiceorder(explode(',', $step->get_qt_var('_choiceorder')));
     // Add any missing subquestions. Sometimes people edit questions after they
     // have been attempted which breaks things.
     foreach ($this->stemorder as $stemid) {
         if (!isset($this->stems[$stemid])) {
             $this->stems[$stemid] = html_writer::span(get_string('deletedsubquestion', 'qtype_match'), 'notifyproblem');
             $this->stemformat[$stemid] = FORMAT_HTML;
             $this->right[$stemid] = 0;
         }
     }
     // Add any missing choices. Sometimes people edit questions after they
     // have been attempted which breaks things.
     foreach ($this->choiceorder as $choiceid) {
         if (!isset($this->choices[$choiceid])) {
             $this->choices[$choiceid] = get_string('deletedchoice', 'qtype_match');
         }
     }
 }
开发者ID:Gavinthisisit,项目名称:Moodle,代码行数:21,代码来源:question.php

示例4: apply_attempt_state

 public function apply_attempt_state(question_attempt_step $step)
 {
     foreach ($this->choices as $group => $choices) {
         $this->set_choiceorder($group, explode(',', $step->get_qt_var('_choiceorder' . $group)));
     }
 }
开发者ID:evltuma,项目名称:moodle,代码行数:6,代码来源:questionbase.php

示例5: apply_attempt_state

 public function apply_attempt_state(question_attempt_step $step)
 {
     $this->answers = $this->get_ordering_answers();
     $this->options = $this->get_ordering_options();
     $this->currentresponse = array_filter(explode(',', $step->get_qt_var('_currentresponse')));
     $this->correctresponse = array_filter(explode(',', $step->get_qt_var('_correctresponse')));
 }
开发者ID:Kathrin84,项目名称:moodle-qtype_ordering,代码行数:7,代码来源:question.php

示例6: prepare_response_for_editing

 protected function prepare_response_for_editing($name, question_attempt_step $step, $context)
 {
     return $step->prepare_response_files_draft_itemid_with_text($name, $context->id, $step->get_qt_var($name));
 }
开发者ID:rama1712,项目名称:moodle,代码行数:4,代码来源:renderer.php

示例7: apply_attempt_state

 public function apply_attempt_state(question_attempt_step $step)
 {
     list($point, $separator) = explode('$', $step->get_qt_var('_separators'));
     $this->ap->set_characters($point, $separator);
 }
开发者ID:tyleung,项目名称:CMPUT401MoodleExams,代码行数:5,代码来源:question.php

示例8: apply_attempt_state

 public function apply_attempt_state(question_attempt_step $step)
 {
     $this->stemorder = explode(',', $step->get_qt_var('_stemorder'));
     $this->set_choiceorder(explode(',', $step->get_qt_var('_choiceorder')));
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:5,代码来源:question.php

示例9: apply_attempt_state

 public function apply_attempt_state(question_attempt_step $step)
 {
     $this->order = explode(',', $step->get_qt_var('_order'));
 }
开发者ID:abhilash1994,项目名称:moodle,代码行数:4,代码来源:question.php

示例10: apply_attempt_state

 public function apply_attempt_state(question_attempt_step $step)
 {
     $this->seed = (int) $step->get_qt_var('_seed');
     $this->initialise_question_from_seed();
 }
开发者ID:sowirepo,项目名称:moodle-qtype_stack,代码行数:5,代码来源:question.php

示例11: response_area_input

    public function response_area_input($name, question_attempt $qa, question_attempt_step $step, $lines, $context) {
        $response  = $step->get_qt_var($name);
        $inputname = $qa->get_qt_field_name($name);
        $textarea  = $this->textarea($response, $lines, array('name' => $inputname));
        $formattag = $this->get_format_tag($inputname);
        $countarea = $this->get_count_area_input($qa, $response);

        return $textarea.$formattag.$countarea;
    }
开发者ID:nickkoeppen,项目名称:moodle,代码行数:9,代码来源:renderer.php


注:本文中的question_attempt_step::get_qt_var方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。