Skip to content

Commit

Permalink
Merge pull request #610 from SlateFoundation/fixes/task-context-defau…
Browse files Browse the repository at this point in the history
…lt-titles

fix(student tasks): use ->getTitle() for dynamic section titles
  • Loading branch information
themightychris authored Oct 12, 2021
2 parents ffc977e + 4b36c04 commit 585706c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions php-classes/Slate/CBL/Tasks/StudentTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 585706c

Please sign in to comment.