Moodle
  1. Moodle
  2. MDL-16461

Assignment: Advanced upload type - error in setting default values when creating new assignment

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.9.2
    • Fix Version/s: 1.9.3, 2.0
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Environment:
      any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      24295

      Description

      assignment type (advanced) upload, in file assignment.class.php, in function setup_elements() the default value for 'trackdrafts' is not set correctly.

      Near line 1053:
      $mform->addElement('select', 'var4', get_string("trackdrafts", "assignment"), $ynoptions);
      $mform->setHelpButton('var4', array('trackdrafts', get_string('trackdrafts', 'assignment'), 'assignment'));
      $mform->setDefault('trackdrafts', 1);

      The last line should be
      $mform->setDefault('var4', 1);

      The form's variable name is var4 - not trackdrafts.

        Activity

        Hide
        Dan Poltawski added a comment -

        Thanks Brian, i've fixed this in CVS

        Show
        Dan Poltawski added a comment - Thanks Brian, i've fixed this in CVS
        Hide
        Jérôme Mouneyrac added a comment -

        checked and tested on 1.9. 'Enable Send for marking' sets to yes be default. It has been fixed.

        Show
        Jérôme Mouneyrac added a comment - checked and tested on 1.9. 'Enable Send for marking' sets to yes be default. It has been fixed.
        Hide
        Jérôme Mouneyrac added a comment -

        Thank you for the report and the fix.

        Show
        Jérôme Mouneyrac added a comment - Thank you for the report and the fix.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: