Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide
      1. Create an instance of mod_assign in a course.
      2. On the module settings screen, enable file submissions and set the maximum number of files to 3.
      3. Edit the settings again and check that the maximum number of files submissions is still set to 3.
      Show
      Create an instance of mod_assign in a course. On the module settings screen, enable file submissions and set the maximum number of files to 3. Edit the settings again and check that the maximum number of files submissions is still set to 3.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
    • Rank:
      39982

      Description

      update_record third param is a bool, so there is a bug here:

          public final function set_config($name, $value) {
              global $DB;
      
              $current = $DB->get_record('assign_plugin_config', array('assignment'=>$this->assignment->get_instance()->id, 'subtype'=>$this->get_subtype(), 'plugin'=>$this->get_type(), 'name'=>$name), '*', IGNORE_MISSING);
      
              if ($current) {
                  $current->value = $value;
                  return $DB->update_record('assign_plugin_config', $current, array('id'=>$current->id));
      

        Activity

        Hide
        Damyon Wiese added a comment -

        Fixed - id is already in the record from the DB call so no need to set it at all in

        $DB->update_record()

        Show
        Damyon Wiese added a comment - Fixed - id is already in the record from the DB call so no need to set it at all in $DB->update_record()
        Hide
        Dan Poltawski added a comment -

        Looks good, submitting for integration thanks.

        Could you write some testing instructions for how to check for regressions? thanks

        Show
        Dan Poltawski added a comment - Looks good, submitting for integration thanks. Could you write some testing instructions for how to check for regressions? thanks
        Hide
        Eloy Lafuente (stronk7) added a comment -

        The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

        TIA and ciao

        Show
        Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
        Hide
        Damyon Wiese added a comment -

        Rebased on top of latest weekly dev.

        Show
        Damyon Wiese added a comment - Rebased on top of latest weekly dev.
        Hide
        Sam Hemelryk added a comment -

        Thanks guys, clean up looks spot on and this has been integrated now!

        Show
        Sam Hemelryk added a comment - Thanks guys, clean up looks spot on and this has been integrated now!
        Hide
        Andrew Davis added a comment -

        Works as described. Passing.

        Show
        Andrew Davis added a comment - Works as described. Passing.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        U P S T R E A M I Z E D !

        Many thanks for the hard work, closing this as fixed.

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - U P S T R E A M I Z E D ! Many thanks for the hard work, closing this as fixed. Ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: