X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=actions%2Fnew_course.sh;h=4f97d4aadc94d3144135ad6854efeecd1871d1e0;hp=7be0f26a1d0cca33199acc63b684d2acf003195b;hb=be911da6c63f2129a62dc50f92b749e0f2bb67ee;hpb=c195881a2389862d4bfcd2fd55ca868f7a20b8e8 diff --git a/actions/new_course.sh b/actions/new_course.sh old mode 100644 new mode 100755 index 7be0f26..4f97d4a --- a/actions/new_course.sh +++ b/actions/new_course.sh @@ -1,8 +1,25 @@ #!/bin/zsh +# 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 . + cgi_post -uid=$(dbus-uuidgen) +uid=$(uuidgenerator) course="${uid}.ics" tzid=$(cat /etc/timezone) @@ -26,4 +43,4 @@ END:VEVENT END:VCARD EOF -echo -n "Location: http://$HTTP_HOST/?page=courses&edit=$course\n\n" +echo -n "Location: ?p=courses&edit=$course\n\n"