X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=courses%2Fedit_course.sh;fp=actions%2Fnew_course.sh;h=3c0c54fc9dee25db23b6eb5fe0a4d5075865099e;hp=4f97d4aadc94d3144135ad6854efeecd1871d1e0;hb=76c1e7bff1a8604ef2ef7da5d274d0db0e639139;hpb=90288ab07bb1ec83a91581fadc674a87a250a853
diff --git a/actions/new_course.sh b/courses/edit_course.sh
similarity index 60%
rename from actions/new_course.sh
rename to courses/edit_course.sh
index 4f97d4a..3c0c54f 100755
--- a/actions/new_course.sh
+++ b/courses/edit_course.sh
@@ -1,6 +1,6 @@
-#!/bin/zsh
+#!/bin/sh
-# Copyright 2014 Paul Hänsch
+# Copyright 2014, 2019, 2020 Paul Hänsch
#
# This file is part of Confetti.
#
@@ -17,30 +17,18 @@
# You should have received a copy of the GNU Affero General Public License
# along with Confetti. If not, see .
-cgi_post
+locktimeout=900
+. "$_EXEC"/session_lock.sh
-uid=$(uuidgenerator)
-course="${uid}.ics"
+course="$(GET course |PATH)"
+coursefile="$_DATA/ical/${course##*/}"
-tzid=$(cat /etc/timezone)
-tstamp=$(TZ="$tzid" date +%Y%m%dT%H%M%S)
-
-tempfile="$_DATA/temp/$course"
-
-cat >"$tempfile" <