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

Assignment upgrade exception

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.4.3
    • 2.3.7, 2.4.4
    • Assignment
    • MOODLE_24_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MDL-38525-master
    • Hide
      1. Create an instance of the old 'Advanced uploading of files' assignment with "Allow notes" enabled.
      2. Login as a student and add a note to your submission
      3. Login as an admin and unenrol the student
      4. Upgrade the assignment with the assignment upgrade tool
      5. Verify that the upgrade completes successfully.
      Show
      Create an instance of the old 'Advanced uploading of files' assignment with "Allow notes" enabled. Login as a student and add a note to your submission Login as an admin and unenrol the student Upgrade the assignment with the assignment upgrade tool Verify that the upgrade completes successfully.

    Description

      Eloy reported an assignment upgrade exception with a null exception error message. "Could not convert assignment. Exception was: {$a}."

      Extra info: object(comment_exception)[4892]
      public 'errorcode' => string 'nopermissiontocomment' (length=21)
      public 'module' => string 'error' (length=5)
      public 'a' => null
      public 'link' => string '' (length=0)
      public 'debuginfo' => null
      protected 'message' => string 'You can't add comments' (length=22)
      private 'string' (Exception) => string '' (length=0)
      protected 'code' => int 0
      protected 'file' => string '/Users/stronk7/Sites/fp/moodle/comment/lib.php' (length=46)
      protected 'line' => int 613
      private 'trace' (Exception) =>

      So 2 things need fixing: Assignment upgrade code needs to handle a null exception->error and more testing on upload assignments with comments re: permissions to try and reproduce this bug.

      Attachments

        Activity

          People

            damyon Damyon Wiese
            damyon Damyon Wiese
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jason Fowler Jason Fowler
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13/May/13