1 / 16

Custom Alerts

Custom Alerts. Dean Dahlvang PSUG-MO March 2010. About Dean. Dean Dahlvang (ddahlvan@proctor.k12.mn.us) Director of Administrative Technology for the Proctor Public Schools (just outside of Duluth, Minnesota at the tip of Lake Superior).

aricin
Télécharger la présentation

Custom Alerts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Custom Alerts Dean Dahlvang PSUG-MO March 2010

  2. About Dean • Dean Dahlvang (ddahlvan@proctor.k12.mn.us) • Director of Administrative Technology for the Proctor Public Schools (just outside of Duluth, Minnesota at the tip of Lake Superior). • PowerSchool Admin for 9 years, PowerSchool contracted state reporting programmer for the last 4 years. • I winter camp near the Canadian border.

  3. What are Alerts? • Alerts are the little icons that appear in the student name section of a student page. • Here are the delivered alerts • Birthday • Discipline • Guardian • Medical • Other

  4. How Do Alerts Function? • Alerts basically react to a logical condition. If that condition is met, then the icon(s) appear at the top of the page. • Birthday alert is triggered when a student is nearing their birthday • Discipline, Guardian, Medical and Other are triggered when data is entered into a specific field.

  5. What Do Alerts Do? • When an alert is triggered, it allows us to click on the icon and then it displays a pop-up window with specific information. • The pop-up window is just a skinnied down web page. • Some alerts also have expiration dates. The expiration date is included in the logic that triggers the icon.

  6. How Do We Make Our Own Alert? • Let’s start with a simple “static” alert. • This alert is triggered by the presence of data in some field (like the medical and other alerts). • We will worry about 3 things: • The field that will trigger the alert and how to populate the field. • The wildcard file that holds the student header information. • The pop-up page that will display.

  7. Student Note Alert • In this example we will create a custom field and a custom page that will trigger our Student Note alert. • Using the conventional means, create a custom field called student_note. • Also, create a custom screen that will allow text entry for our new field student_note. • This will allow users to populate our custom screen if they want the alert to trigger.

  8. Student Note Alert (step 2) • Alert icons appear at the top of the page in the student name header. • This header is a wildcard file called title_student_end.txt • Change this <td>~[studentalert]</td> to: • <td>~[studentalert]~[if.~([01]student_note)#]<a href="javascript:alertwindow('~[directory]', 'note', '~(studentfrn)')" onMouseOver="window.status='Student Note'; return true"><imgsrc="/images/student_note.gif" alt="Student Note" border="0"></a>[/if]</td>

  9. Student Note Alert (step 3) • To create the pop-up page, copy an existing alert like otheralert.html to the custom area. Rename the page to notealert.html (“note” was a parameter in our step 2!) • Modify a couple of lines of code to reflect the Student Note instead of Other alert info • Add the field that contains the alert text ~(student_note)

  10. Student Note Alert Code • Otheralert.html • <title>Other Alert</title> • <imgsrc="/images/alert_otherwhite.gif" width="42" height="42" alt="" border="0"> • <span class="header">Other Alert</span> • <td colspan="3">~(alert_other)<br>&nbsp;<br>Alert Expires: ~[if.~(alert_otherexpires)=0/0/0]Never[else]~(alert_otherexpires)[/if]<br>&nbsp;<br></td> • Notealert.html • <title>Student Note</title> • <imgsrc="/images/student_notewhite.gif" width="42" height="42" alt="" border="0"> • <span class="header">Student Note</span> • <td colspan="3">~(student_note)<br>&nbsp;<br>&nbsp;<br></td>

  11. Try It Out! • Let’s see what happens when we try it! • Also, creating the icon graphics are not covered in this session. You are on your own for those. • Typically, the header icon is 30px x 24px. • The “white” icon is 42px x 42px.

  12. How ‘Bout a Dynamic Alert? • What if we wanted to be aware of something that wasn’t user triggered but data triggered? • Let’s create an alert that will warn us if a student has an F as a historical grade. • The trigger will be if a student has an F grade count greater than 0. • We can employ a gpa calculation method to help.

  13. The F Alert • Create a very, very simple gpa calculation method to count the number of cumulative F’s. • Method Name: F CountFormula: countof("F",gpa_grade())Calculation Type: Cumulative

  14. The F Alert (step 2) • Just like with the Student Note alert, we need to make an adjustment to the wildcard file that acts as our trigger. • <td>~[studentalert]~[if.~([01]student_note)#]<a href="javascript:alertwindow('~[directory]', 'note', '~(studentfrn)')" onMouseOver="window.status='Student Note'; return true"><imgsrc="/images/student_note.gif" alt="Student Note" border="0"></a>[/if]~[if.~(*gpa method="F Count")>0]<a href="javascript:alertwindow('~[directory]', 'f', '~(studentfrn)')" onMouseOver="window.status='F Alert'; return true"><imgsrc="/images/fcount.gif" alt="F Alert" border="0"></a>[/if]</td>

  15. The F Alert (step 3) • Again, use a copy of the otheralert.html file as a guide (or our previously used notealert.html) • Name the file falert.html (remember the parameter from step 2.) • Code changes • <title>F Alert</title> • <imgsrc="/images/fcountwhite.gif" width="42" height="42" alt="" border="0"> • <span class="header">F Alert</span> • <td colspan="3">Number of F grades: ~(*gpa method="F Count")<br>&nbsp;<br>&nbsp;<br></td>

  16. Summary • The alert in 3 simple steps: • The field that will trigger the alert and how to populate the field. • The wildcard file that holds the student header information. • The pop-up page that will display. • Remember to use the Other Alert as an example.

More Related