Skip to content

Commit

Permalink
Merge pull request #759 from SlateFoundation/develop
Browse files Browse the repository at this point in the history
Release: v3.8.7
  • Loading branch information
acouch authored Dec 16, 2022
2 parents 59a4207 + 6a1e53e commit 77a02b0
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
18 changes: 17 additions & 1 deletion cypress/fixtures/cbl/calculations.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"average": "7",
"growth": "0",
"progress": "75",
"progressMissed": "25"
"progressMissed": "0"
}
}
},
Expand Down Expand Up @@ -66,6 +66,14 @@
"progress": "88",
"progressMissed": "0"
},
"HW.2": {
"description": "Overrides with Ms only",
"baseline": null,
"average": null,
"growth": null,
"progress": "40",
"progressMissed": "30"
},
"HW.3": {
"description": "Overrides only",
"baseline": null,
Expand All @@ -75,6 +83,14 @@
}
},
"HOS": {
"HOS.2": {
"description": "Ratings and Ms for every evidence requirement in a skill with an override.",
"baseline": null,
"average": "7",
"growth": "1",
"progress": "83",
"progressMissed": "17"
},
"HOS.3": {
"description": "All M’s only with one ER for each skill",
"baseline": null,
Expand Down
17 changes: 17 additions & 0 deletions php-classes/Slate/CBL/StudentCompetency.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,26 @@ public function getEffectiveDemonstrationsData()
$demonstrationsData = $this->getDemonstrationsData();

foreach ($demonstrationsData as $skillId => &$demonstrationData) {
// Check if there are overrides
$overrideExists = false;
foreach ($demonstrationData as $item) {
if ($item['Override'] === true) {
$overrideExists = true;
break;
}
}

// If any overrides exist, bump all M ratings
if ($overrideExists) {
$demonstrationData = array_filter($demonstrationData, function($datum) {
return $datum['DemonstratedLevel'] !== 0;
});
}

usort($demonstrationData, [__CLASS__, 'sortEffectiveDemonstrations']);

$Skill = Skill::getByID($skillId);

$demonstrationsRequired = $Skill->getDemonstrationsRequiredByLevel($this->Level);

array_splice($demonstrationData, $demonstrationsRequired);
Expand Down
6 changes: 3 additions & 3 deletions sencha-workspace/packages/slate-cbl/src/field/TaskSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Ext.define('Slate.cbl.field.TaskSelector', {
extend: 'Slate.cbl.field.ClearableSelector',
xtype: 'slate-cbl-taskselector',
requires: [
'Slate.cbl.store.tasks.Tasks'
'Slate.cbl.model.tasks.Task'
],


Expand All @@ -18,15 +18,15 @@ Ext.define('Slate.cbl.field.TaskSelector', {
selectOnTab: false
},


store: {
type: 'slate-cbl-tasks',
model: 'Slate.cbl.model.tasks.Task',
proxy: {
type: 'slate-cbl-tasks',
summary: true,
include: ['Creator']
},
remoteSort: true,
pageSize: 30,
sorters: [{
property: 'Created',
direction: 'DESC'
Expand Down

0 comments on commit 77a02b0

Please sign in to comment.