1

I am using a Powerschool database for my school. It is a non profit educational institution and it uses a SIS to holds students information, Grades, etc. I need this webpage to be automatically emailed to all of the parents email accounts every friday of the week. The parents email accounts are already setup in their user profiles on the SIS.

Is there a way to allow a user to submit their email address on this webpage and then, automatically schedule this webpage to be emailed to the user every friday of the week using Javascript ?

I am really sorry about the shopping list, but my knowledge is very limited to none in Javascript.

This is my basic HTML page that displays my students grades. It works when the student and parent login to their profile in Powerschool (my SIS).

<!DOCTYPE html>
<html>
<head>
<title>~[text:psx.html.guardian.scores.class_score_detail_]</title>
~[wc:guardian_header]
~[if.gpv.termgrades=true][else]
~[SetPostValue:selectedTab=GradesAndAttendance]
~[if.prefschool.sgshowpa=1]~[SetPostValue:showSGFGradebook=false][else]~[SetPostValue:showSGFGradebook=true][/if.prefschool.sgshowpa=1]
~[brij_render:common-ps;:GuardianHomeTabs]
[/if]
<!-- start of title and student content -->

  <h1>~[text:psx.html.guardian.scores.class_score_detail]</h1>
  <!-- title -->
  <div class="box-round">
  <!-- start student content -->
  <table border="0" cellpadding="0" cellspacing="0" width="99%"     class="linkDescList">
    <tr class="center">
      <th>~[text:psx.html.guardian.scores.course]</th>
      <th>~[text:psx.html.guardian.scores.teacher]</th>
      <th>~[text:psx.html.guardian.scores.expression]</th>
      <th>~[text:psx.html.guardian.scores.final_grade]<sup>1</sup></th>
    </tr>
    <tr class="center">
      <td>~[sectioninfo:~(sectionid);coursename]</td>
      <td>~[sectioninfo:~(sectionid);teachername]</td>
      <td>~(*class_expression frn="~(relsectionfrn)")</td>
      <td>~[if.~[dbval;table=termbins;field=suppressltrgrd;*storecode=~    [gpv:fg];*termid=~(termid;absolute);*schoolid=~(schoolid)]#true]
        ~[code.localize:GradeScaleItem,param:~[decode;~(frn);031@;~(grade);~    (final.grade;~[gpv:fg])],param:~[decode;~(frn);031@;~(grade);~(final.grade;~    [gpv:fg])],param:column=name] &nbsp; 
        [/if]
        ~[if.~[dbval;table=termbins;field=SuppressPercentScr;*storecode=~    [gpv:fg];*termid=~(termid;absolute);*schoolid=~(schoolid)]=0]
        <script type="text/javascript">
            if ("~[decode;~(frn);031@;~(grade);~(final.grade;~    [gpv:fg])]"=="--") {
                document.write("&nbsp;");
            } else {
                document.write("~[decode;~(frn);031@;~    (percent;format=numeric);~(final.pct;~[gpv:fg])]% &nbsp;");
            }
        </script>
        [/if] </td>
    </tr>
  </table>
  <!-- The following row has 2 paragraphs - only one is visible at a time --    >
  <!-- 4D's parser breaks on ; or : in comment fields passed to 'decode'-->

 <p><strong>~[text:psx.html.guardian.scores.teacher_comments]</strong></p>
 <div class="comment">
  ~[if.~(decode;~(frn);031@;true;false)=true]
    <pre>~(comment)</pre>
  [else]
    <pre>~(final.comment;~[gpv:fg])</pre>
  [/if]
  </div>
  <p><strong>~[text:psx.html.guardian.scores.section_description]</strong>    </p>
  <div class="comment">
    <pre>~([03]teacherdescr)</pre>
  </div>
  <table border="0" cellpadding="0" cellspacing="0" align="center"     width="99%">
    <tr>
      <th>~[text:psx.html.guardian.scores.due_date]</th>
      <th>~[text:psx.html.guardian.scores.category]</th>
      <th>~[text:psx.html.guardian.scores.assignment]</th>
      <th class="center" colspan="5">~[text:psx.html.guardian.scores.codes]    </th>
      <th class="center">~[text:psx.html.guardian.scores.score]</th>
      <th class="center">~[if.~    [dbval;table=termbins;field=SuppressPercentScr]=0]%[/if]</th>
      <th class="center">~[if.~    [dbval;table=termbins;field=suppressltrgrd]#true]~    [text:psx.html.guardian.scores.grd][/if]</th>
    </tr>
    <tr bgcolor="#edf3fe">~[x:studentscores]
      <td>[duedate]</td>
      <td>[category]</td>
      <td>[assignment]</td>
      <td width="14">[code_collected]</td>
      <td width="14">[code_late]</td>
      <td width="14">[code_missing]</td>
      <td width="14">[code_exempt]</td>
      <td width="19">[code_excluded]</td>
      <td align="center"><span class="bold-underline">[score]</span></td>
      <td align="center">[percent]</td>
      <td align="center">[grade]</td>
    </tr>
  </table>
  </div>
  <div id="legend">
    <h3>~[text:psx.html.guardian.scores.legend]</h3>
    <p class="center">~[if.~(frn)=031@]~    [text:psx.html.guardian.scores.grade_stored_on,param:~(datestored)][else]~    [text:psx.html.guardian.scores.grades_last_updated_on,param:~(LastGradeUpdate)]    [/if]</p>
    <p class="center"> <img src="/images/icon_check.gif" alt="Collected">~    [text:psx.html.guardian.scores._collected]<img src="/images/icon_late.gif"     alt="Late">~[text:psx.html.guardian.scores._late]<img     src="/images/icon_missing.gif" alt="Missing">~    [text:psx.html.guardian.scores._missing]<img src="/images/icon_exempt.gif"     alt="Exempt">~[text:psx.html.guardian.scores._score_is_exempt_from_final_grade]    <img src="/images/icon_excluded.gif" alt="Excluded">~    [text:psx.html.guardian.scores._assignment_is_not_included_in_final_grade]</p>
    <p><strong>1</strong>~    [text:psx.html.guardian.scores._this_final_grade_may_include_assignments_that_ar    e_not_yet_p]<a href="#" onclick="openSpecialWeighting('parent');">~    [text:psx.html.guardian.scores.special_weighting]</a>~    [text:psx.html.guardian.scores.used_by_the_teacher]</p>
  </div>
  <!-- end student content -->
<input id="activeNav" type="hidden" value="~[if.gpv.termgrades=true]#btn-    gradesHistory[else]#btn-gradesAttendance[/if]"/>
~[wc:guardian_footer]
</body>
</html>
j08691
  • 204,283
  • 31
  • 260
  • 272
  • 1
    I would set up a small server that queries the database in the SIS and sends an email with a link to the webpage. That server can be written in javascript(node.js), but it can be made in various other languages as well. – brybott Oct 17 '15 at 23:25
  • Thanks @brybott for your answer. But I am really sorry to say, I don't know how to do that. I am a newbie at this. Also instead of only emailing a link, can the contents of the webpage be emailed as well ? – Access Denied Oct 17 '15 at 23:37
  • 1
    Unless the Powerschool system has a facility for doing this, the answer to your question is "no" you will not be able to simply put some javascript on the webpage which will be able to email the (then closed) webpage to someone. You will need some kind of server-side code to do it. You might be able to use something like IFTTT.com to wire up a serviceable solution, although I wouldn't count on it. This seems like a fairly obvious/useful feature - I would contact Powerschool with the question. It lists "Automatic email messaging" as a feature on its website. – barry-johnson Oct 17 '15 at 23:45
  • Thanks @barry-johnson I will look at the link you posted. Also the Powerschool system already has the ability to send emails to the parents. It is just not sending the contents of this webpage to the parents by email. That is why I was hoping to do this directly from this webpage instead. – Access Denied Oct 18 '15 at 00:04
  • Got it. I do think it seems like a reasonable feature request to put to them. There may be some data privacy concern, but I suspect the extra barrier of clicking through to check the grades might be more than some parents may put forth. You might get some feedback from them on a recommended approach as well Good luck with it. – barry-johnson Oct 18 '15 at 00:07

0 Answers0