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

Upon restore, association of "owner" of single simple discussion forum type defaults to user completing restore. Solution: hide author of the first post

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.3, 1.9.4, 2.8.6, 2.9, 3.2
    • Fix Version/s: 3.2
    • Component/s: Administration, Forum
    • Environment:
      Hosted MoodleRooms installation
      Moodle 1.9.4+ build 20090129
      PHP: 5.2.4
      MySQL: 5.0.54
    • Database:
      MySQL
    • Testing Instructions:
      Hide
      Creating a simple discussion forum
      1. Create a course and enrol a teacher.
      2. Login as a teacher.
      3. Set a profile picture for the teacher.
      4. Create a "Single simple discussion" type forum SF1.
      5. Check the discussion's first post.
        • Confirm that it there is no name and picture shown.
      Restoring a simple discussion forum without user data
      1. Backup the course, but do not include the user data for SF1 in Step 2. Schema settings.
      2. Restore the backup into the same course. Be sure to choose choose "Delete the contents of this course and then restore"
      3. After the course has been restored, navigate to SF1.
      4. Check the discussion's first post.
        • Confirm that there is no picture and name shown.
        • Confirm that underneath the first post's title, there is no "by" and it only shows the date of the post.
      5. Post a reply to the discussion.
        • Confirm that the reply shows the user's name and picture.
      Recent activity block and page
      1. After performing the restore, go to the course's main page.
      2. Check the "Recent activity" block.
      3. Check the entry for the single discussion forum SF1.
        • Confirm that it shows the name of the single discussion forum SF1, but there's no author name displayed.
      4. Check the entry for the reply in the single discussion forum SF1.
        • Confirm that it shows the name of the reply's author.
      5. Click the "Full report of recent activity..." link on the Recent activity block.
      6. Check the entry for the single discussion forum SF1.
        • Confirm that it does not show a picture and a name.
      7. Check the reply for the single discussion forum SF1.
        • Confirm that it shows the reply author's picture and name.
      Changing the simple single discussion forum to a standard forum
      1. Under Forum administration, click Edit settings.
      2. Change the forum's type to "Standard forum for general use"
      3. Click "Save and display"
      4. See the discussion list.
      5. Check the "Started by" column for the discussion SF1.
        • Confirm that the picture shows teacher's user profile picture.
        • Confirm that the teacher's name is displayed.
      6. Check the "Last post" column for the discussion SF1.
        • Confirm that there the teacher's name displayed.
      Changing back to a simple single discussion.
      1. Under Forum administration, click Edit settings.
      2. Change the forum's type to "Single simple discussion"
      3. Click "Save and display"
      4. Check the discussion's first post.
        • Confirm that there is no picture shown.
        • Confirm that underneath the first post's title, there is no "by" and it only shows the date of the post.
      Backup with user data
      1. Repeat the above steps, but this time, backup and restore the single simple discussion forum with user data.
        • Confirm that the first post of the single simple discussion does not show the user's name and picture.
      Other forum types
      1. Create discussions on other forum types.
        • Confirm that the first post show the discussion owner's name and picture.
      Automated tests.
      1. Run Behat tests for @mod_forum tags.
        • Confirm that there are no errors nor failures.
      2. Run PHPUnit tests for the mod_forum test suite .
        • Confirm that there are no errors nor failures.
      Show
      Creating a simple discussion forum Create a course and enrol a teacher. Login as a teacher. Set a profile picture for the teacher. Create a " Single simple discussion " type forum SF1. Check the discussion's first post. Confirm that it there is no name and picture shown. Restoring a simple discussion forum without user data Backup the course, but do not include the user data for SF1 in Step 2. Schema settings . Restore the backup into the same course. Be sure to choose choose " Delete the contents of this course and then restore " After the course has been restored, navigate to SF1. Check the discussion's first post. Confirm that there is no picture and name shown. Confirm that underneath the first post's title, there is no " by " and it only shows the date of the post. Post a reply to the discussion. Confirm that the reply shows the user's name and picture. Recent activity block and page After performing the restore, go to the course's main page. Check the " Recent activity " block. Check the entry for the single discussion forum SF1. Confirm that it shows the name of the single discussion forum SF1, but there's no author name displayed. Check the entry for the reply in the single discussion forum SF1. Confirm that it shows the name of the reply's author. Click the " Full report of recent activity... " link on the Recent activity block. Check the entry for the single discussion forum SF1. Confirm that it does not show a picture and a name. Check the reply for the single discussion forum SF1. Confirm that it shows the reply author's picture and name. Changing the simple single discussion forum to a standard forum Under Forum administration, click Edit settings . Change the forum's type to " Standard forum for general use " Click "Save and display" See the discussion list. Check the " Started by " column for the discussion SF1. Confirm that the picture shows teacher's user profile picture. Confirm that the teacher's name is displayed. Check the " Last post " column for the discussion SF1. Confirm that there the teacher's name displayed. Changing back to a simple single discussion. Under Forum administration, click Edit settings . Change the forum's type to " Single simple discussion " Click "Save and display" Check the discussion's first post. Confirm that there is no picture shown. Confirm that underneath the first post's title, there is no " by " and it only shows the date of the post. Backup with user data Repeat the above steps, but this time, backup and restore the single simple discussion forum with user data. Confirm that the first post of the single simple discussion does not show the user's name and picture. Other forum types Create discussions on other forum types. Confirm that the first post show the discussion owner's name and picture. Automated tests. Run Behat tests for @mod_forum tags. Confirm that there are no errors nor failures. Run PHPUnit tests for the mod_forum test suite . Confirm that there are no errors nor failures.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-18599-master
    • Sprint:
      3.2 Sprint 2

      Description

      This is a tracker submitted as a follow-up to a discussion on Moodle.org boards: http://moodle.org/mod/forum/discuss.php?d=92396#p522335 in reference to the problem that if a user other than the original course creator (the faculty member) restores a course, then in the restored shell, the user associated as the creator of any single simple discussion type threads defaults to the user who performed the restore rather than the user who is associated as the teacher in the course. To quote Howard Miller the problem is, "As you no longer have any users in the course the "owner" of the posting cannot be the original teacher as they are no longer in the course."

      ------------------------

      We are using Moodle 1.9.4+ and are experiencing the "owner" issue associated with the single simple discussion forums. (We experienced this on 1.9.3 version as well...)

      At an institutional level, the "rollover process" from semester to semester is defined to meet the needs of the institution and this does not necessarily mesh with the default Moodle functionality, as many are discovering. There are generally 2 paths for "rollover" that we've discovered:

      1. Use of RESET of Same Course Shell for Semester to Semester Rollover Process
      If a user triggers "reset" within a course and reuses the course in this manner semester to semester, then tie-in to an enrollment system (LDAP, External Database, Message Broker) does not work as the course naming conventions are not altered so enrollments cannot be automated.

      2. Use of Backup and Restore to New Shell for Semester to Semester Rollover Process
      If a team of systems administrators has a process whereby new shells are created semester to semester and backup files from existing courses are restored to the new course shell then enrollment system tie-in functions work (naming conventions are mapped to the new shell, just content is reused in new shell), the prior semester shells are available for archiving and/or re-opening to limited students for incomplete makeups, and there is less possibility of corruption of the database associated with a course due to consistent yearly reset.

      • The problem with this new course shell restore process comes because currently the only users who can restore a course to a new shell or to an existing shell other than the one they are CURRENTLY IN are users in the role of admin or course creator - not teacher. Hence, the only users who can complete this process are the user not associated with the course shell - so in the scenario of the single-simple discussion forum, the sys admin or course creator is assigned as the creator of the single-simple forum rather than the faculty member associated with the new shell.

      <Possible solution:>
      Upon restore by sys admin and assignment of the faculty member to the role of "teacher", then the system should update the user associated as the creator of the single simple discussion thread - even if it means the faculty member needs to login to the new shell and trigger a "reset" in order to re-associate the faculty user as the creator of the single-simple discussion thread.

      Many thanks to all who participated in the discussion forum on these reports...

      • Mary

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                13 Vote for this issue
                Watchers:
                20 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/16