danmarsden / moodle-mod_dialogue

Dialogue Module for Moodle
27 stars 35 forks source link

When creating a copy of a course, the Dialogue activity incorrectly 'keeps' conversations with it #110

Closed davefoord closed 1 year ago

davefoord commented 1 year ago

Dialogue version 3.11.1 Moodle version 3.11.7

I have a course that contains a dialogue activity that has been used. In order to create 'next years course' I back up the course, but don't include users - and then restore this course giving me a new version of the course with no users, and therefore all assignments and quizzes have no attempts etc.

However - the Dialogue activity appears to behave in a different way, in that the conversations that were started in the original course are transferred into the new course, and from the teachers perspective, when they post into the conversation in the first course in the future - a 'copy' of any such post also appears in the new course, even through the student that the teacher is communicating with is not on the new course.

Looking at the URLS of the 2 conversations, they both have the same conversation ID in the URL, and only the id= in the middle of the URL has changed.

/mod/dialogue/conversation.php?id=7767&action=view&conversationid=1469

/mod/dialogue/conversation.php?id=8712&action=view&conversationid=1469

I assume that this is a bug rather than a design feature. Is this something that could be look at (e.g. when backing up and restoring a course, if no users is selected to not copy the existing conversations over).

danmarsden commented 1 year ago

I think this is probably a duplicate of #91 which is fixed in the 4.0 branch - feel free to test the fix included there and see if it works on your 3.11 branch.

danmarsden commented 1 year ago

Hi @davefoord I've just pushed that patch into the MOODLE_311_STABLE branch and bumped the version to 3.11.3 - can you try updating your plugin to that version to see if it fixes it for you?

davefoord commented 1 year ago

@danmarsden just to let you know that applying version 3.11.3 to the site, has fixed the issue, so huge thanks for fixing this bug so quickly.

Would it be possible to push this version to the Moodle plugins page as well?

danmarsden commented 1 year ago

thanks for confirming that - I've updated the moodle.org plugins db with this release.