Skip to content

Commit

Permalink
Activities: fixed activity missing from the timetable if it doesn't h…
Browse files Browse the repository at this point in the history
…ave a category
  • Loading branch information
SKuipers committed Jan 22, 2025
1 parent 33d90bf commit fd21699
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ v29.0.00


Bug Fixes
Activity: fixed missing registration button for parents on View Activities page
Activities: fixed activity missing from the timetable if it doesn't have a category
Activities: fixed missing registration button for parents on View Activities page
System Admin: fixed field validation for Student Default Email in Form Builder
System Admin: fixed uniqueness check when editing a page in Form Builder

Expand Down
4 changes: 2 additions & 2 deletions src/Domain/Activities/ActivityGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function selectActiveEnrolledActivities($gibbonSchoolYearID, $gibbonPerso
'gibbonActivity.gibbonActivityID', 'gibbonActivity.name', 'gibbonActivity.provider', 'gibbonPerson.gibbonPersonID', 'gibbonActivitySlot.timeStart', 'gibbonActivitySlot.timeEnd', 'gibbonActivitySlot.locationExternal', 'gibbonSpace.name as space', 'gibbonDaysOfWeek.name as dayOfWeek',
])
->innerJoin('gibbonActivitySlot', 'gibbonActivitySlot.gibbonActivityID=gibbonActivity.gibbonActivityID')
->innerJoin('gibbonActivityCategory', 'gibbonActivityCategory.gibbonActivityCategoryID=gibbonActivity.gibbonActivityCategoryID')
->leftJoin('gibbonActivityCategory', 'gibbonActivityCategory.gibbonActivityCategoryID=gibbonActivity.gibbonActivityCategoryID')
->innerJoin('gibbonDaysOfWeek', 'gibbonActivitySlot.gibbonDaysOfWeekID=gibbonDaysOfWeek.gibbonDaysOfWeekID')
->innerJoin('gibbonActivityStudent', 'gibbonActivity.gibbonActivityID=gibbonActivityStudent.gibbonActivityID')
->innerJoin('gibbonPerson', "gibbonActivityStudent.gibbonPersonID=gibbonPerson.gibbonPersonID")
Expand All @@ -206,7 +206,7 @@ public function selectActiveEnrolledActivities($gibbonSchoolYearID, $gibbonPerso
->where('gibbonActivityStudent.gibbonPersonID=:gibbonPersonID')
->bindValue('gibbonPersonID', $gibbonPersonID)
->bindValue('dateType', $dateType)
->where('CURRENT_TIMESTAMP >= gibbonActivityCategory.accessEnrolmentDate');
->where('(gibbonActivityCategory.gibbonActivityCategoryID IS NULL OR CURRENT_TIMESTAMP >= gibbonActivityCategory.accessEnrolmentDate)');

if ($dateType == 'Term') {
$query->cols(['gibbonSchoolYearTerm.firstDay as dateStart', 'gibbonSchoolYearTerm.lastDay as dateEnd'])
Expand Down

0 comments on commit fd21699

Please sign in to comment.