Commits

Anonymous committed a4fb460

activated january exams and second term

  • Participants
  • Parent commits 1e89c0e

Comments (0)

Files changed (9)

 
 
 # There are 3 exam sessions. It's not useful to list them all year long.
-
-CURRENT_EXAM_SESSION = None
+CURRENT_EXAM_SESSION = 'january'
 EXAM_SESSION_WEEKSPANS = {'january':JANUARY_EXAMS_WEEKSPAN,
                           'june':JUNE_EXAMS_WEEKSPAN,
                         'september':SEPTEMBER_EXAMS_WEEKSPAN}

File coursecalendar.py

 import version
 
 def rebuild_gehol_url(group_id):
-    return "http://164.15.72.157:8081/Reporting/Individual;Student%20Set%20Groups;id;"+group_id+"?&template=Ann%E9e%20d%27%E9tude&weeks=1-14&days=1-6&periods=5-33&width=0&height=0"
+    return "http://164.15.72.157:8081/Reporting/Individual;Student%20Set%20Groups;id;"+group_id+"?&template=Ann%E9e%20d%27%E9tude&weeks=1-36&days=1-6&periods=5-33&width=0&height=0"
 
 
 
                 self._render_gehol_down_page(course_mnemo)
             else:
                 try:
-                    cal = get_calendar(course_mnemo)
+                    cal = get_calendar(course_mnemo, conf.Q2_WEEKSPAN)
                 except DownloadError,e:
                     logging.error("Could not fetch page before deadline")
                     render_deadline_exceeded_page(self)
 
     def _render_calendar_summary(self, cal, course_mnemo):
         ical_url, csv_url = self._build_file_urls(course_mnemo)
-        start, end = convert_weekspan_to_dates(conf.Q1_WEEKSPAN, conf.FIRST_MONDAY)
+        start, end = convert_weekspan_to_dates(conf.Q2_WEEKSPAN, conf.FIRST_MONDAY)
 
         template_values = {'version':version.VERSION,
                         'gehol_is_down': is_status_down(),

File geholwrapper.py

 import gehol
 import conf
 
-def get_calendar(course_mnemonic):
+def get_calendar(course_mnemonic, weekspan):
     gehol_proxy = gehol.GeholProxy(conf.SCIENTIA_BACKEND_HOST)
     try:
-        return gehol_proxy.get_course_calendar(course_mnemonic, conf.Q1_WEEKSPAN)
+        return gehol_proxy.get_course_calendar(course_mnemonic, weekspan)
     except gehol.GeholException:
         return None
 

File professorcalendar.py

 import version
 
 def is_staff_member_id_valid(staff_member_id):
-    return staff_member_id.isdigit()
+    return staff_member_id.isalnum()
+
 
 
 
         template_values = {'gehol_is_down': is_status_down(),
                          'last_status_update': get_last_status_update(),
                          'version':version.VERSION,
-                         'gehol_url':make_professor_gehol_url(staff_member_id, conf.Q1_WEEKSPAN),
+                         'gehol_url':make_professor_gehol_url(staff_member_id, conf.Q2_WEEKSPAN),
                          'professor_name':professor_name,
                          'ical_q1_url':ical_urls[0],
                          'ical_q2_url':ical_urls[1],

File templates/course.html

         {% endif %}
 
 
-
-
-
-        <br/><br/>
-        <!--div class="box" style="text-align:center">
-            <h3><a href="{{csv_url}}">{{mnemo}}.csv</a></h3>
-            <div class="quiet" style="font-style:italic;">{{caption}}</div>
-        </div>
-        <p>
-            Click this link to download a CSV file with the events for
-            this course. This file can be imported in Google Calendar.
-        </p-->
-
         <p>
             <strong>Important reminder :</strong> The files you
             download and import from this service are 

File templates/main.html

 
             <div class="box">
                 <ul>
+                    <!-- 29/12/2011-->
+                    <li>
+                        Second term schedules for 2011-2012 are online.
+                    </li>
+                    <li>
+                        January 2012 exam sessions are online.
+                    </li>
+
                     <!--21/09/2011 -->
-                    <li>
+                    <!--li>
                         It's back to school week, and staff members can also
                         <a href="/questions#geholurl_staff">get their schedules</a> in
                         a human-readable format.
                         That's right, <a href="/media/everyone_gets_a_geholimporter.png">everyone gets a Gehol Importer</a>, it's a darn party.
                     </li>
-                    <!--19/09/2011 -->
+                    <!--19/09/2011 >
                     <li>
                         It's back to school day! Schedules for the first 2011-2012 term are online.
                     </li>
-                    <!--18/06/2011 -->
+                    <!--18/06/2011 >
                     <li>
                         Now with <a href="/questions#qrcodes">QR Codes!</a>
-                    </li>
+                    </li -->
                 </ul>
             </div>
 

File templates/staff.html

       </div>
 
 
-      <!--div class="box" style="text-align:center">
+      <div class="box" style="text-align:center">
         <h4><a href="{{ical_q2_url}}">{{ical_q2_url_title}}.ics</a></h4>
         <div class="quiet" style="font-style:italic;"> Second term : {{q2_span}}</div>
-      </div-->
+      </div>
 
-      <div class="box" style="text-align:center">
+      <!--div class="box" style="text-align:center">
         <h4>Schedules for the second term are not available yet</h4>
         <div class="quiet" style="font-style:italic;">
 
             they are currently not valid.
             Hence, we won't show them just yet.
          </div>
-      </div>
+      </div-->
 
 
      <p>

File templates/student.html

       {% endif %}
 
 
-      <div class="box" style="text-align:center">
+      <!--div class="box" style="text-align:center">
         <h4><a href="{{ical_q1_url}}">{{ical_q1_url_title}}.ics</a></h4>
         <div class="quiet" style="font-style:italic;"> First term : {{q1_span}}</div>
-      </div>
+      </div-->
 
 
-      <!--div class="box" style="text-align:center">
+      <div class="box" style="text-align:center">
         <h4><a href="{{ical_q2_url}}">{{ical_q2_url_title}}.ics</a></h4>
         <div class="quiet" style="font-style:italic;"> Second term : {{q2_span}}</div>
-      </div-->
-
-      <div class="box" style="text-align:center">
-        <h4>Schedules for the second term are not available yet</h4>
-        <div class="quiet" style="font-style:italic;">
-           
-            According to the <a href="http://scientia-web.ulb.ac.be/gehol_20112012/">powers that be</a>,
-            they are currently not valid.
-            Hence, we won't show them just yet.
-         </div>
       </div>
 
-
       {% if exam_session %}
         {% if exam_session.info_found %}
           <div class="box" style="text-align:center">

File templates/student_mobile.html

 
         <br/><br/>
 
-      <div class="box" style="text-align:center">
+      <!--div class="box" style="text-align:center">
         <a href="{{webcal_q1_url}}">{{webcal_q1_url_title}}.ics</a>
         <div class="quiet" style="font-style:italic;"> First term : {{q1_span}}</div>
-      </div>
+      </div-->
 
 
-      <!--div class="box" style="text-align:center">
+      <div class="box" style="text-align:center">
         <a href="{{webcal_q2_url}}">{{webcal_q2_url_title}}.ics</a>
 
         <div class="quiet" style="font-style:italic;"> Second term : {{q2_span}}</div>
-      </div-->
+      </div>
 
       <div class="box" style="text-align:center">
         Schedules for the second term are not available yet