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

can't duplicate Frequently Used Comments in Marking Guide

    Details

    • Testing Instructions:
      Hide

      Test 1
      Before the patch is applied:
      Create a marking guide with some frequently used comments and generate a backup of the course.

      Apply the patch.
      Restore the course backup into a new course and check to make sure that the marking guide is restored with frequently used comments.

      Test 2 (after patch applied)
      Create a backup of a course that has a marking guide with frequently used comments.
      Restore the backup into a new course and make sure the marking guide restores the frequently used comments.

      Show
      Test 1 Before the patch is applied: Create a marking guide with some frequently used comments and generate a backup of the course. Apply the patch. Restore the course backup into a new course and check to make sure that the marking guide is restored with frequently used comments. Test 2 (after patch applied) Create a backup of a course that has a marking guide with frequently used comments. Restore the backup into a new course and make sure the marking guide restores the frequently used comments.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      master_MDL-37714

      Description

      Hello,

      I am using moodle 2.3 and am new to the "marking guide" feature in the assignment activity. Would anyone know a way to duplicate or copy over the list of "frequently used comments" from one marking guide to another?

      I created a marking guide, added 3 frequently used comments,but when I clicked the DUPLICATE button on the course page for a new marking guide, I noticed that the "marking guide" copied over but the frequently used comments list did not. I expected the frequently used comments to copy over when I clicked the duplicate button.

      I also experienced the same issue when, I created a marking guide with comments and clicked on "CREATE NEW GRADING FORM FROM A TEMPLATE", but also saw that the marking guide copied over but the frequently used comments list did not.

      Has anyone else experienced this? Many thanks on any ideas going forward!

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            tsala Helen Foster added a comment -

            Tania, thanks for creating this issue. I've voted for it!

            Just adding a link to your forum discussion https://moodle.org/mod/forum/discuss.php?d=219212 in case anyone else posts further comments there.

            Show
            tsala Helen Foster added a comment - Tania, thanks for creating this issue. I've voted for it! Just adding a link to your forum discussion https://moodle.org/mod/forum/discuss.php?d=219212 in case anyone else posts further comments there.
            Hide
            damyon Damyon Wiese added a comment -

            I would like to see frequently used comments moved to a core feature so it can be used everywhere (gradebook, modules, marking guide, rubric).

            Show
            damyon Damyon Wiese added a comment - I would like to see frequently used comments moved to a core feature so it can be used everywhere (gradebook, modules, marking guide, rubric).
            Hide
            damyon Damyon Wiese added a comment -

            Thanks for reporting this.

            Adding more detail to your suggestion will make it easier to work on.

            If you can propose a code solution, that will help others who may have the same need and will increase the chance of this improvement/feature coming about sooner. If you are able to provide a patch or links to your Git repository branch, please add a patch label so we will spot it.

            Show
            damyon Damyon Wiese added a comment - Thanks for reporting this. Adding more detail to your suggestion will make it easier to work on. If you can propose a code solution, that will help others who may have the same need and will increase the chance of this improvement/feature coming about sooner. If you are able to provide a patch or links to your Git repository branch, please add a patch label so we will spot it.
            Hide
            wihakss stephen wihak added a comment -

            I'm not a coder, but I do want to expedite feedback to our students, so it would be awesome if this feature could be included.

            Show
            wihakss stephen wihak added a comment - I'm not a coder, but I do want to expedite feedback to our students, so it would be awesome if this feature could be included.
            Hide
            zonalp Zey Onalp added a comment -

            We are seeing the same issue when we backup and restore a course with Advanced Grading and the Frequently Used Comments field enabled. After the restore the field and contents disappear. Backup and restore is performed with default settings. Here are the steps:
            1. Create assignment which uses the Marking Guide grading method
            2. Create the Marking Guide, making sure there are comments in the "Frequently used comments" field
            3. Backup the course
            4. Restore the course with or without users
            5. Review the restored assignment's marking guide. All previously entered fields are present except "Frequently used comments".

            Show
            zonalp Zey Onalp added a comment - We are seeing the same issue when we backup and restore a course with Advanced Grading and the Frequently Used Comments field enabled. After the restore the field and contents disappear. Backup and restore is performed with default settings. Here are the steps: 1. Create assignment which uses the Marking Guide grading method 2. Create the Marking Guide, making sure there are comments in the "Frequently used comments" field 3. Backup the course 4. Restore the course with or without users 5. Review the restored assignment's marking guide. All previously entered fields are present except "Frequently used comments".
            Hide
            tsala Helen Foster added a comment -

            Stephen and Zey, thanks for your comments. The best thing you can do if you're not a coder is vote for the issue (which I can see you have both done - thanks!) and make some noise by posting in the discussion https://moodle.org/mod/forum/discuss.php?d=219212 as this increases the chance of a coder noticing and thinking 'Hey, I can make people happy by fixing this issue!' Alternatively, you could start a new discussion if you agree with Damyon about it being good if frequently used comments could be used in other places too.

            Show
            tsala Helen Foster added a comment - Stephen and Zey, thanks for your comments. The best thing you can do if you're not a coder is vote for the issue (which I can see you have both done - thanks!) and make some noise by posting in the discussion https://moodle.org/mod/forum/discuss.php?d=219212 as this increases the chance of a coder noticing and thinking 'Hey, I can make people happy by fixing this issue!' Alternatively, you could start a new discussion if you agree with Damyon about it being good if frequently used comments could be used in other places too.
            Hide
            sfielder Susan Fielder added a comment - - edited

            Our instructors were very excited about the addition of the marking guide and equally dismayed when they imported/restored courses and the frequently used comments vanished. This issue limits the usefulness of the marking guide because, without the comments transferring too, it's just about as easy to start from scratch each term. I have instructors who have reverted to their old technique of typing frequently used comments in Microsoft Word and copy/pasting into Moodle. This has proven very frustrating and has given Moodle a black eye as far as many of our instructors are concerned.

            Show
            sfielder Susan Fielder added a comment - - edited Our instructors were very excited about the addition of the marking guide and equally dismayed when they imported/restored courses and the frequently used comments vanished. This issue limits the usefulness of the marking guide because, without the comments transferring too, it's just about as easy to start from scratch each term. I have instructors who have reverted to their old technique of typing frequently used comments in Microsoft Word and copy/pasting into Moodle. This has proven very frustrating and has given Moodle a black eye as far as many of our instructors are concerned.
            Hide
            damyon Damyon Wiese added a comment -

            This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

            For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

            Show
            damyon Damyon Wiese added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment
            Hide
            justinlitalien Justin Litalien added a comment -

            Our university has just started to utilize the marking guides and we are discouraged to see the feedback has not been included during an Import, Duplicate, or Backup/Restore. Any chance of this being addressed soon?

            Show
            justinlitalien Justin Litalien added a comment - Our university has just started to utilize the marking guides and we are discouraged to see the feedback has not been included during an Import, Duplicate, or Backup/Restore. Any chance of this being addressed soon?
            Hide
            gregor89 Greg Faller added a comment -

            Hi,

            I believe that the path set for comments within the grading.xml backup file is incorrect. It is currently set to:

            $paths[] = new restore_path_element('gradingform_guide_comment',
                        $this->get_pathfor('/guidecomments/guidecomment'));

            but should be:

            $paths[] = new restore_path_element('gradingform_guide_comment',
                        $this->get_pathfor('/guidecriteria/guidecomments/guidecomment'));

            This, or comments shouldn't be as deeply nested.

            Greg

            Show
            gregor89 Greg Faller added a comment - Hi, I believe that the path set for comments within the grading.xml backup file is incorrect. It is currently set to : $paths[] = new restore_path_element('gradingform_guide_comment', $this->get_pathfor('/guidecomments/guidecomment')); but should be: $paths[] = new restore_path_element('gradingform_guide_comment', $this->get_pathfor('/guidecriteria/guidecomments/guidecomment')); This, or comments shouldn't be as deeply nested. Greg
            Hide
            tsala Helen Foster added a comment -

            Greg, thanks for your comment and patch.

            I'm just adding the patch label and hoping it can be reviewed soon.

            Show
            tsala Helen Foster added a comment - Greg, thanks for your comment and patch. I'm just adding the patch label and hoping it can be reviewed soon.
            Hide
            danmarsden Dan Marsden added a comment -

            Thanks Greg - great spotting. They shouldn't be nested like that - the correct fix would be in backup_gradingform_guide_plugin.class.php

            My guess - this:

            $criteria->add_child($comments);

            should be replaced with this:

            $pluginwrapper->add_child($comments);

            But that will only allow new backups to function correctly (which is a good start) - it might be worth adding some code to the restore process to check for the old badly stored data to allow it to be restored correctly as well. (Unfortunately I don't have time to look at this right now myself)

            Show
            danmarsden Dan Marsden added a comment - Thanks Greg - great spotting. They shouldn't be nested like that - the correct fix would be in backup_gradingform_guide_plugin.class.php My guess - this: $criteria->add_child($comments); should be replaced with this: $pluginwrapper->add_child($comments); But that will only allow new backups to function correctly (which is a good start) - it might be worth adding some code to the restore process to check for the old badly stored data to allow it to be restored correctly as well. (Unfortunately I don't have time to look at this right now myself)
            Hide
            gregor89 Greg Faller added a comment -

            Hi Dan,

            Thanks for your ideas. I've created a new patch that correctly nests the comments and provides a legacy function to handle any backup files with incorrectly nested comments. This was the easiest (actually the only way) I could figure out to manage both format of comments.

            Also attached are two backup files with frequent used comments in both the existing and proposed formats for testing.

            Regards,
            Greg

            Show
            gregor89 Greg Faller added a comment - Hi Dan, Thanks for your ideas. I've created a new patch that correctly nests the comments and provides a legacy function to handle any backup files with incorrectly nested comments. This was the easiest (actually the only way) I could figure out to manage both format of comments. Also attached are two backup files with frequent used comments in both the existing and proposed formats for testing. Regards, Greg
            Hide
            danmarsden Dan Marsden added a comment -

            Thanks Greg - any chance you could add that to a public git repo somewhere? - that way we can submit it for peer-review/integration a bit easier.

            to see an example of this - take a look at MDL-43541 - you may not be able to add those fields to a tracker issue but if you have it in a public git repo and post the address in a comment I can set it up.

            Show
            danmarsden Dan Marsden added a comment - Thanks Greg - any chance you could add that to a public git repo somewhere? - that way we can submit it for peer-review/integration a bit easier. to see an example of this - take a look at MDL-43541 - you may not be able to add those fields to a tracker issue but if you have it in a public git repo and post the address in a comment I can set it up.
            Hide
            gregor89 Greg Faller added a comment -

            Hi Dan,

            I've given it a shot - hopefully all is correct. I don't have the access to update the tracker fields:

            master: https://github.com/greg-or/moodle/compare/moodle:master...master_MDL-37714
            MOODLE_25_STABLE: https://github.com/greg-or/moodle/compare/moodle:MOODLE_25_STABLE...m25_MDL-37714
            MOODLE_26_STABLE: https://github.com/greg-or/moodle/compare/moodle:MOODLE_26_STABLE...m26_MDL-37714

            Regards,
            Greg

            Show
            gregor89 Greg Faller added a comment - Hi Dan, I've given it a shot - hopefully all is correct. I don't have the access to update the tracker fields: master: https://github.com/greg-or/moodle/compare/moodle:master...master_MDL-37714 MOODLE_25_STABLE: https://github.com/greg-or/moodle/compare/moodle:MOODLE_25_STABLE...m25_MDL-37714 MOODLE_26_STABLE: https://github.com/greg-or/moodle/compare/moodle:MOODLE_26_STABLE...m26_MDL-37714 Regards, Greg
            Hide
            danmarsden Dan Marsden added a comment -

            nice!

            Show
            danmarsden Dan Marsden added a comment - nice!
            Hide
            danmarsden Dan Marsden added a comment -

            Great work! - bouncing up for peer review. This will also trigger the automated tests (there are a couple of lines with extra spaces in your code that the tests should show up)

            Show
            danmarsden Dan Marsden added a comment - Great work! - bouncing up for peer review. This will also trigger the automated tests (there are a couple of lines with extra spaces in your code that the tests should show up)
            Hide
            cibot CiBoT added a comment -

            Results for MDL-37714

            • Remote repository: git://github.com/greg-or/moodle.git
            Show
            cibot CiBoT added a comment - Results for MDL-37714 Remote repository: git://github.com/greg-or/moodle.git Remote branch m25_ MDL-37714 to be integrated into upstream MOODLE_25_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/927 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/927/artifact/work/smurf.html Remote branch m26_ MDL-37714 to be integrated into upstream MOODLE_26_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/928 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/928/artifact/work/smurf.html Remote branch master_ MDL-37714 to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/929 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/929/artifact/work/smurf.html
            Hide
            danmarsden Dan Marsden added a comment -

            Hi Greg - if you take a look at the links from CiBoT you will see a couple of errors about 2 lines that have extra whitespace - if you could delete the spaces and update your repo that would be great! - usually we try to rebase into a single commit on a small change like this too (if possible)

            Show
            danmarsden Dan Marsden added a comment - Hi Greg - if you take a look at the links from CiBoT you will see a couple of errors about 2 lines that have extra whitespace - if you could delete the spaces and update your repo that would be great! - usually we try to rebase into a single commit on a small change like this too (if possible)
            Hide
            gregor89 Greg Faller added a comment -

            Hi Dan - I deleted the three branches, started again and have updated my repo. Hopefully that is ok.
            Thanks,
            Greg

            Show
            gregor89 Greg Faller added a comment - Hi Dan - I deleted the three branches, started again and have updated my repo. Hopefully that is ok. Thanks, Greg
            Hide
            danmarsden Dan Marsden added a comment -

            great - makes sense to me, pushing up for integration!

            Show
            danmarsden Dan Marsden added a comment - great - makes sense to me, pushing up for integration!
            Hide
            cibot CiBoT added a comment -

            Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!

            Show
            cibot CiBoT added a comment - Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated (25, 26 and master), thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (25, 26 and master), thanks!
            Hide
            tsala Helen Foster added a comment -

            Many thanks Greg and Dan, it's great that this improvement is going into 2.5.5 and 2.6.2.

            Show
            tsala Helen Foster added a comment - Many thanks Greg and Dan, it's great that this improvement is going into 2.5.5 and 2.6.2.
            Hide
            rwijaya Rossiani Wijaya added a comment -

            This is working as expected.

            Tested for 2.5, 2.6 and master.

            Test passed.

            Show
            rwijaya Rossiani Wijaya added a comment - This is working as expected. Tested for 2.5, 2.6 and master. Test passed.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            This weeks weekly release is now available and includes your code.
            A big pat on the back to you again for once more being a cog in the Moodle machine.

            Best wishes, the Moodle integration team.

            Show
            samhemelryk Sam Hemelryk added a comment - This weeks weekly release is now available and includes your code. A big pat on the back to you again for once more being a cog in the Moodle machine. Best wishes, the Moodle integration team.
            Hide
            marycooch Mary Cooch added a comment -

            Removing docs_required label as I added a note in 2.5 and 2.6 docs http://docs.moodle.org/en/Marking_guide

            Show
            marycooch Mary Cooch added a comment - Removing docs_required label as I added a note in 2.5 and 2.6 docs http://docs.moodle.org/en/Marking_guide

              People

              • Votes:
                26 Vote for this issue
                Watchers:
                18 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Mar/14