← Back to team overview

mahara-contributors team mailing list archive

[Bug 1281787] A change has been merged

 

Reviewed:  https://reviews.mahara.org/3033
Committed: http://gitorious.org/mahara/mahara/commit/30891a616ebc51a8283db2fb41052ba30509c6b5
Submitter: Aaron Wells (aaronw@xxxxxxxxxxxxxxx)
Branch:    master

commit 30891a616ebc51a8283db2fb41052ba30509c6b5
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date:   Mon Feb 24 10:43:10 2014 +1300

Making sure artefacts are locked for submitted views (Bug #1281787)

This can be a problem for older sites.

Should update any that are not locked but should be and do nothing if
all is fine.

Change-Id: Ie5fd71ab76b24009450987681a4800ccc3a8f496
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>

-- 
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:
  Fix Committed

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