diff --git a/cypress/fixtures/cbl/calculations.json b/cypress/fixtures/cbl/calculations.json index 985edd4f9..aa4e35750 100644 --- a/cypress/fixtures/cbl/calculations.json +++ b/cypress/fixtures/cbl/calculations.json @@ -36,7 +36,7 @@ "average": "7", "growth": "0", "progress": "75", - "progressMissed": "25" + "progressMissed": "0" } } }, @@ -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, @@ -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, diff --git a/php-classes/Slate/CBL/StudentCompetency.php b/php-classes/Slate/CBL/StudentCompetency.php index e133cd0a8..c444ed7ed 100644 --- a/php-classes/Slate/CBL/StudentCompetency.php +++ b/php-classes/Slate/CBL/StudentCompetency.php @@ -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); diff --git a/sencha-workspace/packages/slate-cbl/src/field/TaskSelector.js b/sencha-workspace/packages/slate-cbl/src/field/TaskSelector.js index 637989ad2..01e407a72 100644 --- a/sencha-workspace/packages/slate-cbl/src/field/TaskSelector.js +++ b/sencha-workspace/packages/slate-cbl/src/field/TaskSelector.js @@ -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' ], @@ -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'