Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.
   1  <?php
   2  // This file is part of Moodle - http://moodle.org/
   3  //
   4  // Moodle is free software: you can redistribute it and/or modify
   5  // it under the terms of the GNU General Public License as published by
   6  // the Free Software Foundation, either version 3 of the License, or
   7  // (at your option) any later version.
   8  //
   9  // Moodle is distributed in the hope that it will be useful,
  10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  // GNU General Public License for more details.
  13  //
  14  // You should have received a copy of the GNU General Public License
  15  // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  namespace mod_quiz\output;
  18  
  19  use moodle_url;
  20  use renderable;
  21  
  22  /**
  23   * Represents a single link in the navigation panel.
  24   *
  25   * @package   mod_quiz
  26   * @category  output
  27   * @copyright 2011 The Open University
  28   * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  29   */
  30  class navigation_question_button implements renderable {
  31      /** @var string id="..." to add to the HTML for this button. */
  32      public $id;
  33      /** @var bool, if this is a real question, not an info item. */
  34      public $isrealquestion;
  35      /** @var string number to display in this button. Either the question number of 'i'. */
  36      public $number;
  37      /** @var string class to add to the class="" attribute to represnt the question state. */
  38      public $stateclass;
  39      /** @var string Textual description of the question state, e.g. to use as a tool tip. */
  40      public $statestring;
  41      /** @var int the page number this question is on. */
  42      public $page;
  43      /** @var bool true if this question is on the current page. */
  44      public $currentpage;
  45      /** @var bool true if this question has been flagged. */
  46      public $flagged;
  47      /** @var moodle_url the link this button goes to, or null if there should not be a link. */
  48      public $url;
  49      /** @var int QUIZ_NAVMETHOD_FREE or QUIZ_NAVMETHOD_SEQ. */
  50      public $navmethod;
  51  }