Moodle APIs 4.1
Moodle 4.1.9+ (Build: 20240402)
Directories | Files | Namespaces | Classes | Functions
core_question

Directories

directory bank
  
 
directory engine
  
 
directory local
  
 
directory statistics
  
 

Files

file  action_column_base.php
 A base class for actions that are an icon that lets you manipulate the question in some way.
 
file  all_calculated_for_qubaid_condition.php
 A collection of all the question statistics calculated for an activity instance ie.
 
file  analyser.php
 This file contains the code to analyse all the responses to a particular question.
 
file  analysis_for_actual_response.php
 
file  analysis_for_class.php
 
file  analysis_for_question.php
 This file contains the code to analyse all the responses to a particular question.
 
file  analysis_for_question_all_tries.php
 This file contains a class to analyse all the responses for multiple tries at a particular question.
 
file  analysis_for_subpart.php
 Data structure to count responses for each of the sub parts of a question.
 
file  behat_core_question.php
 Steps definitions related with the question bank management.
 
file  behat_core_question_generator.php
 Behat data generator for core_question.
 
file  behat_question.php
 Deprecated class, only kept for backwards compatibility.
 
file  behat_question_base.php
 Behat question-related helper code.
 
file  bulk_action_base.php
 Class bulk_action_base is the base class for bulk actions ui.
 
file  calculated_for_subquestion.php
 Class for storing calculated sub question statistics and intermediate calculation values.
 
file  calculated_question_summary.php
 Question statistics calculations class.
 
file  category_condition.php
 A search class to control from which category questions are listed.
 
file  checkbox_column.php
 A column with a checkbox for each question with name q{questionid}.
 
file  column_base.php
 Base class for representing a column.
 
file  condition.php
 Defines an abstract class for filtering/searching the question bank.
 
file  context_to_string_translator.php
 Converts contextlevels to strings and back to help with reading/writing contexts to/from import/export files.
 
file  datalib.php
 Code for loading and saving question attempts to and from the database.
 
file  edit_menu_column.php
 A question bank column which gathers together all the actions into a menu.
 
file  external.php
 External question API.
 
file  helper.php
 Helper class for question bank and its plugins.
 
file  hidden_condition.php
 A search class to control whether hidden / deleted questions are hidden in the list.
 
file  least_used_strategy.php
 A question_variant_selection_strategy that randomly selects variants that were not used yet.
 
file  lib.php
 Quiz module test data generator.
 
file  manage_qbank_plugins_page.php
 Manage question banks page.
 
file  menu_action_column_base.php
 Base class to make it easier to implement actions that are menuable_actions.
 
file  menuable_action.php
 Interface to indicate that a question bank column can go in the action menu.
 
file  navigation_node_base.php
 Base class class for navigation node.
 
file  plugin_features_base.php
 Base class class for qbank plugins.
 
file  previewlib.php
 Library functions used by question/preview.php.
 
file  privacy_helper.php
 Helper for privacy tests.
 
file  qbank_action_menu.php
 Rendered HTML elements for tertiary nav for Question bank.
 
file  question_edit_contexts.php
 Tracks all the contexts related to the one we are currently editing questions and provides helper methods to check permissions.
 
file  question_icon_exporter.php
 Class for exporting a question icon from an stdClass.
 
file  question_reference_manager.php
 This class should provide an API for managing question_references.
 
file  question_summary_exporter.php
 Class for exporting a question summary from an stdClass.
 
file  question_version_selection.php
 A UI widget to select other versions of a particular question.
 
file  question_version_status.php
 Class question_version_status contains the statuses for a question.
 
file  random_question_loader.php
 A class for efficiently finds questions at random from the question bank.
 
file  renderer.php
 Renderers for outputting parts of the question bank.
 
file  row_base.php
 Base class for 'columns' that are actually displayed as a row following the main question row.
 
file  statistics_bulk_loader.php
 Helper to efficiently load all the statistics for a set of questions.
 
