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, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan, Aya Saad, David Mudrák (@mudrd8mz), Helen Foster, Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jan/16