From 4b36c04c0e91c151c0fce7921d9b48c2a99baba3 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Mon, 4 Oct 2021 17:56:47 -0400 Subject: [PATCH 1/5] fix(student tasks): use ->getTitle() for dynamic section titles --- php-classes/Slate/CBL/Tasks/StudentTask.php | 4 ++-- .../Slate/CBL/Tasks/20161007000000_student-task-ratings.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/php-classes/Slate/CBL/Tasks/StudentTask.php b/php-classes/Slate/CBL/Tasks/StudentTask.php index 026fd1ff7..a3b53d033 100644 --- a/php-classes/Slate/CBL/Tasks/StudentTask.php +++ b/php-classes/Slate/CBL/Tasks/StudentTask.php @@ -174,8 +174,8 @@ public function getOrCreateDemonstration() if (!$this->Demonstration) { $this->Demonstration = ExperienceDemonstration::create([ 'StudentID' => $this->StudentID, - 'PerformanceType' => $this->Task->Title, - 'Context' => $this->Task->Section->Title, + 'PerformanceType' => $this->Task->getTitle(), + 'Context' => $this->Task->Section->getTitle(), 'ExperienceType' => $this->Task->ExperienceType ]); } diff --git a/php-migrations/Slate/CBL/Tasks/20161007000000_student-task-ratings.php b/php-migrations/Slate/CBL/Tasks/20161007000000_student-task-ratings.php index 77bf23da4..d5292b3f3 100644 --- a/php-migrations/Slate/CBL/Tasks/20161007000000_student-task-ratings.php +++ b/php-migrations/Slate/CBL/Tasks/20161007000000_student-task-ratings.php @@ -65,8 +65,8 @@ 'StudentID' => $StudentTask->StudentID, 'Demonstrated' => $StudentTask->Submitted ?: null, 'ExperienceType' => $StudentTask->ExperienceType, - 'PerformanceType' => $StudentTask->Task->Title, - 'Context' => $StudentTask->Section->Title + 'PerformanceType' => $StudentTask->Task->getTitle(), + 'Context' => $StudentTask->Section->getTitle() ]); $Demonstration->save(false); From 6cc44fc477a40e3f26b1563b00973848ee4b2205 Mon Sep 17 00:00:00 2001 From: BillClinton Date: Wed, 6 Oct 2021 13:34:38 -0400 Subject: [PATCH 2/5] fix: remove quotes from attachments list --- data-exporters/slate-cbl/student-tasks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data-exporters/slate-cbl/student-tasks.php b/data-exporters/slate-cbl/student-tasks.php index be71c18bd..13e5a9d0f 100644 --- a/data-exporters/slate-cbl/student-tasks.php +++ b/data-exporters/slate-cbl/student-tasks.php @@ -274,13 +274,13 @@ foreach ($StudentTask->Task->Attachments as $Attachment) { $attachments[] = $Attachment->URL; } - $teacherAttachments = !empty($attachments) ? '"'.implode('", "', $attachments).'"' : null; + $teacherAttachments = !empty($attachments) ? implode(',', $attachments) : null; $attachments = []; foreach ($StudentTask->Attachments as $Attachment) { $attachments[] = $Attachment->URL; } - $studentAttachments = !empty($attachments) ? '"'.implode('", "', $attachments).'"' : null; + $studentAttachments = !empty($attachments) ? implode(',', $attachments) : null; yield [ 'StudentTaskID' => $StudentTask->ID, From 3a460b2e3938e42998a650dee092dd43d70f726c Mon Sep 17 00:00:00 2001 From: BillClinton Date: Wed, 6 Oct 2021 13:40:11 -0400 Subject: [PATCH 3/5] fix: remove quotes from attachments list --- data-exporters/slate-cbl/student-tasks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data-exporters/slate-cbl/student-tasks.php b/data-exporters/slate-cbl/student-tasks.php index be71c18bd..13e5a9d0f 100644 --- a/data-exporters/slate-cbl/student-tasks.php +++ b/data-exporters/slate-cbl/student-tasks.php @@ -274,13 +274,13 @@ foreach ($StudentTask->Task->Attachments as $Attachment) { $attachments[] = $Attachment->URL; } - $teacherAttachments = !empty($attachments) ? '"'.implode('", "', $attachments).'"' : null; + $teacherAttachments = !empty($attachments) ? implode(',', $attachments) : null; $attachments = []; foreach ($StudentTask->Attachments as $Attachment) { $attachments[] = $Attachment->URL; } - $studentAttachments = !empty($attachments) ? '"'.implode('", "', $attachments).'"' : null; + $studentAttachments = !empty($attachments) ? implode(',', $attachments) : null; yield [ 'StudentTaskID' => $StudentTask->ID, From 95544d637c268d922b7a748bdd1e01737f160b3a Mon Sep 17 00:00:00 2001 From: BillClinton Date: Wed, 6 Oct 2021 13:47:51 -0400 Subject: [PATCH 4/5] Revert "fix: remove quotes from attachments list" Wrong branch! This reverts commit 6cc44fc477a40e3f26b1563b00973848ee4b2205. --- data-exporters/slate-cbl/student-tasks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data-exporters/slate-cbl/student-tasks.php b/data-exporters/slate-cbl/student-tasks.php index 13e5a9d0f..be71c18bd 100644 --- a/data-exporters/slate-cbl/student-tasks.php +++ b/data-exporters/slate-cbl/student-tasks.php @@ -274,13 +274,13 @@ foreach ($StudentTask->Task->Attachments as $Attachment) { $attachments[] = $Attachment->URL; } - $teacherAttachments = !empty($attachments) ? implode(',', $attachments) : null; + $teacherAttachments = !empty($attachments) ? '"'.implode('", "', $attachments).'"' : null; $attachments = []; foreach ($StudentTask->Attachments as $Attachment) { $attachments[] = $Attachment->URL; } - $studentAttachments = !empty($attachments) ? implode(',', $attachments) : null; + $studentAttachments = !empty($attachments) ? '"'.implode('", "', $attachments).'"' : null; yield [ 'StudentTaskID' => $StudentTask->ID, From eab934625603c6a6823239eeca450b499887c3b0 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Mon, 11 Oct 2021 22:52:50 -0400 Subject: [PATCH 5/5] chore(deps): bump slate to v2.16.5 --- .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 f71f577f8..66a07a777 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.16.3" +ref = "refs/tags/v2.16.5"