Moodle APIs 4.2
Moodle 4.2.7 (Build: 20240422)
|
Quiz structure class. More...
Classes | |
class | mod_quiz\structure |
Namespaces | |
namespace | mod_quiz |
| |
Functions | |
mod_quiz::add_section_heading ($pagenumber, $heading=null) | |
Add a section heading on a given page and return the sectionid. | |
mod_quiz::can_add_random_questions () | |
Whether the current user can add random questions to the quiz or not. | |
mod_quiz::can_add_section_heading ($pagenumber) | |
Check whether adding a section heading is possible. | |
mod_quiz::formatted_question_grade ($slotnumber) | |
Get the maximum mark for a question, formatted for display. | |
mod_quiz::formatted_quiz_grade () | |
Get the overall quiz grade formatted for display. | |
mod_quiz::get_dates_summary () | |
Get the date information about the current state of the quiz. | |
mod_quiz::get_decimal_places_for_grades () | |
Get the number of decimal places for displaying overall quiz grades or marks. | |
mod_quiz::get_decimal_places_for_question_marks () | |
Get the number of decimal places for displaying question marks. | |
mod_quiz::get_edit_page_warnings () | |
Get any warnings to show at the top of the edit page. | |
mod_quiz::get_section_by_id ($sectionid) | |
Get a particular section by id. | |
mod_quiz::get_section_count () | |
Get the number of questions in the quiz. | |
mod_quiz::get_sections () | |
Get all the sections of the quiz. | |
mod_quiz::get_slot_tags_for_slot_id ($slotid) | |
Retrieve the list of slot tags for the given slot id. | |
mod_quiz::get_slots_in_section ($sectionid) | |
Get all the slots in a section of the quiz. | |
mod_quiz::get_version_choices_for_slot (int $slotnumber) | |
Get the version options to show on the 'Questions' page for a particular question. | |
mod_quiz::move_slot ($idmove, $idmoveafter, $page) | |
Move a slot from its current location to a new location. | |
mod_quiz::populate_question_numbers () | |
Number the questions. | |
mod_quiz::populate_slots_with_sections () | |
Fill in the section ids for each slot. | |
mod_quiz::populate_structure () | |
Set up this class with the structure for a given quiz. | |
mod_quiz::refresh_page_numbers ($slots=[]) | |
Refresh page numbering of quiz slots. | |
mod_quiz::refresh_page_numbers_and_update_db () | |
Refresh page numbering of quiz slots and save to the database. | |
mod_quiz::remove_section_heading ($sectionid) | |
Remove the section heading with the given id. | |
mod_quiz::remove_slot ($slotnumber) | |
Remove a slot from a quiz. | |
mod_quiz::set_section_heading ($id, $newheading) | |
Change the heading for a section. | |
mod_quiz::set_section_shuffle ($id, $shuffle) | |
Change the shuffle setting for a section. | |
mod_quiz::unset_question ($slotid) | |
Unset the question object after deletion. | |
mod_quiz::update_page_break ($slotid, $type) | |
Add/Remove a pagebreak. | |
mod_quiz::update_question_dependency ($slotid, $requireprevious) | |
Set whether the question in a particular slot requires the previous one. | |
mod_quiz::update_slot_display_number (int $slotid, string $displaynumber) | |
Update the question display number when is set as customised display number or empy string. | |
mod_quiz::update_slot_maxmark ($slot, $maxmark) | |
Change the max mark for a slot. | |
Quiz structure class.
The structure of the quiz. That is, which questions it is built up from. This is used on the Edit quiz page (edit.php) and also when starting an attempt at the quiz (startattempt.php). Once an attempt has been started, then the attempt holds the specific set of questions that that student should answer, and we no longer use this class.