mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #68284
[Bug 1969693] Re: Error appears when deleting Institution collections that have been auto-copied to members accounts
Hi Joost,
This is not actively worked on as it is most likely not going to happen
too frequently. Happy to bump up the priority if your institution wants
to pay for the fix. :-)
Cheers
Kristina
** No longer affects: mahara/22.10
** Changed in: mahara
Milestone: 23.04.0 => 23.10.0
** Changed in: mahara
Milestone: 23.10.0 => None
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1969693
Title:
Error appears when deleting Institution collections that have been
auto-copied to members accounts
Status in Mahara:
Confirmed
Bug description:
This happens in both MySQL and Postgres
To replicate:
1. Create an institution template collection (set to 'Current auto-copied template') with portfolio completion.
2. Create a new account and run the cron so that the portfolio is created in the new member's account.
3. As admin, try to delete the institution template collection.
Result
- SQL error messages on screen. There is a foreign key constraint with collection_template.originaltemplate = collection.id, so it won't allow you to delete from collection table until collection_template table entries are cleared.
Expected:
- Perhaps there should be a warning to institution admins that the collection has been auto-copied before deleting it.
- I think we need to delete from the collection_template table where
originaltemplate = $this->id, rather than where collection = $this->id
(htdocs/lib/collection.php:324). Then we'll be able to delete from
collection table.
Kristina mentioned that a Behat test for this would be good, since we
don't regularly come across this scenario.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1969693/+subscriptions
References