file  tag_condition.php
 A condition for adding filtering by tag to the question bank.
 
file  view.php
 Class to print a view of the question bank.
 

Namespaces

namespace  core_question
  
 
namespace  core_question\admin
  
 
namespace  core_question\bank\search
  
 
namespace  core_question\engine\variants
  
 
namespace  core_question\external
  
 
namespace  core_question\local\bank
  
 
namespace  core_question\local\statistics
  
 
namespace  core_question\output
  
 
namespace  core_question\privacy
  
 
namespace  core_question\statistics\questions
  
 
namespace  core_question\statistics\responses
  
 

Classes

class  behat_core_question
 
class  behat_core_question_generator
 Behat data generator for core_question. More...
 
class  behat_question
 
class  behat_question_base
 
class  core_question\admin\manage_qbank_plugins_page
 Class manage_qbank_plugins_page. More...
 
class  core_question\bank\search\category_condition
 This class controls from which category questions are listed. More...
 
class  core_question\bank\search\condition
 An abstract class for filtering/searching questions. More...
 
class  core_question\bank\search\hidden_condition
 This class controls whether hidden / deleted questions are hidden in the list. More...
 
class  core_question\bank\search\tag_condition
 Question bank search class to allow searching/filtering by tags on a question. More...
 
class  core_question\engine\variants\least_used_strategy
 A question_variant_selection_strategy that randomly selects variants that were not used yet. More...
 
class  core_question\external\question_icon_exporter
 Class for exporting a question from an stdClass. More...
 
class  core_question\external\question_summary_exporter
 Class for exporting a question summary from an stdClass. More...
 
class  core_question\local\bank\action_column_base
 A base class for actions that are an icon that lets you manipulate the question in some way. More...
 
class  core_question\local\bank\bulk_action_base
 
class  core_question\local\bank\checkbox_column
 A column with a checkbox for each question with name q{questionid}. More...
 
class  core_question\local\bank\column_base
 Base class for representing a column. More...
 
class  core_question\local\bank\context_to_string_translator
 
class  core_question\local\bank\edit_menu_column
 A question bank column which gathers together all the actions into a menu. More...
 
class  core_question\local\bank\helper
 Class helper. More...
 
class  core_question\local\bank\menu_action_column_base
 Base class to make it easier to implement actions that are menuable_actions. More...
 
interface  core_question\local\bank\menuable_action
 Interface to indicate that a question bank column can go in the action menu. More...
 
class  core_question\local\bank\navigation_node_base
 Class navigation_node_base is the base class for navigation node. More...
 
class  core_question\local\bank\plugin_features_base
 Class plugin_features_base is the base class for qbank plugins. More...
 
class  core_question\local\bank\question_edit_contexts
 
class  core_question\local\bank\question_version_status
 
class  core_question\local\bank\random_question_loader
 This class efficiently finds questions at random from the question bank. More...
 
class  core_question\local\bank\row_base
 Base class for 'columns' that are actually displayed as a row following the main question row. More...
 
class  core_question\local\bank\view
 This class prints a view of the question bank. More...
 
class  core_question\local\statistics\statistics_bulk_loader
 
class  core_question\output\qbank_action_menu
 
class  core_question\output\question_version_selection
 
class  core_question\privacy\provider
 Privacy Subsystem implementation for core_question. More...
 
class  core_question\question_reference_manager
 
class  core_question\statistics\questions\all_calculated_for_qubaid_condition
 A collection of all the question statistics calculated for an activity instance. More...
 
class  core_question\statistics\questions\calculated_for_subquestion
 A class to store calculated stats for a sub question. More...
 
class  core_question\statistics\questions\calculated_question_summary
 Class calculated_question_summary. More...
 
class  core_question\statistics\responses\analyser
 This class can compute, store and cache the analysis of the responses to a particular question. More...
 
class  core_question\statistics\responses\analysis_for_actual_response
 The leafs of the analysis data structure. More...
 
