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

HTML not set to be the default editor in the summary of an assignment after restoring courses from 1.9.14 to 2.2.2

    Details

    • Testing Instructions:
      Hide
      1. As admin/teacher, log into a Moodle 1.9 course
      2. Create a course with an assignment (eg, Online text)
      3. Save the assignment and edit the settings
      4. Note the kind of editor used
      5. Backup the course
      6. Restore the course to a 2.x site and open the course
      7. Edit the settings for the assignment
      8. Note the format of the Description editor

      You should see a TinyMCE editor.

      Show
      As admin/teacher, log into a Moodle 1.9 course Create a course with an assignment (eg, Online text) Save the assignment and edit the settings Note the kind of editor used Backup the course Restore the course to a 2.x site and open the course Edit the settings for the assignment Note the format of the Description editor You should see a TinyMCE editor.
    • Workaround:
      Hide

      Change the format of the restored assignment description to HTML format, save settings, then edit the settings again.

      Show
      Change the format of the restored assignment description to HTML format, save settings, then edit the settings again.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:

      Description

      HTML not set to be the default editor in the description of an assignment activity after restoring courses from 1.9.14 to 2.2.2

      Assume this is related to: http://tracker.moodle.org/browse/MDL-29256

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              pjfish06 Susan Mangan created issue -
              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for reporting that. I was able to replicate the problem.

              I've put that on the backlog.

              In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.

              Show
              salvetore Michael de Raadt added a comment - Thanks for reporting that. I was able to replicate the problem. I've put that on the backlog. In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.
              salvetore Michael de Raadt made changes -
              Field Original Value New Value
              Fix Version/s STABLE backlog [ 10463 ]
              Testing Instructions # As admin/teacher, log into a Moodle 1.9 course
              # Create a course with an assignment (eg, Online text)
              # Save the assignment and edit the settings
              # Note the kind of editor used
              # Backup the course
              # Restore the course to a 2.x site and open the course
              # Edit the settings for the assignment
              # Note the format of the Description editor

              You should see a TinyMCE editor.
              Description HTML not set to be the default editor in the summary of an assignment activity after restoring courses from 1.9.14 to 2.2.2

              Assume this is related to: http://tracker.moodle.org/browse/MDL-29256



              HTML not set to be the default editor in the description of an assignment activity after restoring courses from 1.9.14 to 2.2.2

              Assume this is related to: http://tracker.moodle.org/browse/MDL-29256



              Workaround Change the format of the restored assignment description to HTML format, save settings, then edit the settings again.
              Labels triaged
              Assignee moodle.com [ moodle.com ] David Mudrak [ mudrd8mz ]
              Component/s Backup [ 10068 ]
              Hide
              hwileniu Heikki Wilenius added a comment -

              This bug applies also to upgraded installations (from 1.9 to 2.2).

              Show
              hwileniu Heikki Wilenius added a comment - This bug applies also to upgraded installations (from 1.9 to 2.2).
              deanthayer Dean Thayer made changes -
              Link This issue has a non-specific relationship to MDL-29256 [ MDL-29256 ]
              Hide
              cfulton Charles Fulton added a comment -

              I've started poking at a patch. I think the root problem is that the format field is mostly unused in 1.9, since whether to display the rich-text editor is a user preference. The default value is 0 and it doesn't get touched during the upgrade. I have a partial patch for the upgrade scenario: https://github.com/mackensen/moodle/compare/MOODLE_22_STABLE...MDL-32712-22.

              Show
              cfulton Charles Fulton added a comment - I've started poking at a patch. I think the root problem is that the format field is mostly unused in 1.9, since whether to display the rich-text editor is a user preference. The default value is 0 and it doesn't get touched during the upgrade. I have a partial patch for the upgrade scenario: https://github.com/mackensen/moodle/compare/MOODLE_22_STABLE...MDL-32712-22 .
              Hide
              deanthayer Dean Thayer added a comment -

              I thought I would mention for anyone who has already upgraded all their 2.2 assignments to 2.3 mod_assign assignments without the benefit of Charles' patch that you can correct the situation in bulk by running this SQL on your database:

              update mdl_assign set introformat = 1 where introformat = 0;

              Show
              deanthayer Dean Thayer added a comment - I thought I would mention for anyone who has already upgraded all their 2.2 assignments to 2.3 mod_assign assignments without the benefit of Charles' patch that you can correct the situation in bulk by running this SQL on your database: update mdl_assign set introformat = 1 where introformat = 0;
              Hide
              cfulton Charles Fulton added a comment -

              I'm going to submit the partial patch for review, since the upgrade issue only affects 2.2 and earlier but the backup/restore part also needs to be addressed in 2.3 and 2.4.

              Show
              cfulton Charles Fulton added a comment - I'm going to submit the partial patch for review, since the upgrade issue only affects 2.2 and earlier but the backup/restore part also needs to be addressed in 2.3 and 2.4.
              cfulton Charles Fulton made changes -
              Pull 2.2 Diff URL https://github.com/mackensen/moodle/compare/MOODLE_22_STABLE...MDL-32712-22
              Pull 2.2 Branch MDL-32712-22
              Pull from Repository https://github.com/mackensen/moodle
              Labels triaged patch triaged
              Assignee David Mudrak [ mudrd8mz ] Charles Fulton [ cfulton ]
              Affects Version/s 2.2.5 [ 12352 ]
              cfulton Charles Fulton made changes -
              Status Open [ 1 ] Waiting for peer review [ 10012 ]
              Hide
              salvetore Michael de Raadt added a comment -

              David: Could you please peer review this?

              Show
              salvetore Michael de Raadt added a comment - David: Could you please peer review this?
              salvetore Michael de Raadt made changes -
              Peer reviewer mudrd8mz
              Hide
              pjfish06 Susan Mangan added a comment -

              you guys rock, thanks for fixing this!

              Show
              pjfish06 Susan Mangan added a comment - you guys rock, thanks for fixing this!
              Hide
              mudrd8mz David Mudrák added a comment -

              This is tightly related to MDL-34586

              Show
              mudrd8mz David Mudrák added a comment - This is tightly related to MDL-34586
              mudrd8mz David Mudrák made changes -
              Link This issue has a non-specific relationship to MDL-34586 [ MDL-34586 ]
              Hide
              mudrd8mz David Mudrák added a comment -

              Again, as in MDL-34586, why not to follow the way other modules went? See for example the upgrade step 2009042003 in mod/forum/db/upgrade.php. We can't just set the format field without making sure that the text is converted into real HTML, too. And also, that forum code shows how to consider cases when HTML editor has been disabled site-wide.

              Show
              mudrd8mz David Mudrák added a comment - Again, as in MDL-34586 , why not to follow the way other modules went? See for example the upgrade step 2009042003 in mod/forum/db/upgrade.php. We can't just set the format field without making sure that the text is converted into real HTML, too. And also, that forum code shows how to consider cases when HTML editor has been disabled site-wide.
              Hide
              cfulton Charles Fulton added a comment -

              Rewritten per MDL-34586.

              Show
              cfulton Charles Fulton added a comment - Rewritten per MDL-34586 .
              Hide
              mudrd8mz David Mudrák added a comment -

              Yup, looking good now. Thanks for the patch Charles!

              Show
              mudrd8mz David Mudrák added a comment - Yup, looking good now. Thanks for the patch Charles!
              Hide
              cfulton Charles Fulton added a comment -

              Note: fixed typo on line 159; wrong variable name.

              Show
              cfulton Charles Fulton added a comment - Note: fixed typo on line 159; wrong variable name.
              Hide
              poltawski Dan Poltawski added a comment -

              Does this need sending to integration?

              Show
              poltawski Dan Poltawski added a comment - Does this need sending to integration?
              Hide
              cfulton Charles Fulton added a comment -

              @Dan: yep.

              Show
              cfulton Charles Fulton added a comment - @Dan: yep.
              Hide
              poltawski Dan Poltawski added a comment -

              Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..

              Show
              poltawski Dan Poltawski added a comment - Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..
              poltawski Dan Poltawski made changes -
              Status Waiting for peer review [ 10012 ] Waiting for integration review [ 10010 ]
              stronk7 Eloy Lafuente (stronk7) made changes -
              Currently in integration Yes [ 10041 ]
              poltawski Dan Poltawski made changes -
              Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
              Integrator poltawski
              Hide
              poltawski Dan Poltawski added a comment -

              Thanks Charles, integrated to 22 only.

              Show
              poltawski Dan Poltawski added a comment - Thanks Charles, integrated to 22 only.
              poltawski Dan Poltawski made changes -
              Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
              Fix Version/s 2.2.6 [ 12372 ]
              Fix Version/s STABLE backlog [ 10463 ]
              dmonllao David Monllaó made changes -
              Tester rajeshtaneja
              rajeshtaneja Rajesh Taneja made changes -
              Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Sorry Guys,

              I am still seeing moodle auto-format in activity description, after restoring course.

              Steps:

              1. Created a course in 19 with text activity and editor was tinymce
              2. Backed up 19 course and restored in integration 22
              3. Went to activity and click edit settings
              4. Description is moodle auto-format.
              Show
              rajeshtaneja Rajesh Taneja added a comment - Sorry Guys, I am still seeing moodle auto-format in activity description, after restoring course. Steps: Created a course in 19 with text activity and editor was tinymce Backed up 19 course and restored in integration 22 Went to activity and click edit settings Description is moodle auto-format.
              rajeshtaneja Rajesh Taneja made changes -
              Status Testing in progress [ 10011 ] Problem during testing [ 10007 ]
              Hide
              cfulton Charles Fulton added a comment -

              @Rajesh, I think I confused the issue along the way but this patch only covers the 1.9-2.2 upgrade scenario (which the testing instructions don't cover). The backup/restore scenario is in MDL-34586, which I think was reviewed and needs to be integrated. I think they're split up because this one is 2.2 only and the other should be in master and below.

              Show
              cfulton Charles Fulton added a comment - @Rajesh, I think I confused the issue along the way but this patch only covers the 1.9-2.2 upgrade scenario (which the testing instructions don't cover). The backup/restore scenario is in MDL-34586 , which I think was reviewed and needs to be integrated. I think they're split up because this one is 2.2 only and the other should be in master and below.
              Hide
              rajeshtaneja Rajesh Taneja added a comment - - edited

              Sorry Charles,

              I didn't look at related issue. Followed test instructions and it didn't work as mentioned.

              Will request Dan to reopen this for testing. I will just update site from 1.9 -> 2.2 and check if I can see TinyMCE.

              Show
              rajeshtaneja Rajesh Taneja added a comment - - edited Sorry Charles, I didn't look at related issue. Followed test instructions and it didn't work as mentioned. Will request Dan to reopen this for testing. I will just update site from 1.9 -> 2.2 and check if I can see TinyMCE.
              poltawski Dan Poltawski made changes -
              Status Problem during testing [ 10007 ] Waiting for testing [ 10005 ]
              rajeshtaneja Rajesh Taneja made changes -
              Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Thanks Charles,

              Patch works great for upgrade from 1.9 -> 2.2.
              Can see TinyMCE in Assignment description.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Thanks Charles, Patch works great for upgrade from 1.9 -> 2.2. Can see TinyMCE in Assignment description.
              rajeshtaneja Rajesh Taneja made changes -
              Status Testing in progress [ 10011 ] Tested [ 10006 ]
              Hide
              poltawski Dan Poltawski added a comment -

              Hurray!

              You did it, congratulations! You have on Mojito credit to redeem after the release of Moodle 2.4

              Show
              poltawski Dan Poltawski added a comment - Hurray! You did it, congratulations! You have on Mojito credit to redeem after the release of Moodle 2.4
              poltawski Dan Poltawski made changes -
              Status Tested [ 10006 ] Closed [ 6 ]
              Resolution Fixed [ 1 ]
              Currently in integration Yes [ 10041 ]
              Integration date 01/Nov/12

                People

                • Votes:
                  12 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Nov/12