Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

Question type class for the drag-and-drop images onto images question type.

Author: Jamie Pratt <me@jamiep.org>
Copyright: 2012 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 370 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

question_hint_ddmarker:: (3 methods):
  __construct()
  load_from_record()
  adjust_display_options()

qtype_ddmarker:: (11 methods):
  save_question_options()
  save_hints()
  make_hint()
  make_choice()
  make_place()
  initialise_combined_feedback()
  move_files()
  delete_files()
  export_to_xml()
  import_from_xml()
  get_random_guess_score()


Class: question_hint_ddmarker  - X-Ref

Question hint for ddmarker.

An extension of {@link question_hint} for questions like match and multiple
choice with multile answers, where there are options for whether to show the
number of parts right at each stage, and to reset the wrong parts.

__construct($id, $hint, $hintformat, $shownumcorrect,$clearwrong, $statewhichincorrect)   X-Ref
Constructor.

param: int the hint id from the database.
param: string $hint The hint text
param: int the corresponding text FORMAT_... type.
param: bool $shownumcorrect whether the number of right parts should be shown
param: bool $clearwrong whether the wrong parts should be reset.

load_from_record($row)   X-Ref
Create a basic hint from a row loaded from the question_hints table in the database.

param: object $row with property options as well as hint, shownumcorrect and clearwrong set.
return: question_hint_ddmarker

adjust_display_options(question_display_options $options)   X-Ref
No description

Class: qtype_ddmarker  - X-Ref

The drag-and-drop markers question type class.

save_question_options($formdata)   X-Ref
No description

save_hints($formdata, $withparts = false)   X-Ref
No description

make_hint($hint)   X-Ref
No description

make_choice($dragdata)   X-Ref
No description

make_place($dropdata)   X-Ref
No description

initialise_combined_feedback(question_definition $question,$questiondata, $withparts = false)   X-Ref
No description

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

delete_files($questionid, $contextid)   X-Ref
Delete all the files belonging to this question.

param: int $questionid the question being deleted.
param: int $contextid the context the question is in.

export_to_xml($question, qformat_xml $format, $extra = null)   X-Ref
No description

import_from_xml($data, $question, qformat_xml $format, $extra=null)   X-Ref
No description

get_random_guess_score($questiondata)   X-Ref
No description