class  core_question\statistics\responses\analysis_for_class
 Counts a class of responses for this sub part of the question. More...
 
class  core_question\statistics\responses\analysis_for_question
 Analysis for possible responses for parts of a question. More...
 
class  core_question\statistics\responses\analysis_for_question_all_tries
 Analysis for possible responses for parts of a question with multiple submitted responses. More...
 
class  core_question\statistics\responses\analysis_for_subpart
 Representing the analysis of each of the sub parts of each variant of the question. More...
 
class  core_question_bank_renderer
 This renderer outputs parts of the question bank. More...
 
class  core_question_external
 
class  core_question_generator
 Class core_question_generator for generating question data. More...
 
class  qubaid_condition
 This class represents a restriction on the set of question_usage ids to include in a larger database query. More...
 
class  qubaid_join
 This class represents a restriction on the set of question_usage ids to include in a larger database query based on JOINing to some other tables. More...
 
class  qubaid_list
 This class represents a restriction on the set of question_usage ids to include in a larger database query based on an explicit list of ids. More...
 
class  question_engine_data_mapper
 This class controls the loading and saving of question engine data to and from the database. More...
 
class  question_engine_unit_of_work
 Implementation of the unit of work pattern for the question engine. More...
 
class  question_file_loader
 This class is the mirror image of question_file_saver. More...
 
class  question_file_saver
 This class represents the promise to save some files from a particular draft file area into a particular file area. More...
 
interface  question_response_files
 The interface implemented by question_file_saver and question_file_loader. More...
 

Functions

 core_question_output_fragment_tags_form ($args)
 Question tags fragment callback.
 
 question_preview_action_url ($questionid, $qubaid, question_preview_options $options, $context)
 The the URL to use for actions relating to this preview.
 
 question_preview_form_url ($questionid, $context, $previewid=null)
 The the URL to use for actions relating to this preview.
 
 question_preview_question_pluginfile ($course, $context, $component, $filearea, $qubaid, $slot, $args, $forcedownload, $fileoptions)
 
 restart_preview ($previewid, $questionid, $displayoptions, $context)
 Delete the current preview, if any, and redirect to start a new preview.
 

Detailed Description

Function Documentation

◆ core_question_output_fragment_tags_form()

core_question_output_fragment_tags_form (   $args)

Question tags fragment callback.

Parameters
array$argsArguments to the form.
Return values
null|stringThe rendered form.
Deprecated:
since Moodle 4.0
See also
/question/bank/qbank_tagquestion/lib.php
Todo:
Final deprecation on Moodle 4.4 MDL-72438

◆ question_preview_action_url()

question_preview_action_url (   $questionid,
  $qubaid,
question_preview_options  $options,
  $context 
)

The the URL to use for actions relating to this preview.

Parameters
int$questionidthe question being previewed.
int$qubaidthe id of the question usage for this preview.
question_preview_options$optionsthe options in use.
context$context
Deprecated:
since Moodle 4.0
See also
qbank_previewquestion::helper::question_preview_action_url()
Todo:
Final deprecation on Moodle 4.4 MDL-72438

◆ question_preview_form_url()

question_preview_form_url (   $questionid,
  $context,
  $previewid = null 
)

The the URL to use for actions relating to this preview.

Parameters
int$questionidthe question being previewed.
context$contextthe current moodle context.
int$previewidoptional previewid to sign post saved previewed answers.
Deprecated:
since Moodle 4.0
See also
qbank_previewquestion::helper::question_preview_form_url()
Todo:
Final deprecation on Moodle 4.4 MDL-72438

◆ restart_preview()

restart_preview (   $previewid,
  $questionid,
  $displayoptions,
  $context 
)

Delete the current preview, if any, and redirect to start a new preview.

Parameters
int$previewid
int$questionid
object$displayoptions
object$context
Deprecated:
since Moodle 4.0
See also
qbank_previewquestion::helper::restart_preview()
Todo:
Final deprecation on Moodle 4.4 MDL-72438