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

$create parameter in assign::get_user_submission() not optional as documented

    XMLWordPrintable

Details

    Description

      The PHPDoc for the $create parameter in assign::get_user_submission() is

      @param bool $create optional - defaults to false. If set to true a new submission object
      will be created in the database with the status set to "new".

      This is not strictly correct, as the parameter has no default. If called without the parameter, the method happens to behave as if false was passed, but a warning message is emitted. It would be better if it were actually to default to false as documented.

      Attachments

        Activity

          People

            maherne Michael Aherne
            maherne Michael Aherne
            Dan Poltawski Dan Poltawski
            Adrian Greeve Adrian Greeve
            Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jan/16