Commit 3df06deb authored by Robert Lyon's avatar Robert Lyon

Bug 1621247: Allow for a more flat .matrix file

behatnotneeded

Change-Id: Iae37718b837258cf3221987d994d306bd3dc6335
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 61dc63e5)
parent 7711face
......@@ -87,6 +87,20 @@ class PluginModuleFramework extends PluginModule {
}
else {
$ok['content'] = $content;
if (isset($content->framework->standardelements)) {
// new style .matrix file so we need to alter the array to fit what we want
foreach ($content->framework->standards as $key => $standard) {
foreach ($content->framework->standardelements as $k => $element) {
if ($standard->standardid === $element->standardid) {
if (!isset($content->framework->standards[$key]->standardelement)) {
$content->framework->standards[$key]->standardelement = array();
}
$content->framework->standards[$key]->standardelement[] = $element;
}
}
}
unset($content->framework->standardelements);
}
}
}
}
......
......@@ -428,6 +428,7 @@ class BehatGeneral extends BehatBase {
/**
* Click a matrix point by being given a column,row pair
* NOTE: column and row start from number '0' so the first cell in a table is (0,0)
*
* @When I click on the matrix point :matrix_point
* @param string $matrix_point a column,row value
......
......@@ -75,10 +75,9 @@ Scenario: Installing framework module and activating for an institution
Then I should not see "PageF"
# Click on a matrix point to add an annotation
And I click on the matrix point "3,5"
And I click on the matrix point "3,4"
And I wait "1" seconds
And I set the following fields to these values:
| Annotation | My two cents |
And I fill in "My two cents" in editor "Annotation"
And I press "Save"
And I go to portfolio page "PageB"
Then I should see "Annotation"
......@@ -89,18 +88,16 @@ Scenario: Installing framework module and activating for an institution
And I wait "1" seconds
And I follow "Annotation"
And I press "Add"
And I set the following fields to these values:
| Annotation | My three cents |
And I set the select2 value "one point one" for "instconf_smartevidence"
And I fill in "My three cents" in editor "Annotation"
And I set the select2 value "1.1 - Sub level of the standard" for "instconf_smartevidence"
And I press "Save"
# Re-click a matrix point to add some feedback
And I choose "Collections" in "Portfolio"
And I follow "CollA"
And I click on the matrix point "3,5"
And I click on the matrix point "3,4"
And I wait "1" seconds
And I set the following fields to these values:
| Feedback | This is annotation feedback |
And I fill in "This is annotation feedback" in editor "Feedback"
And I press "Place feedback"
# And change assessment status
And I should not see the field "Assessment"
......@@ -111,7 +108,7 @@ Scenario: Installing framework module and activating for an institution
Given I log in as "userA" with password "Kupuhipa1"
And I wait "1" seconds
And I follow "CollA"
And I click on the matrix point "3,5"
And I click on the matrix point "3,4"
And I wait "1" seconds
And I select "Partially meets the standard" from "Assessment"
And I press "Save"
......
......@@ -97,7 +97,6 @@
"name":"1.4 - Sub level of the standard",
"description":"Description of the standard. This description appears when you hover over the standard on the SmartEvidence page and is also displayed when selecting the standard in the Annotations block.",
"standardid":1,
"standardid":1,
"elementid": "1.4"
},
{
......@@ -214,7 +213,6 @@
"name":"4.2 - Sub level of the standard",
"description":"Description of the standard. This description appears when you hover over the standard on the SmartEvidence page and is also displayed when selecting the standard in the Annotations block.",
"standardid":4,
"standardid":4,
"elementid": "4.2"
},
{
......@@ -235,6 +233,7 @@
"shortname":"4.4.1",
"name":"4.4.1 - Yet another sub level of the standard",
"description":"Description of the standard. This description appears when you hover over the standard on the SmartEvidence page and is also displayed when selecting the standard in the Annotations block.",
"standardid":4,
"parentelementid": "4.4",
"elementid":"4.4.1"
},
......
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