[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/question/type/gapselect/ -> questiontypebase.php (summary)

Question type class for the embedded element in question text question types.

Copyright: 2011 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 327 lines (12 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 14 functions

  save_question_options()
  get_question_options()
  delete_question()
  initialise_question_instance()
  make_hint()
  get_random_guess_score()
  get_array_of_choices()
  get_array_of_groups()
  get_correct_answers()
  get_array_of_placeholders()
  get_group_of_players()
  get_possible_responses()
  move_files()
  delete_files()

Functions
Functions that are not part of a class:

save_question_options($question)   X-Ref
Choices are stored in the question_answers table, and any options need to
be put into the feedback field somehow. This method is responsible for
converting all the options to a single string for this purpose. It is used
by {@link save_question_options()}.

param: array $choice the form data relating to this choice.
return: string ready to store in the database.

get_question_options($question)   X-Ref
No description

delete_question($questionid, $contextid)   X-Ref
No description

initialise_question_instance(question_definition $question, $questiondata)   X-Ref
Used by {@link initialise_question_instance()} to set up the choice-specific data.

param: object $choicedata as loaded from the question_answers table.
return: object an appropriate object for representing the choice.

make_hint($hint)   X-Ref
No description

get_random_guess_score($questiondata)   X-Ref
No description

get_array_of_choices($question)   X-Ref
This method gets the choices (answers)
in a 2 dimentional array.

param: object $question
return: array of groups

get_array_of_groups($question, $state)   X-Ref
This method gets the choices (answers) and sort them by groups
in a 2 dimentional array.

param: object $question
param: object $state Question state object
return: array of groups

get_correct_answers($question)   X-Ref
This method gets the correct answers in a 2 dimentional array.

param: object $question
return: array of groups

get_array_of_placeholders($question)   X-Ref
Return the list of groups used in a question.

param: stdClass $question the question data.
return: array the groups used, or false if an error occurs.

get_group_of_players($question, $state, $subquestions, $group)   X-Ref
No description

get_possible_responses($questiondata)   X-Ref
No description

move_files($questionid, $oldcontextid, $newcontextid)   X-Ref
No description

delete_files($questionid, $contextid)   X-Ref
No description



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1