本文整理汇总了PHP中question_attempt::has_marks方法的典型用法代码示例。如果您正苦于以下问题:PHP question_attempt::has_marks方法的具体用法?PHP question_attempt::has_marks怎么用?PHP question_attempt::has_marks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类question_attempt
的用法示例。
在下文中一共展示了question_attempt::has_marks方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: question
/**
* Generate the display of a question in a particular state, and with certain
* display options. Normally you do not call this method directly. Intsead
* you call {@link question_usage_by_activity::render_question()} which will
* call this method with appropriate arguments.
*
* @param question_attempt $qa the question attempt to display.
* @param qbehaviour_renderer $behaviouroutput the renderer to output the behaviour
* specific parts.
* @param qtype_renderer $qtoutput the renderer to output the question type
* specific parts.
* @param question_display_options $options controls what should and should not be displayed.
* @param string|null $number The question number to display. 'i' is a special
* value that gets displayed as Information. Null means no number is displayed.
* @return string HTML representation of the question.
*/
public function question(question_attempt $qa, qbehaviour_renderer $behaviouroutput, qtype_renderer $qtoutput, question_display_options $options, $number)
{
$output = '';
$output .= html_writer::start_tag('div', array('id' => 'q' . $qa->get_slot(), 'class' => implode(' ', array('que', $qa->get_question()->qtype->name(), $qa->get_behaviour_name(), $qa->get_state_class($options->correctness && $qa->has_marks())))));
$output .= html_writer::tag('div', $this->info($qa, $behaviouroutput, $qtoutput, $options, $number), array('class' => 'info'));
$output .= html_writer::start_tag('div', array('class' => 'content'));
$output .= html_writer::tag('div', $this->add_part_heading($qtoutput->formulation_heading(), $this->formulation($qa, $behaviouroutput, $qtoutput, $options)), array('class' => 'formulation clearfix'));
$output .= html_writer::nonempty_tag('div', $this->add_part_heading(get_string('feedback', 'question'), $this->outcome($qa, $behaviouroutput, $qtoutput, $options)), array('class' => 'outcome clearfix'));
$output .= html_writer::nonempty_tag('div', $this->add_part_heading(get_string('comments', 'question'), $this->manual_comment($qa, $behaviouroutput, $qtoutput, $options)), array('class' => 'comment clearfix'));
$output .= html_writer::nonempty_tag('div', $this->response_history($qa, $behaviouroutput, $qtoutput, $options), array('class' => 'history clearfix'));
$output .= html_writer::end_tag('div');
$output .= html_writer::end_tag('div');
return $output;
}