Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
question_attempt_step_iterator Class Reference

A class abstracting access to the question_attempt::$states array. More...

Inheritance diagram for question_attempt_step_iterator:
question_attempt_reverse_step_iterator question_attempt_steps_with_submitted_response_iterator

Public Member Functions

 __construct (question_attempt $qa)
 Do not call this constructor directly.
 
 current ()
 
 key ()
 
 next ()
 
 offsetExists ($i)
 
 offsetGet ($i)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 rewind ()
 
 valid ()
 

Protected Attributes

integer $i
 records the current position in the iteration.
 
question_attempt $qa
 the question_attempt being iterated over.
 

Detailed Description

A class abstracting access to the question_attempt::$states array.

This is actively linked to question_attempt. If you add an new step mid-iteration, then it will be included.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

question_attempt_step_iterator::__construct ( question_attempt $qa)

Do not call this constructor directly.

Use question_attempt::get_step_iterator().

Parameters
question_attempt$qathe attempt to iterate over.

Reimplemented in question_attempt_steps_with_submitted_response_iterator.

Member Function Documentation

◆ current()

question_attempt_step_iterator::current ( )

◆ key()

question_attempt_step_iterator::key ( )
Return values
int

Reimplemented in question_attempt_steps_with_submitted_response_iterator.

◆ offsetExists()

question_attempt_step_iterator::offsetExists ( $i)
Return values
bool

Reimplemented in question_attempt_steps_with_submitted_response_iterator.

◆ offsetGet()

question_attempt_step_iterator::offsetGet ( $i)

◆ valid()

question_attempt_step_iterator::valid ( )
Return values
bool

Reimplemented in question_attempt_steps_with_submitted_response_iterator.


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