You are here

class QuizDirectionsResponse in Quiz 7.5

Same name and namespace in other branches
  1. 6.6 question_types/quiz_directions/quiz_directions.classes.inc \QuizDirectionsResponse
  2. 6.3 question_types/quiz_directions/quiz_directions.classes.inc \QuizDirectionsResponse
  3. 6.4 question_types/quiz_directions/quiz_directions.classes.inc \QuizDirectionsResponse
  4. 6.5 question_types/quiz_directions/quiz_directions.classes.inc \QuizDirectionsResponse
  5. 7.6 question_types/quiz_directions/quiz_directions.classes.inc \QuizDirectionsResponse
  6. 7 question_types/quiz_directions/quiz_directions.classes.inc \QuizDirectionsResponse
  7. 7.4 question_types/quiz_directions/quiz_directions.classes.inc \QuizDirectionsResponse

Extension of QuizQuestionResponse.

Hierarchy

Expanded class hierarchy of QuizDirectionsResponse

1 string reference to 'QuizDirectionsResponse'
quiz_directions_quiz_question_info in question_types/quiz_directions/quiz_directions.module
Implements hook_quiz_question_info().

File

question_types/quiz_directions/quiz_directions.classes.inc, line 120
Quiz_directions classes.

View source
class QuizDirectionsResponse extends QuizQuestionResponse {

  /**
   * Implementation of save().
   *
   * @see QuizQuestionResponse::save()
   */
  public function save() {
  }

  /**
   * Implementation of delete().
   *
   * @see QuizQuestionResponse::delete()
   */
  public function delete() {
  }

  /**
   * Implementation of score().
   *
   * @see QuizQuestionResponse::score()
   */
  public function score() {

    // Set the score.
    $this->score = 0;
    return 0;
  }

  /**
   * Implementation of isCorrect().
   *
   * @see QuizQuestionResponse::isCorrect()
   */
  public function isCorrect() {
    return TRUE;
  }

  /**
   * Implementation of getResponse().
   *
   * @see QuizQuestionResponse::getResponse()
   */
  public function getResponse() {
    return $this->answer;
  }

  /**
   * Implementation of getReportForm().
   *
   * @see QuizQuestionResponse::getReportForm()
   */
  public function getReportForm() {
    return array(
      '#no_report' => TRUE,
    );
  }

}

Members

Namesort descending Modifiers Type Description Overrides
QuizDirectionsResponse::delete public function Implementation of delete(). Overrides QuizQuestionResponse::delete
QuizDirectionsResponse::getReportForm public function Implementation of getReportForm(). Overrides QuizQuestionResponse::getReportForm
QuizDirectionsResponse::getResponse public function Implementation of getResponse(). Overrides QuizQuestionResponse::getResponse
QuizDirectionsResponse::isCorrect public function Implementation of isCorrect(). Overrides QuizQuestionResponse::isCorrect
QuizDirectionsResponse::save public function Implementation of save(). Overrides QuizQuestionResponse::save
QuizDirectionsResponse::score public function Implementation of score(). Overrides QuizQuestionResponse::score
QuizQuestionResponse::$answer protected property
QuizQuestionResponse::$evaluated protected property
QuizQuestionResponse::$is_correct protected property
QuizQuestionResponse::$is_doubtful public property
QuizQuestionResponse::$is_skipped public property
QuizQuestionResponse::$question public property
QuizQuestionResponse::$quizQuestion public property
QuizQuestionResponse::$result_id protected property
QuizQuestionResponse::$score protected property 9
QuizQuestionResponse::canReview public function Can the quiz taker view the requested review?
QuizQuestionResponse::getFeedbackValues public function Get the response part of the report form. 6
QuizQuestionResponse::getFormat protected function Utility function that returns the format of the node body.
QuizQuestionResponse::getMaxScore public function Get the max score of this question response. 1
QuizQuestionResponse::getQuizQuestion public function Get the question of this question response.
QuizQuestionResponse::getReport public function Get data suitable for reporting a user's score on the question. 1
QuizQuestionResponse::getReportFormAnswerFeedback public function Get the feedback form for the reportForm. 2
QuizQuestionResponse::getReportFormScore public function Implementation of getReportFormScore().
QuizQuestionResponse::getReportFormSubmit public function Get the submit function for the reportForm. 2
QuizQuestionResponse::getReportFormValidate public function Get the validate function for the reportForm.
QuizQuestionResponse::getScore public function Get the score of this question response.
QuizQuestionResponse::getWeightedRatio public function Get the weighted score ratio.
QuizQuestionResponse::isEvaluated public function Indicate whether the response has been evaluated (scored) yet.
QuizQuestionResponse::refreshQuestionNode public function Used to refresh this instances question node in case drupal has changed it.
QuizQuestionResponse::setResultAnswerId public function Set the target result answer ID for this Question response.
QuizQuestionResponse::toBareObject public function Represent the response as a stdClass object.
QuizQuestionResponse::viewsGetAnswers public static function Get answers for a question in a result. 3
QuizQuestionResponse::__construct public function Create a new user response. 7