forked from dougpenny/PSDataAccessPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6833c38
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<plugin xmlns="http://plugin.powerschool.pearson.com" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://plugin.powerschool.pearson.com plugin.xsd" | ||
name="SwiftyPowerSchool PowerQueries" | ||
version="1.0" | ||
description="A collection of PowerQueries to be used with SwiftyPowerSchool"> | ||
<oauth></oauth> | ||
<access_request> | ||
<field table="courses" field="course_name" access="ViewOnly" /> | ||
<field table="courses" field="course_number" access="ViewOnly" /> | ||
<field table="sections" field="id" access="ViewOnly" /> | ||
<field table="sections" field="course_number" access="ViewOnly" /> | ||
<field table="sections" field="external_expression" access="ViewOnly" /> | ||
<field table="sections" field="no_of_students" access="ViewOnly" /> | ||
<field table="sections" field="room" access="ViewOnly" /> | ||
<field table="sections" field="teacher" access="ViewOnly" /> | ||
<field table="sections" field="termid" access="ViewOnly" /> | ||
</access_request> | ||
<publisher name="North Raleigh Christian Academy"> | ||
<contact email="[email protected]"/> | ||
</publisher> | ||
</plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<queries> | ||
<query name="com.nrcaknights.swiftypowerschool.section.get_by_teacher" coreTable="SECTIONS" flattened="true"> | ||
<description>List of sections currently being taught by a teacher</description> | ||
<args> | ||
<arg name="teacher_id" required="true" description="Teacher ID (not the teacher number)" type="primitive" /> | ||
</args> | ||
<columns> | ||
<column column="sections.id">sections.id</column> | ||
<column column="sections.course_number">sections.course_number</column> | ||
<column column="courses.course_name">sections.course_name</column> | ||
<column column="sections.external_expression">sections.external_expression</column> | ||
<column column="sections.no_of_students">sections.num_students</column> | ||
<column column="sections.room">sections.room</column> | ||
</columns> | ||
<sql><![CDATA[ | ||
select | ||
sections.id, | ||
sections.course_number, | ||
courses.course_name, | ||
sections.external_expression, | ||
sections.no_of_students, | ||
sections.room | ||
from | ||
sections inner join | ||
courses on courses.course_number = sections.course_number | ||
where | ||
sections.teacher = :teacher_id and | ||
/*** | ||
To get the current term we subtract 7 months from the current date | ||
to get the current school year and subtract this value from the | ||
epoch year (1990) to get the first two digits of the current PowerSchool term. | ||
4/24/2018 - 7 months -> 10/24/2017 -> 2017 - 1990 -> 27 | ||
***/ | ||
substr(sections.termid,1,2) = to_char(add_months(sysdate,-7),'YYYY') - 1990 | ||
order by | ||
sections.external_expression | ||
]]></sql> | ||
</query> | ||
</queries> |