Commit 1b416737 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1826798: Improve collection error message when changing its SmartEvidence framework"

parents 340687dd 7a8d7211
......@@ -135,7 +135,8 @@ function collectionedit_validate(Pieform $form, $values) {
$views = get_records_sql_array("SELECT v.id, v.title FROM {view} v
JOIN {collection_view} cv ON cv.view = v.id
JOIN {framework_evidence} fe ON fe.view = cv.view
WHERE cv.collection = ?", array($values['id']));
WHERE cv.collection = ?
GROUP BY v.id, v.title", array($values['id']));
if (!empty($views)) {
$errorstr = get_string('changeframeworkproblems', 'module.framework');
foreach ($views as $view) {
......
......@@ -27,7 +27,7 @@ $string['matrixfilenotfound'] = 'No valid .matrix file selected.';
$string['invalidjson'] = 'This is not a valid .matrix file: Unable to parse the JSON content.';
$string['jsonmissingvars'] = 'This is not a valid .matrix file: Missing "framework" and / or "framework name".';
$string['manuallyremovematrices'] = 'Unable to remove install directory "%s". Please remove it manually.';
$string['changeframeworkproblems'] = 'You cannot change the framework. The following pages have evidence connected to this framework:';
$string['changeframeworkproblems'] = 'You cannot change the framework. The following pages have evidence connected to the previous framework:';
$string['accessdeniednoframework'] = 'This collection cannot show the SmartEvidence page. This can be due to any of the following reasons:
<ul><li>The SmartEvidence plugin is not installed / active.</li>
<li>The institution you belong to disallowed SmartEvidence.</li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment