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

Blog level upgrade from 1.9 to 2.2 - user ids are lost

XMLWordPrintable

    • MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • wip-mdl-33102
    • Hide

      In Moodle 1.9, create a blog, and set the visibility to "Users can only see blogs for people who share a course." Use a variety of test accounts to make posts to the blog.

      Upgrade the site to Moodle 2.2.

      After upgrading, run the Blog Level Update utility, at the url:
      /admin/tool/bloglevelupgrade/

      (Note that the blog upgrade utility does not run automatically as part of the standard upgrade routines. You must run the tool manually – you can find it in Site Admin, Tools)

      The utility converts legacy blogs which have visibility set at the course level, into forums of type blog.

      After upgrading, navigate to the course, and find the forum that has been created to hold the blog postings.

      Check if the blog posts are owned by the proper person, or by you (the admin of the site - the user that just ran the blog update utility).

      -Garret

      NOTE:
      Repeat test on master and 2.1
      In 2.1 update link is admin/bloglevelupgrade.php

      Show
      In Moodle 1.9, create a blog, and set the visibility to "Users can only see blogs for people who share a course." Use a variety of test accounts to make posts to the blog. Upgrade the site to Moodle 2.2. After upgrading, run the Blog Level Update utility, at the url: /admin/tool/bloglevelupgrade/ (Note that the blog upgrade utility does not run automatically as part of the standard upgrade routines. You must run the tool manually – you can find it in Site Admin, Tools) The utility converts legacy blogs which have visibility set at the course level, into forums of type blog. After upgrading, navigate to the course, and find the forum that has been created to hold the blog postings. Check if the blog posts are owned by the proper person, or by you (the admin of the site - the user that just ran the blog update utility). -Garret NOTE: Repeat test on master and 2.1 In 2.1 update link is admin/bloglevelupgrade.php

      When I run the blog level upgrade utility in moodle 2.2, the userids of all blog posters are replaced with my user ID. (I am the logged in user who is running the utility.) As a result, every migrated post has my name and avatar on it.

      I believe I found a mistake in the code, and a simple fix.

      Line 124 of admin/tool/bloglevelupgrade/index.php:

      change:
      $discussionid = forum_add_discussion($discussion, null, $message);

      to:
      $discussionid = forum_add_discussion($discussion, null, $message, $blogentry->userid);

      Also see:
      http://moodle.org/mod/forum/discuss.php?d=201802

      At least one other Moodler has experienced this issue.

            rajeshtaneja Rajesh Taneja
            garretg Garret Gengler (Inactive)
            Sam Hemelryk Sam Hemelryk
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.