protected void SchoologyPull_Click(object sender, EventArgs e) { log.WriteLine("Pulling Data from Schoology."); log.WriteLine(SchoologySync.GetCoursesFromSchoology()); log.WriteLine("Done!"); log.WriteLine("Getting Section Ids"); log.WriteLine(SchoologySync.GetSchoologySectionIdsForTerm(DateRange.GetCurrentOrLastTerm())); log.WriteLine("Done!"); }
void CourseAndSectonsTimer_Elapsed(object sender, ElapsedEventArgs e) { String Report = ""; ServiceEventLog.WriteEntry("Checking for Changes to Schoology Courses and Sections.", EventLogEntryType.Information); Report += SchoologySync.GetCoursesFromSchoology(); Report += "\n" + SchoologySync.GetSchoologySectionIdsForTerm(DateRange.GetCurrentOrLastTerm()); ServiceEventLog.WriteEntry(Report, EventLogEntryType.SuccessAudit); ServiceEventLog.WriteEntry("Completed Course and Section Sync.", EventLogEntryType.Information); MailControler.MailToWebmaster("Schoology Course and Section Sync.", Report); }