Moodle
  1. Moodle
  2. MDL-36805

mod_workshop phpDoc suggests that modname is a required property for workshop_grade_item_update() function

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.6
    • Fix Version/s: 2.2.7, 2.3.4, 2.4.1
    • Component/s: Workshop
    • Labels:
    • Rank:
      46321

      Description

      As discussed in MDL-34791, workshop_grade_item_update() takes $workshop as a parameter.

      The phpDoc block suggests that modname should be present in this stdClass object, but it's never used and is not in fact required.

        Issue Links

          Activity

          Hide
          Andrew Nicols added a comment -

          I haven't provided a MOODLE_23_STABLE branch - not sure whether this should be backported or not. If someone could advise, then I'll happily create one (though it should cherry-pick cleanly)

          Show
          Andrew Nicols added a comment - I haven't provided a MOODLE_23_STABLE branch - not sure whether this should be backported or not. If someone could advise, then I'll happily create one (though it should cherry-pick cleanly)
          Hide
          Rajesh Taneja added a comment -

          Thanks Andrew,

          Just had a word with Dan and it seems it can be backported as this is wrong documentation.

          Otherwise patch looks nice, I would probably remove "with extra cmidnumber property", as workshop instance is expected to have id.

          Show
          Rajesh Taneja added a comment - Thanks Andrew, Just had a word with Dan and it seems it can be backported as this is wrong documentation. Otherwise patch looks nice, I would probably remove "with extra cmidnumber property", as workshop instance is expected to have id.
          Hide
          Andrew Nicols added a comment -

          Cheers Raj,

          I'll backport this too. The cmidnumber is a field which must be added to the object from another table so this comment does make sense. The same comment is included in every module providing this functionality.

          Andrew

          Show
          Andrew Nicols added a comment - Cheers Raj, I'll backport this too. The cmidnumber is a field which must be added to the object from another table so this comment does make sense. The same comment is included in every module providing this functionality. Andrew
          Hide
          Andrew Nicols added a comment -

          Backported to 22 and 23. Since we're still on sync, I've not provided a 24 branch.

          Show
          Andrew Nicols added a comment - Backported to 22 and 23. Since we're still on sync, I've not provided a 24 branch.
          Hide
          Sam Hemelryk added a comment -

          Thanks Andrew, this has been integrated now.

          By total coincidence I had been looking at the grade API this morning in relation to the grade_update callback and how it functions.

          Show
          Sam Hemelryk added a comment - Thanks Andrew, this has been integrated now. By total coincidence I had been looking at the grade API this morning in relation to the grade_update callback and how it functions.
          Hide
          Sam Hemelryk added a comment -

          Passing as no testing required, confirmed during review.

          Show
          Sam Hemelryk added a comment - Passing as no testing required, confirmed during review.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now! Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: