-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.sample.ps1
22 lines (22 loc) · 1.39 KB
/
config.sample.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#InfiniteCampus uses MSSQL and self signed certificates so we need these credentials to form a connection
$username = "dbusername"
$password = "dbpassword"
$dbserverstring = "db1.domain.tld,1234"
$database = "dbname"
$ConnectionString = "Server=$dbserverstring;Database=$database;User ID=$username;Password=$password;encrypt=true;trustServerCertificate=true"
$sqlquery = "SELECT DISTINCT t.name as Term, p.Name as Period, c.name as Course, r.trialid as Trial, sch.schoolid as SchoolID, con.email as TeacherEmail, scon.email as StudentEmail, s.sectionid as SectionID
FROM Section s
JOIN SectionPlacement sp ON s.sectionid = sp.sectionID
JOIN Term t ON sp.termid = t.termid
JOIN Period p ON sp.periodid = p.periodid
JOIN Course c ON s.courseid = c.courseid
JOIN Roster r ON s.sectionid = r.sectionid
JOIN Person teacher ON s.teacherpersonid = teacher.personid
JOIN Contact con ON teacher.personid = con.personid
JOIN Person student ON r.personid = student.personid
JOIN Contact scon ON student.personid = scon.personid
JOIN Calendar cal ON c.calendarid = cal.calendarid
JOIN School sch ON cal.schoolid = sch.schoolid
JOIN Trial tr ON r.trialid = tr.trialid
WHERE tr.active = 1
AND r.enddate IS NULL"