From: Paul Hänsch Date: Sun, 17 Jan 2021 09:25:00 +0000 (+0100) Subject: touch course file (invalidate cache) when updating attendance in vcard X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=0bb22396a89ab7a8d79f765a63d1714054c54052;p=lobster touch course file (invalidate cache) when updating attendance in vcard --- diff --git a/cards/list.sh b/cards/list.sh index 4e40072..1c60291 100755 --- a/cards/list.sh +++ b/cards/list.sh @@ -45,7 +45,7 @@ edit_card(){ done) [h3 $(l10n CATEGORIES) ] $( grep -xE '[^ ]+' "$_DATA"/mappings/categories |while read -r cat; do - printf '[label [input type="checkbox" name="attendance" value="%s" %s] %s]' \ + printf '[label [input type="checkbox" name="CATEGORIES" value="%s" %s] %s]' \ "$(HTML "$cat")" \ "$(seq 1 $(pdi_count "$card" CATEGORIES) |while read c; do pdi_value "$card" CATEGORIES $c |grep -qxF "$cat" \ diff --git a/cards/update_card.sh b/cards/update_card.sh index 7896beb..97dedf3 100755 --- a/cards/update_card.sh +++ b/cards/update_card.sh @@ -104,14 +104,14 @@ case "$action" in update) if LOCK "$attfile"; then grep -F " ${card}" "$attfile" |while read course junk; do - touch "$_DATA/courses/${course}" + touch "$_DATA/ical/${course}" done - sed -i -r "/^.+ ${card}\$/d" "$attfile" + sed -i -E "/^.+ ${card}\$/d" "$attfile" seq 1 $(POST_COUNT attendance) |while read n; do printf '%s %s\n' "$(POST attendance $n)" "$card" done >>"$attfile" grep -F " ${card}" "$attfile" |while read course junk; do - touch "$_DATA/courses/${course}" + touch "$_DATA/ical/${course}" done RELEASE "$attfile" else