Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_quiz Namespace Reference

  More...

Namespaces

namespace  admin
  
 
namespace  adminpresets
  
 
namespace  cache
  
 
namespace  completion
  
 
namespace  event
  
 
namespace  external
  
 
namespace  form
  
 
namespace  hook
  
 
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_random_questions (int $addonpage, int $number, array $filtercondition)
 Add a random question to the quiz at a given point.
 
 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.
 
 create_grade_item (stdClass $gradeitemdata)
 Create a grade item.
 
 delete_grade_item (int $gradeitemid)
 Delete a grade item (only if it is not used).
 
 formatted_grade_item_sum_marks (int $gradeitemid)
 Get the total of marks of all questions assigned to this grade item, formatted for display.
 
 get_grade_items ()
 Get the grade items defined for this quiz.
 
 get_slot_tags_for_slot_id ()
 
 is_grade_item_used (int $gradeitemid)
 Is a particular quiz grade item used by any slots?
 
 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_grade_item (stdClass $gradeitemdata)
 Update a grade item.
 
 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_grade_item (stdClass $slot, ?int $gradeitemid)
 Change which grade this slot contributes to, for quizzes with multiple grades.
 
 update_slot_maxmark ($slot, $maxmark)
 Change the max mark for a slot.
 
 verify_grade_item_is_ours (int $gradeitemid)
 Check the grade item with the given id belongs to this quiz.
 

Detailed Description