本文整理匯總了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;
}