]> git.plutz.net Git - lobster/commitdiff
touch course file (invalidate cache) when updating attendance in vcard
authorPaul Hänsch <paul@plutz.net>
Sun, 17 Jan 2021 09:25:00 +0000 (10:25 +0100)
committerPaul Hänsch <paul@plutz.net>
Sun, 17 Jan 2021 09:25:00 +0000 (10:25 +0100)
cards/list.sh
cards/update_card.sh

index 4e40072a9b396889196794ce044801358891a835..1c602913244d34882771c6d0b318f5d85a70e65f 100755 (executable)
@@ -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" \
index 7896beb5011d3cee5892b9d6c099a8693d34caa3..97dedf3d646cfe618b6389dacee08949bcb46ede 100755 (executable)
@@ -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