Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-19428

The 'modgrade' (scale/maxgrade) form type has a $includenograde parameter which does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.5
    • Fix Version/s: 1.9.6
    • Component/s: Forms Library
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Lines such as the following:

      $mform->addElement('modgrade', 'ratingscale', get_string('scale'), null, false);

      ought to override the =true on the last parameter of the modgrade item type, causing it to hide the 'nograde' option from the list.

      In fact the list is built before the constructor is called, due to the rather weird architecture of HTML QuickForm. Consequently the variable is not available. In addition, it is not possible to have a QuickForm parameter within the first 5 that defaults to true because there is code that goes around setting all the first 5 parameters to null if they are not set. [I.e. all defaults must be to null/false, not true.]

        Attachments

          Activity

            People

            • Assignee:
              quen Sam Marshall
              Reporter:
              quen Sam Marshall
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                21/Oct/09