X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fview_course.sh;h=ab93e021fd50c1c49645908e88b7c33ebf45249b;hp=883baeea5d8f10dfa7063ff02fed3a9359214c9c;hb=4e49d483fd5121fda86a33cf583c15afa6556ad1;hpb=0a131a90c111856e8ef6e96f6da4105e19598cff diff --git a/templates/view_course.sh b/templates/view_course.sh index 883baee..ab93e02 100755 --- a/templates/view_course.sh +++ b/templates/view_course.sh @@ -1,3 +1,19 @@ +# Copyright 2014 Paul Hänsch +# +# This file is part of Confetti. +# +# Confetti is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Confetti is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Confetti. If not, see . dtstart="$values[DTSTART]" [ -z "$dtstart" ] && dtstart=$(date +%Y%m%dT%H%M%S) @@ -42,7 +58,7 @@ fi coursemail="" echo '
' -echo '
' +echo '' echo '' echo '
' echo ' '$values[SUMMARY]'' @@ -71,23 +87,14 @@ echo '
' 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'' - - coursemail="$coursemail$(sed -rn 's:^EMAIL(;.+)*\:(.+)\r$:\2,:p' "$_DATA/vcard/$each")" -done +list_attendance "$id" |sort -k 2 |sed -r 's:^([^ ]+) (.*)$:\2:' echo '
' echo ' ' echo '' echo '
'