From c4b79fb817c7cc4018f1a90c733e13b8e694ea48 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sun, 27 Jan 2013 00:07:18 +0100 Subject: Add xsl-powered script to create KAPV in moodle --- oracle-conversion/create-kapv-in-moodle.sh | 15 ++++++++ oracle-conversion/lesson-add-to-moodle.xsl | 57 ++++++++++++++++++++++++++++++ oracle-conversion/sort-lesson.xsl | 22 ++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 oracle-conversion/create-kapv-in-moodle.sh create mode 100644 oracle-conversion/lesson-add-to-moodle.xsl create mode 100644 oracle-conversion/sort-lesson.xsl diff --git a/oracle-conversion/create-kapv-in-moodle.sh b/oracle-conversion/create-kapv-in-moodle.sh new file mode 100644 index 0000000..e501a86 --- /dev/null +++ b/oracle-conversion/create-kapv-in-moodle.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +xsltproc sort-lesson.xsl lesson.xml | \ + xsltproc \ + --stringparam cookie MoodleSession=XXXXXXXXXXXXXXXXXXXXXXXXXX \ + --stringparam sesskey xxxxxxxxxx \ + --stringparam url http://moodle.bnfr.net \ + --stringparam module 23 \ + --stringparam course 2 \ + --stringparam section 1 \ + lesson-add-to-moodle.xsl - | \ + while read cmd; + do + eval $cmd + done diff --git a/oracle-conversion/lesson-add-to-moodle.xsl b/oracle-conversion/lesson-add-to-moodle.xsl new file mode 100644 index 0000000..53851e1 --- /dev/null +++ b/oracle-conversion/lesson-add-to-moodle.xsl @@ -0,0 +1,57 @@ + + + + + + + + +0 + + + + + + curl -s -v --data " + name= + + & + + query= + + & + + + = + + + + & + + + + + + + introeditor%5Bformat%5D=1& + groupmode=0&visible=1&cmidnumber=&submitbutton2=Save%20and%20return%20to%20course& + modulename=sqlbox&instance=&add=sqlbox&update=0&return=0&sr=0&_qf__mod_sqlbox_mod_form=1 + + " + + + + + + + + + + + + + + + diff --git a/oracle-conversion/sort-lesson.xsl b/oracle-conversion/sort-lesson.xsl new file mode 100644 index 0000000..54c4601 --- /dev/null +++ b/oracle-conversion/sort-lesson.xsl @@ -0,0 +1,22 @@ + + + +1 + + + + + + + + + + + + + + + + + + -- cgit