Skip to content

Commit

Permalink
Reports: updated report writing to show left class enrolments with th…
Browse files Browse the repository at this point in the history
…e Show Left Students tool
  • Loading branch information
SKuipers committed Apr 25, 2024
1 parent e6b44b4 commit 9e16540
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ v27.0.00
Library: updated child records to use the same Vendor field as parent records in Manage Catalogue
Messenger: added search form and school year navigator to Manage Groups page for quicker group browsing
Messenger: added an index to the Message Target table to speed up the recipients query
Reports: updated report writing to also show left class enrolments with the Show Left Students tool
Reports: added uploadable Image as a field type in Manage Criteria Types
Reports: added a check for the correct .twig.html extension in Manage Assets
School Admin: added the ability to toggle facilities between active and inactive
Expand Down
5 changes: 3 additions & 2 deletions modules/Reports/src/Domain/ReportingAccessGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,9 @@ public function selectReportingProgressByScope($gibbonReportingScopeID, $scopeTy
->where('gibbonStudentEnrolment.gibbonFormGroupID=:scopeTypeID')
->groupBy(['gibbonStudentEnrolment.gibbonPersonID']);
} elseif ($scopeType == 'Course') {
$query->innerJoin('gibbonCourseClass', 'gibbonCourseClass.gibbonCourseID=gibbonReportingCriteria.gibbonCourseID')
->innerJoin('gibbonCourseClassPerson', "gibbonCourseClassPerson.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID AND gibbonCourseClassPerson.role='Student'")
$query->cols(['gibbonCourseClassPerson.role'])
->innerJoin('gibbonCourseClass', 'gibbonCourseClass.gibbonCourseID=gibbonReportingCriteria.gibbonCourseID')
->innerJoin('gibbonCourseClassPerson', "gibbonCourseClassPerson.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID AND ".($allStudents ? "(gibbonCourseClassPerson.role='Student' OR gibbonCourseClassPerson.role='Student - Left')" : "gibbonCourseClassPerson.role='Student'"))
->innerJoin('gibbonPerson', 'gibbonPerson.gibbonPersonID=gibbonCourseClassPerson.gibbonPersonID')
->leftJoin('gibbonReportingProgress', 'gibbonReportingProgress.gibbonReportingScopeID=gibbonReportingCriteria.gibbonReportingScopeID AND gibbonReportingProgress.gibbonCourseClassID=gibbonCourseClass.gibbonCourseClassID AND gibbonReportingProgress.gibbonPersonIDStudent=gibbonPerson.gibbonPersonID')
->where('gibbonCourseClass.gibbonCourseClassID=:scopeTypeID')
Expand Down
4 changes: 4 additions & 0 deletions modules/Reports/templates/ui/writingQueue.twig.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ <h4>
{% if student.status != 'Full' %}
<span class="tag error ml-2 text-xxs">{{ student.status }}</span>
{% endif %}

{% if student.role == 'Student - Left' %}
<span class="tag error ml-2 text-xxs">{{ __('Left') }}</span>
{% endif %}
</div>
</a>
{% endmacro studentLink %}
4 changes: 4 additions & 0 deletions modules/Reports/templates/ui/writingSidebar.twig.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
{% if student.status != 'Full' %}
<span class="tag error ml-2 text-xxs">{{ student.status }}</span>
{% endif %}

{% if student.role == 'Student - Left' %}
<span class="tag error ml-2 text-xxs">{{ __('Left') }}</span>
{% endif %}
</div>

{% if student.progress == 'Complete' %}
Expand Down

0 comments on commit 9e16540

Please sign in to comment.