From 03452e136076a2f378322136c75cb8cbaaa9c34f Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Wed, 26 Jan 2022 17:26:10 -0500 Subject: [PATCH 1/3] fix: remove rogue CSS class --- .../packages/slate-cbl/src/view/demonstrations/SkillList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sencha-workspace/packages/slate-cbl/src/view/demonstrations/SkillList.js b/sencha-workspace/packages/slate-cbl/src/view/demonstrations/SkillList.js index 19ea9a5a9..90f451a41 100644 --- a/sencha-workspace/packages/slate-cbl/src/view/demonstrations/SkillList.js +++ b/sencha-workspace/packages/slate-cbl/src/view/demonstrations/SkillList.js @@ -183,7 +183,7 @@ Ext.define('Slate.cbl.view.demonstrations.SkillList', { -
+

Latest Comments

    From 31d51d3c1a4859504afe5ce80a6477d7c9f71e3c Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Wed, 26 Jan 2022 17:30:18 -0500 Subject: [PATCH 2/3] fix: prevent property access errors for non-task demonstrations --- .../src/view/demonstrations/SkillList.js | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/sencha-workspace/packages/slate-cbl/src/view/demonstrations/SkillList.js b/sencha-workspace/packages/slate-cbl/src/view/demonstrations/SkillList.js index 90f451a41..5fd5e445e 100644 --- a/sencha-workspace/packages/slate-cbl/src/view/demonstrations/SkillList.js +++ b/sencha-workspace/packages/slate-cbl/src/view/demonstrations/SkillList.js @@ -146,7 +146,7 @@ Ext.define('Slate.cbl.view.demonstrations.SkillList', {
- +
Task Attachments
- +
Task Submissions
- +

Latest Comments

@@ -225,11 +225,26 @@ Ext.define('Slate.cbl.view.demonstrations.SkillList', { return Slate.API.buildUrl("/cbl/dashboards/tasks/student#"+d.Student.Username+"/"+d.StudentTask.Task.Section.Code+"/"+d.StudentTask.ID); }, linksExist: function(d) { - var submissionAttachments = d.StudentTask.Attachments.filter(a => a.status !== 'removed'); - return d.ArtifactURL != null || d.StudentTask.Task.Attachments && d.StudentTask.Task.Attachments.length || d.StudentTask.Attachments && d.StudentTask.Attachments.length; + return ( + d.ArtifactURL != null + || this.hasActiveTaskAttachments(d) + || this.hasActiveStudentTaskAttachments(d) + ); }, - hasActiveAttachments: function(attachments) { - return attachments.filter(a => a.status !== 'removed').length > 0; + hasActiveTaskAttachments: function(d) { + return ( + d.StudentTask + && d.StudentTask.Attachments + && d.StudentTask.Attachments.filter(a => a.status !== 'removed').length > 0 + ); + }, + hasActiveStudentTaskAttachments: function(d) { + return ( + d.StudentTask + && d.StudentTask.Task + && d.StudentTask.Task.Attachments + && d.StudentTask.Task.Attachments.filter(a => a.status !== 'removed').length > 0 + ); }, linkText: function(attachment) { return Slate.cbl.model.tasks.Attachment.getField('title').calculate(attachment); From 82edf8da4f0ca17d98bc63ea604396673051bb8d Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Wed, 26 Jan 2022 19:06:47 -0500 Subject: [PATCH 3/3] chore(deps): bump slate to v2.17.3 --- .holo/sources/slate.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.holo/sources/slate.toml b/.holo/sources/slate.toml index 1f7060e67..5d2ceb2a9 100644 --- a/.holo/sources/slate.toml +++ b/.holo/sources/slate.toml @@ -1,3 +1,3 @@ [holosource] url = "https://github.com/SlateFoundation/slate" -ref = "refs/tags/v2.17.2" +ref = "refs/tags/v2.17.3"