3 . "${_EXEC}"/pdiread.sh
6 local coursefile="$_DATA/courses/$1"
9 . $_EXEC/session_lock.sh
11 if ! tempfile="$(CHECK_SLOCK "$coursefile")"; then
12 printf '[div .message %s]' "$(l10n "This course is not set up for editing within this session.")"
14 course="$(pdi_load "$tempfile")"
16 [form .course #${coursefile##*/} action="/cards/update_course.sh" method="POST"
17 [input type="hidden" name="tid" value="$(transid ${tempfile})"]
25 local course="$(pdi_load "$coursefile")"
27 [div .course #${coursefile##*/}
28 [div .section .basic ­$(
29 cal_item "$course" SUMMARY DTSTART RRULE
31 [div .section .COMMENT ­$(cal_item "$course" COMMENT)]
32 [div .section .attendance [h3 $(l10n course_attendance) ] [ul ­
33 $(grep -F " ${cardfile##*/}" "$_DATA/mappings/attendance" |while read each discard; do
34 printf '[li [a .item .attendance href="/courses#%s" ­%s]]' \
36 "$(pdi_value "$(pdi_load "$_DATA/ical/$each")" SUMMARY |unescape |HTML)"
40 [a .item href="/courses/edit_course.sh?course=${coursefile##*/}" $(l10n edit)]
41 [a .item href="/courses/export_pdf.sh?course=${coursefile##*/}" target="blank" $(l10n courselist)]
42 [a .item href="/courses/export_ical.sh?course=${coursefile##*/}" $(l10n ics_export)]
43 [a .item href="mailto:zack@vuesch.org?bcc=$(course_mail "${coursefile##*/}")" $(l10n course_mail)]
50 local calfile cachefile date size name ldate=0 lsize lname
52 while read calfile; do
53 cachefile="${_DATA}/cache/${calfile##*/}.cache"
54 if [ -s "$cachefile" -a "$cachefile" -nt "$calfile" ]; then
57 print_course "$calfile" |tee "$cachefile"
65 while read calfile; do
66 icstime="$(pdi_value "$(pdi_load "$calfile")" DTSTART |cal_date)"
68 DOW) printf '%s %s\n' "$(date -d "$icstime" "+%u %H:%M:%S")" "$calfile";;
69 TOD) printf '%s %s\n' "$(date -d "$icstime" "+%H:%M:%S")" "$calfile";;
77 printf '%s\n' ${_DATA}/courses/*.ics \