From: paul Date: Mon, 2 Dec 2013 18:53:45 +0000 (+0000) Subject: show attendees in course list X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=d3e98b6ec6bc5057d9455123c69ffcd8d81ec470;p=confetti show attendees in course list svn path=/trunk/; revision=35 --- diff --git a/actions/update_attendee.sh b/actions/update_attendee.sh index 078d096..76e0086 100644 --- a/actions/update_attendee.sh +++ b/actions/update_attendee.sh @@ -43,7 +43,10 @@ case "$_POST[\"action\"]" in done sed -i -r '/^(.+)\t'$card'$/d' "$attfile" for each in $attendance; do - echo "$each\t$card" >>"$attfile" + echo "$each\t$card" + done >>"$attfile" + sed -rn 's:^(.+)'$card'$:\1:p' "$attfile" |while read course; do + touch "$_DATA/ical/$course" done echo "END:VCARD\r" >>"$tempfile" diff --git a/templates/courses.css.sh b/templates/courses.css.sh index fb98be5..c7e9038 100644 --- a/templates/courses.css.sh +++ b/templates/courses.css.sh @@ -45,6 +45,20 @@ cat <' +echo '
' +echo ' '$(l10n course_attendance)'' +sed -rn 's:'$id'\t(.+)$:\1:p' "$_DATA/mappings/attendance" |while read each; do + n_last="$( sed -rn 's:^N(;.+)*\:([^;]*;){0} *([^;]*).*$:\3:p' "$_DATA/vcard/$each")" + n_first="$( sed -rn 's:^N(;.+)*\:([^;]*;){1} *([^;]*).*$:\3:p' "$_DATA/vcard/$each")" + n_middle="$(sed -rn 's:^N(;.+)*\:([^;]*;){2} *([^;]*).*$:\3:p' "$_DATA/vcard/$each")" + n_pre="$( sed -rn 's:^N(;.+)*\:([^;]*;){3} *([^;]*).*$:\3:p' "$_DATA/vcard/$each")" + n_post="$( sed -rn 's:^N(;.+)*\:([^;]*;){4} *([^;]*).*$:\3:p' "$_DATA/vcard/$each")" + aname="${n_pre} ${n_first} ${n_middle} ${n_last} ${n_post}" + echo ' '$aname'' +done +echo '
' + echo '