mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #17130
[Bug 1281787] Re: Artefacts not locked in in submitted view
Did you figure out what caused these to not get locked? As I just
commented on the bug, I'd prefer not to push a data fix for this
condition until we know for sure that it's not going to happen again;
and the only way to know that, is to know what bug caused this and that
we've fixed that bug.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1281787
Title:
Artefacts not locked in in submitted view
Status in Mahara ePortfolio:
In Progress
Bug description:
This looks to be problem with data on older sites. I've marked as high
as bad data should be sorted asap
Looking in the database there are views submitted for review but
artefacts used in the view are not locked.
To find the rows:
SELECT a.id
FROM view_artefact va
LEFT JOIN view v on v.id = va.view
LEFT JOIN artefact a on a.id = va.artefact
WHERE v.submittedgroup IS NOT NULL AND a.locked = 0
And to fix them:
UPDATE artefact SET locked = 1
FROM (SELECT a.id
FROM view_artefact va
LEFT JOIN view v on v.id = va.view
LEFT JOIN artefact a on a.id = va.artefact
WHERE v.submittedgroup IS NOT NULL AND a.locked = 0) AS subquery
WHERE artefact.id = subquery.id;
More investigation into how the databases ended up with bad data is
needed and then a db upgrade change will need to be added to
/lib/db/upgrade.php if needed.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1281787/+subscriptions
References