{"id":16570299,"url":"https://github.com/benibela/moodle-tools","last_synced_at":"2025-08-04T23:10:31.697Z","repository":{"id":151264717,"uuid":"276336680","full_name":"benibela/moodle-tools","owner":"benibela","description":"Automate teaching actions in the Moodle from the bash shell","archived":false,"fork":false,"pushed_at":"2022-04-27T12:35:00.000Z","size":471,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T12:48:04.278Z","etag":null,"topics":["elearning","luebeck","moodle","teaching","xidel","xquery"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benibela.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-01T09:36:47.000Z","updated_at":"2022-06-14T11:21:47.000Z","dependencies_parsed_at":"2023-04-23T18:30:54.867Z","dependency_job_id":null,"html_url":"https://github.com/benibela/moodle-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benibela/moodle-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benibela%2Fmoodle-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benibela%2Fmoodle-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benibela%2Fmoodle-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benibela%2Fmoodle-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benibela","download_url":"https://codeload.github.com/benibela/moodle-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benibela%2Fmoodle-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268800271,"owners_count":24309414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elearning","luebeck","moodle","teaching","xidel","xquery"],"created_at":"2024-10-11T21:18:19.775Z","updated_at":"2025-08-04T23:10:31.653Z","avatar_url":"https://github.com/benibela.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moodle tools\n\nAutomate various teaching actions in the Moodle of the university of Lübeck.\n\nAlmost all scripts take these environment variables as input: \n\n    course   Course id\n    section  Weekly section in the course \n    user     Username\n    pass     Password\n\n## Examples\n\nUpload file \"exercises.pdf\" with title \"Exercise Sheet\":\n\n    name=\"Exercise Sheet\" description=\"Exercise Sheet\" ./upload.sh exercises.pdf\n\nCreate a heading in a course:\n\n    description=\"\u003ch5\u003eSome heading text\u003c/h5\u003e\" descriptionformat=html ./add.sh label showdescription=1\n\nThe examples assume the above environment variables have been set, so it knows in which course the content should be created.\n\n## Installation\n\nYou only need bash and Xidel \u003e= 0.9.9 installed. \n\nThe scripts can then be called without installation.\n\nXidel is searched as `~/xidel`. You can edit `common.sh` to adjust this and other configuration.\n\n## Available scripts\n\n\n### add.sh\n\n Adds something to a moodle course\n\n     Input as environment variables and parameters\n       course\n       section\n       name\n       description       -\u003e long description\n       descriptionformat -\u003e format as you can choose in the Moodle: html, moodle, markdown, text\n       $1                -\u003e the thing to add\n                            e.g. label, url, page, etherpadlite, moodleoverflow\n       $2                -\u003e additional options (url encoded or JSON)\n\n\n### addurl.sh\n\n Adds a link to $1\n\n     Input as environment variables and parameters\n       course\n       section\n       name\n       description   -\u003e long description\n       descriptionformat -\u003e format as you can choose in the Moodle: html, moodle, markdown, text\n       $1            -\u003e link target\n       $2            -\u003e additional options (url encoded or JSON)\n\n\n### choice-report.sh\n\nPrint the results of a choice activity, sorted by first name (results in the moodle are unsorted)\n\n    Input:\n      $1       -\u003e Id\n\n\n### common.sh\n\nLoads the moodle configuration, user and password, xidel path. Used internally by every other script\n\n\n\n### forumpost.sh\n\nPost message STDIN to forum $1\n\n    $1 is the forum post id not the id from the forum view url. (look at the hidden input with name \"forum\" in the form code of the forum)\n    options: \n      $2             -\u003e subject\n      $3             -\u003e additional options (url encoded or JSON)\n      messageformat\n\n\n### getstudents.sh\n\n Downloads the list of students from a course\n\n     Input as environment variable\n       course\n\n\n### getsubmissions.sh\n\n Downloads submissions from an assignment\n\n     Input as environment variables\n       exercise      Assignment id\n    \n    Im Moodle muss die Zahl der angezeigten Abgaben auf 100 gesetzt werden (oder die Zahl der Studenten), da nur die erste Seite heruntergeladen wird.\n\n\n### gradeupload.sh\n\nSets the grade of a list of students\n\n    Input:\n      $course\n      $1       -\u003e itemid from url\n      $2       -\u003e grade\n      stdin    -\u003e list of students (name or id=1234)\n\n\n### groupgrading/mergegradedandduplicates.sh\n\nCreate a \"merged\" subdirectory containing:\n\n      all files of the current directory\n      all files removed by moveduplicates.sh, but replaced by the file that has replaced the duplicate in the current dir (assuming all duplicates are named GROUP...-). \n\n\n### groupgrading/moveduplicates.sh\n\nMove duplicated files in the current directory to a \"duplicates\" subdirectory\n\n\n\n### hideactivities.sh\n\n Hides some activities\n\n     Input as environment variables and parameters\n       course\n       $1      title of activities to hide\n\n\n### hideslides.sh\n\n Hides activities with caption \"Vorlesungsfolien\"\n\n     Input as environment variables\n       course\n\n\n### hideweeks.sh\n\n Hides week section\n\n     Input as environment variables and parameters\n       course\n       $1 to  $2    section numbers to hide\n\n\n### makeassignment.sh\n\nMakes an assignment\n\n    Input:\n      environment variables:\n         course\n         section\n      stdin:\n         parameters\n         (see modifyassignment)\n\n\n### makeformula.sh\n\n Create a grading formula for a course. Condition: pass if at most two exercise assignments were failed.\n\n     Input as environment variable\n       course\n\n\n### message.sh\n\nCall it with message.sh userid \"message\" to send a message to someone\n\n\n\n### messagelogins.sh\n\nMessage login data to multiple people\n\n\n\n### modifyassignment.sh\n\nInput on stdin\n\n    \n      keys to change  (in JSON/XQuery, without surrounding {})\n      urls to exercises\n    \n    important keys:\n    \n    \"duedate\", \"allowsubmissionsfromdate\", \"cutoffdate\"\n    \"assignsubmission_file_enabled\": 1\n    \"sendnotifications\":  0, 1\n    \n    ------------------\n    Example to shift exercises from one year to the next:\n    \"alldates\": xs:dayTimeDuration(\"P364D\"), \n    \"assignsubmission_file_enabled\": 1,\n    \"sendnotifications\":  0\n    \n    https://moodle.uni-luebeck.de/course/modedit.php?update=112042\u0026return=1\n    https://moodle.uni-luebeck.de/course/modedit.php?update=112057\u0026return=1\n    https://moodle.uni-luebeck.de/course/modedit.php?update=112070\u0026return=1\n    https://moodle.uni-luebeck.de/course/modedit.php?update=112077\u0026return=1\n    https://moodle.uni-luebeck.de/course/modedit.php?update=112087\u0026return=1\n    https://moodle.uni-luebeck.de/course/modedit.php?update=112117\u0026return=1\n    https://moodle.uni-luebeck.de/course/modedit.php?update=112127\u0026return=1\n    https://moodle.uni-luebeck.de/course/modedit.php?update=112135\u0026return=1\n    https://moodle.uni-luebeck.de/course/modedit.php?update=112143\u0026return=1\n    \n    ----------------------\n\n\n### moodleupload.sh\n\nUpload a (TCS) exercise sheet given as tex file to the moodle course and create assignment/VPLs\n\n    Input as environment variable\n      $1        tex file (if absent use random tex file from current directory)\n      course    (if absent read from tex file)\n\n\n### nukeit.sh\n\n Deletes everything from a course\n\n       course\n\n\n### removeduedate.sh\n\n Removes the duedate from an exercise with id $exercise\n\n\n\n### semesterdates.sh\n\n Reads the start and end dates for the semesters of this year from the university of Lübeck webpage.\n\n     Also reads holidays.\n\n\n### setsectioninfo.sh\n\n Sets text of section $section\n\n     Input as environment variables and parameters\n       course\n       section\n       name\n       description\n       descriptionformat\n\n\n### setsectiontitles.sh\n\n Sets the titles of the sections of a course.\n\n     Input as environment variables and parameters\n       course\n       section  Starting section (default 1)\n       stdin    New titles \n\n\n### setupvpl.sh\n\n Creates or changes a VPL. \n\n     Input as environment variables and parameters\n       course\n       section\n       name\n       description\n       $1            -\u003e filename\n       $2            -\u003e additional assignment options\n\n\n### showweeks.sh\n\n Shows the title of the weeks in a course\n\n     Input as environment variables and parameters\n        course\n        $1     start week\n        $2     end week\n\n\n### upload.sh\n\n Uploads a file to a moodle course. \n\n     Input as environment variables and parameters\n       course\n       section\n       name\n       description\n       folderid                if uploading to an existing folder\n       $1            -\u003e filename\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenibela%2Fmoodle-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenibela%2Fmoodle-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenibela%2Fmoodle-tools/lists"}