A subclass of question_attempt_step that cannot be modified.
More...
|
| get_all_data () |
| Get all the data. More...
|
|
| get_behaviour_data () |
| Get all the behaviour variables. More...
|
|
| get_behaviour_var ($name) |
|
| get_fraction () |
|
| get_id () |
|
| get_metadata_var ($name) |
| Get a metadata variable. More...
|
|
| get_qt_data () |
| Get all the question type variables. More...
|
|
| get_qt_files ($name, $contextid) |
| Get the latest set of files for a particular question type variable of type question_attempt::PARAM_FILES. More...
|
|
| get_qt_var ($name) |
|
| get_state () |
|
| get_submitted_data () |
| Get all the submitted data, but not the cached data. More...
|
|
| get_timecreated () |
|
| get_user_id () |
|
| has_behaviour_var ($name) |
|
| has_metadata_var ($name) |
| Whether this step has a metadata variable. More...
|
|
| has_qt_var ($name) |
|
| prepare_response_files_draft_itemid ($name, $contextid) |
| Prepare a draft file are for the files belonging the a response variable of this step. More...
|
|
| prepare_response_files_draft_itemid_with_text ($name, $contextid, $text) |
| Prepare a draft file are for the files belonging the a response variable of this step, while rewriting the URLs in some text. More...
|
|
| rewrite_response_pluginfile_urls ($text, $contextid, $name, $extras) |
| Rewrite the @PLUGINFILE@ tokens in a response variable from this step that contains links to file. More...
|
|
| set_behaviour_var ($name, $value) |
| Set a cached behaviour variable. More...
|
|
| set_fraction ($fraction) |
| Set the fraction. More...
|
|
| set_metadata_var ($name, $value) |
| Set a metadata variable. More...
|
|
| set_qt_var ($name, $value) |
| Set a cached question type variable. More...
|
|
| set_state ($state) |
| Set the state. More...
|
|
A subclass of question_attempt_step that cannot be modified.
- Copyright
- 2009 The Open University
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ get_all_data()
question_attempt_step::get_all_data |
( |
| ) |
|
|
inherited |
◆ get_behaviour_data()
question_attempt_step::get_behaviour_data |
( |
| ) |
|
|
inherited |
◆ get_behaviour_var()
question_attempt_step::get_behaviour_var |
( |
|
$name | ) |
|
|
inherited |
- Parameters
-
string | $name | the name of a behaviour variable to look for in the submitted data. |
- Return values
-
string | the requested variable, or null if the variable is not set. |
Reimplemented in question_attempt_step_subquestion_adapter.
◆ get_fraction()
question_attempt_step::get_fraction |
( |
| ) |
|
|
inherited |
◆ get_id()
question_attempt_step::get_id |
( |
| ) |
|
|
inherited |
- Return values
-
int|null | The id of this step in the database. null if this step is not stored in the database. |
◆ get_metadata_var()
question_attempt_step::get_metadata_var |
( |
|
$name | ) |
|
|
inherited |
Get a metadata variable.
Do not call this method directly from your code. It is for internal use only. You should call question_usage::get_question_attempt_metadata().
- Parameters
-
string | $name | the name of the variable to set. [a-z][a-z0-9]*. |
- Return values
-
string | the value to set previously, or null if this variable was never set. |
◆ get_qt_data()
question_attempt_step::get_qt_data |
( |
| ) |
|
|
inherited |
◆ get_qt_files()
question_attempt_step::get_qt_files |
( |
|
$name, |
|
|
|
$contextid |
|
) |
| |
|
inherited |
◆ get_qt_var()
question_attempt_step::get_qt_var |
( |
|
$name | ) |
|
|
inherited |
- Parameters
-
string | $name | the name of a question type variable to look for in the submitted data. |
- Return values
-
string | the requested variable, or null if the variable is not set. |
Reimplemented in question_attempt_step_subquestion_adapter.
◆ get_state()
question_attempt_step::get_state |
( |
| ) |
|
|
inherited |
◆ get_submitted_data()
question_attempt_step::get_submitted_data |
( |
| ) |
|
|
inherited |
◆ get_timecreated()
question_attempt_step::get_timecreated |
( |
| ) |
|
|
inherited |
◆ get_user_id()
question_attempt_step::get_user_id |
( |
| ) |
|
|
inherited |
◆ has_behaviour_var()
question_attempt_step::has_behaviour_var |
( |
|
$name | ) |
|
|
inherited |
- Parameters
-
string | $name | the name of a behaviour variable to look for in the submitted data. |
- Return values
-
bool | whether a variable with this name exists in the question type data. |
Reimplemented in question_attempt_step_subquestion_adapter.
◆ has_metadata_var()
question_attempt_step::has_metadata_var |
( |
|
$name | ) |
|
|
inherited |
Whether this step has a metadata variable.
Do not call this method directly from your code. It is for internal use only. You should call question_usage::get_question_attempt_metadata().
- Parameters
-
string | $name | the name of the variable to set. [a-z][a-z0-9]*. |
- Return values
-
bool | the value to set previously, or null if this variable was never set. |
◆ has_qt_var()
question_attempt_step::has_qt_var |
( |
|
$name | ) |
|
|
inherited |
- Parameters
-
string | $name | the name of a question type variable to look for in the submitted data. |
- Return values
-
bool | whether a variable with this name exists in the question type data. |
Reimplemented in question_attempt_step_subquestion_adapter.
◆ load_from_records()
static question_attempt_step::load_from_records |
( |
|
$records, |
|
|
|
$attemptstepid, |
|
|
|
$qtype = null |
|
) |
| |
|
staticinherited |
Create a question_attempt_step from records loaded from the database.
- Parameters
-
Iterator | $records | Raw records loaded from the database. |
int | $stepid | The id of the records to extract. |
string | $qtype | The question type of which this is an attempt. If not given, each record must include a qtype field. |
- Return values
-
◆ prepare_response_files_draft_itemid()
question_attempt_step::prepare_response_files_draft_itemid |
( |
|
$name, |
|
|
|
$contextid |
|
) |
| |
|
inherited |
Prepare a draft file are for the files belonging the a response variable of this step.
- Parameters
-
string | $name | the variable name the files belong to. |
int | $contextid | the id of the context the quba belongs to. |
- Return values
-
Reimplemented in question_attempt_step_subquestion_adapter.
◆ prepare_response_files_draft_itemid_with_text()
question_attempt_step::prepare_response_files_draft_itemid_with_text |
( |
|
$name, |
|
|
|
$contextid, |
|
|
|
$text |
|
) |
| |
|
inherited |
Prepare a draft file are for the files belonging the a response variable of this step, while rewriting the URLs in some text.
- Parameters
-
string | $name | the variable name the files belong to. |
int | $contextid | the id of the context the quba belongs to. |
string | $text | the text to update the URLs in. |
- Return values
-
array(int,string) | the draft itemid and the text with URLs rewritten. |
Reimplemented in question_attempt_step_subquestion_adapter.
◆ rewrite_response_pluginfile_urls()
question_attempt_step::rewrite_response_pluginfile_urls |
( |
|
$text, |
|
|
|
$contextid, |
|
|
|
$name, |
|
|
|
$extras |
|
) |
| |
|
inherited |
Rewrite the @PLUGINFILE@ tokens in a response variable from this step that contains links to file.
Normally you should probably call question_attempt::rewrite_response_pluginfile_urls() instead of calling this method directly.
- Parameters
-
string | $text | the text to update the URLs in. |
int | $contextid | the id of the context the quba belongs to. |
string | $name | the variable name the files belong to. |
array | $extra | extra file path components. |
- Return values
-
string | the rewritten text. |
Reimplemented in question_attempt_step_subquestion_adapter.
◆ set_behaviour_var()
question_attempt_step_read_only::set_behaviour_var |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
Set a cached behaviour variable.
- Parameters
-
string | $name | the name of the variable to set. Must match _[a-z][a-z0-9]*. |
string | $value | the value to set. |
Reimplemented from question_attempt_step.
◆ set_fraction()
question_attempt_step_read_only::set_fraction |
( |
|
$fraction | ) |
|
Set the fraction.
Normally only called by behaviours.
- Parameters
-
null | number | $fraction | the fraction to set. |
Reimplemented from question_attempt_step.
◆ set_metadata_var()
question_attempt_step::set_metadata_var |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
|
inherited |
Set a metadata variable.
Do not call this method directly from your code. It is for internal use only. You should call question_usage::set_question_attempt_metadata().
- Parameters
-
string | $name | the name of the variable to set. [a-z][a-z0-9]*. |
string | $value | the value to set. |
◆ set_qt_var()
question_attempt_step_read_only::set_qt_var |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
Set a cached question type variable.
- Parameters
-
string | $name | the name of the variable to set. Must match _[a-z][a-z0-9]*. |
string | $value | the value to set. |
Reimplemented from question_attempt_step.
◆ set_state()
question_attempt_step_read_only::set_state |
( |
|
$state | ) |
|
The documentation for this class was generated from the following file: