Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
mod_quiz Namespace Reference

  More...

Namespaces

namespace  admin
  
 
namespace  adminpresets
  
 
namespace  cache
  
 
namespace  completion
  
 
namespace  event
  
 
namespace  external
  
 
namespace  form
  
 
namespace  local
  
 
namespace  output
  
 
namespace  plugininfo
  
 
namespace  privacy
  
 
namespace  question
  
 
namespace  search
  
 
namespace  task
  
 

Classes

class  access_manager
 
class  dates
 Class for fetching the important dates in mod_quiz for a given module instance and a user. More...
 
class  grade_calculator
 
class  group_observers
 Group observers class. More...
 
class  quiz_attempt
 
class  quiz_settings
 
class  repaginate
 
class  structure
 

Functions

 add_section_heading ($pagenumber, $heading=null)
 Add a section heading on a given page and return the sectionid.
 
 can_add_random_questions ()
 Whether the current user can add random questions to the quiz or not.
 
 can_add_section_heading ($pagenumber)
 Check whether adding a section heading is possible.
 
 formatted_question_grade ($slotnumber)
 Get the maximum mark for a question, formatted for display.
 
 formatted_quiz_grade ()
 Get the overall quiz grade formatted for display.
 
 get_dates_summary ()
 Get the date information about the current state of the quiz.
 
 get_decimal_places_for_grades ()
 Get the number of decimal places for displaying overall quiz grades or marks.
 
 get_decimal_places_for_question_marks ()
 Get the number of decimal places for displaying question marks.
 
 get_edit_page_warnings ()
 Get any warnings to show at the top of the edit page.
 
 get_section_by_id ($sectionid)
 Get a particular section by id.
 
 get_section_count ()
 Get the number of questions in the quiz.
 
 get_sections ()
 Get all the sections of the quiz.
 
 get_slot_tags_for_slot_id ($slotid)
 Retrieve the list of slot tags for the given slot id.
 
 get_slots_in_section ($sectionid)
 Get all the slots in a section of the quiz.
 
 get_version_choices_for_slot (int $slotnumber)
 Get the version options to show on the 'Questions' page for a particular question.
 
 move_slot ($idmove, $idmoveafter, $page)
 Move a slot from its current location to a new location.
 
 populate_question_numbers ()
 Number the questions.
 
 populate_slots_with_sections ()
 Fill in the section ids for each slot.
 
 populate_structure ()
 Set up this class with the structure for a given quiz.
 
 refresh_page_numbers ($slots=[])
 Refresh page numbering of quiz slots.
 
 refresh_page_numbers_and_update_db ()
 Refresh page numbering of quiz slots and save to the database.
 
 remove_section_heading ($sectionid)
 Remove the section heading with the given id.
 
 remove_slot ($slotnumber)
 Remove a slot from a quiz.
 
 set_section_heading ($id, $newheading)
 Change the heading for a section.
 
 set_section_shuffle ($id, $shuffle)
 Change the shuffle setting for a section.
 
 unset_question ($slotid)
 Unset the question object after deletion.
 
 update_page_break ($slotid, $type)
 Add/Remove a pagebreak.
 
 update_question_dependency ($slotid, $requireprevious)
 Set whether the question in a particular slot requires the previous one.
 
 update_slot_display_number (int $slotid, string $displaynumber)
 Update the question display number when is set as customised display number or empy string.
 
 update_slot_maxmark ($slot, $maxmark)
 Change the max mark for a slot.
 

Detailed Description