Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
question_behaviour_attempt_updater Class Reference

Base class for managing the upgrade of a question using a particular behaviour. More...

Inheritance diagram for question_behaviour_attempt_updater:
qbehaviour_adaptive_converter qbehaviour_deferredfeedback_converter qbehaviour_informationitem_converter qbehaviour_manualgraded_converter qbehaviour_adaptivenopenalty_converter

Public Member Functions

 __construct ($quiz, $attempt, $question, $qsession, $qstates, $logger, $qeupdater)
 
 discard ()
 
 get_converted_qa ()
 
 supply_missing_qa ()
 
 to_text ($html)
 

Public Attributes

object $qa
 this is the data for the upgraded questions attempt that we are building.
 

Protected Member Functions

 add_step ($step)
 
 behaviour_name ()
 
 convert_steps ()
 
 create_missing_first_step ()
 
 discard_last_state ()
 
 finish_up ()
 
 graded_state_for_fraction ($fraction)
 
 initialise_qa ()
 
 make_qtype_updater ()
 
 make_step ($state)
 
 manual_graded_state_for_fraction ($fraction)
 
 process0 ($step, $state)
 
 process1 ($step, $state)
 
 process2 ($step, $state)
 
 process3 ($step, $state)
 
 process4 ($step, $state)
 
 process5 ($step, $state)
 
 process6 ($step, $state)
 
 process7 ($step, $state)
 
 process8 ($step, $state)
 
 process9 ($step, $state)
 
 process_state ($state)
 
 unexpected_event ($state)
 

Protected Attributes

object $attempt
 the quiz attempt data.
 
object $finishstate
 pointer to the state that has already finished this attempt.
 
question_engine_assumption_logger $logger
 
question_engine_attempt_upgrader $qeupdater
 
object $qsession
 the question session to be upgraded.
 
array $qstates
 the question states for the session to be upgraded.
 
question_qtype_attempt_updater $qtypeupdater
 
object $question
 the question definition data.
 
object $quiz
 the quiz settings.
 
int $sequencenumber
 counts the question_steps as they are converted to question_attempt_steps.
 
stdClass $startstate
 

Detailed Description

Base class for managing the upgrade of a question using a particular behaviour.

This class takes as input:

  1. Various backgroud data like $quiz, $attempt and $question.
  2. The data about the question session to upgrade $qsession and $qstates. Working through that data, it builds up
  3. The equivalent new data $qa. This has roughly the same data as a question_attempt object belonging to the new question engine would have, but $this->qa is built up from stdClass objects.
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ make_qtype_updater()

question_behaviour_attempt_updater::make_qtype_updater ( )
protected
Parameters
object$questiona question definition
Return values
qtype_updater

The documentation for this class was generated from the following file: