-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sharing Cart no longer working with our Course Format #214
Comments
We are having the same issue, in our case we traced it to the Collapsible Topics format, if a course has this format then the sharing cart does not work properly. If we change it to the Topics format it behaves as expected. |
Interesting. But I think I understand why this happens, and it would be nice if we get the sharing cart working in all course formats. |
Thanks for reporting this issue, Richard, and thanks effgarces for finding the possible cause. May I confirm, Richard, that this problem only happens when you use the Collapsible Topics format or your own format? Did you try switching to Topics format? What happened? I can assign moxis team to look into the problem, but our custom has been to build the Sharing Cart for standard themes and course formats (there are so many in Moodle, we cannot make it universally compatible to all formats). Is Collapsible Topics a standard format? If it is custom/non-standard, do you have a programmer friend who could fix it and contribute a pull-request? |
Hi @donhinkelman ! Can you tell me a little bit on how you add the extra sharing cart stuff to the course format? Right now, for us, everything works except the placeholder where you would like to copy something to. So sharing cart works, sharing cart block works, we can copy stuff into the sharing cart - but we can't get in out of the sharing cart onto the course page. I'd be happy to share our course format with you if you would like to take a look in your test environment. |
The course format Collapsible Topics is a plugin available at https://moodle.org/plugins/format_collapsibletopics (yes we are aware that is deprecated, but it's working well so far and we will probably maintain it for some time if it is required). |
Hi @Richardvi and @effgarces, Which version of the sharing cart do you use? It may already be fixed in the latest version of sharing cart |
Ah, now I see. On Github there's a newer version that hasn't been pushed to the Moodle plugin database yet. Let me try that one :) |
@Richardvi Be aware that we've totally refactored the plugin in the new version, so the backups you've made before upgrading will be marked as legacy and will not support all the new sharing cart features. You will still be able to backup/restore them one at a time though |
Thanks! I was going to test this in production, living on the edge - but you convinced me otherwise. I will go to our test server first haha |
I will bug hunt a little. It seems I get that error as soon as the Sharing Cart block is added to a course. |
@Richardvi Have you run the DB upgrade on your site? - Those tables should have been deleted and a new one should have been created |
I just downloaded all files from github as a .zip, then uploaded that zip as a plugin. Moodle started installing the new plugin. Was that wrong? For those wondering, this is the SQL I made from the db/install.xml CREATE TABLE block_sharing_cart_items ( |
Yeah no, that's not working... I will need to completely uninstall the sharing cart module and start again |
I found the issue. The upgrade script wasn't run because @donhinkelman & I have both made changes to the repository. We've somehow timed it perfectly to break the upgrade script. I'll fix it asap |
@Richardvi I've just updated git, now the upgrade script should work properly upgrading from version |
Did you increase the version number a bit? That helps :) |
@Richardvi If it still doesn't work it may be because your custom course format strays to far away from moodle's default course format structure. We've tested it on all Moodle Core course formats and a couple of third party ones as well although we don't officially support them. All of the ones we tested worked as expected. If you run the following in your browser console what output do you get? - These are the selectors we use to find all places to implement a restore in section button. document.querySelector('.course-content');
document.querySelectorAll('.course-content [data-for="cmlist"]'); If you get no results from the above code, you could adapt your course format to match the selectors :) |
Hi Sharing Cart team, |
Hi @carlicockrell, Do you have the following admin setting enabled? - If enabled, this setting breaks the sharing cart restores since it doesn't factor in that you can take backups of sections. See: https://tracker.moodle.org/browse/MDL-82750 Backup/restore in the sharing cart works fine for me on 4.4 after disabling this |
@frederikmillingpytlick I can confirm this is not something we do not have on. The issue is that using Custom Sections (new Topics), when you copy an item, it never moves from "Copying this shared item" and you also cannot place it anywhere. However, if you switch to a different course format, you can place the copied item accordingly. I'm happy to start a new issue, but thought the issues all sounded similar in nature, and wondered if the course formats do factor in. |
@carlicockrell I'd need some more information to debug this. I can't reproduce it on a clean Moodle 4.4 site |
@carlicockrell I can confirm that course formats are frequent cause of bugs, particularly custom course formats. Note that section copy is a feature of the Sharing Cart that is a few years old. Sharing Cart versions go back almost twenty years. We thank Frederik and all the great staff at Moxis for handling these important but tedious bugs as Moodle course formats evolve. |
@frederikmillingpytlick @donhinkelman I will double check this on a clean 4.4 site and report back in a new issue as I isolate this more. I'm also asking my other team members if anyone else is using this successfully in 4.4 or 4.5 using Custom Sections (formerly Topics). |
Hi @donhinkelman (and others?),
Our teachers really like to use the Sharing Cart, however after our last update to Moodle 4.4 the Sharing Cart is no longer working for us. We can add content to the cart, but we can't put it back into the course.
For us it's a bit a unique situation as we are using our own course format. I would really like to share our course format with you, perhaps you can see why it's no longer working. And perhaps if you understand why it's not working for us, you can make the sharing cart plugin even better (because I could understand that more custom course formats could have the same problem).
Can I come into contact with you, send our custom course format, and you could perhaps see why the sharing cart is not working? This might be a lot I'm asking, I know, so please feel free to react accordingly.
As a Dutch person, we are not shy of direct responses :)
The text was updated successfully, but these errors were encountered: