{"id":36591081,"url":"https://github.com/lni-dev/moodle-qtype_regexmatch","last_synced_at":"2026-01-12T08:15:15.055Z","repository":{"id":259234602,"uuid":"783856120","full_name":"lni-dev/moodle-qtype_regexmatch","owner":"lni-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-02T18:51:46.000Z","size":200,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-05T03:15:49.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/lni-dev.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,"zenodo":null,"notice":"NOTICE.txt","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-08T17:52:47.000Z","updated_at":"2026-01-02T18:51:49.000Z","dependencies_parsed_at":"2024-10-23T18:57:16.822Z","dependency_job_id":"2cd57b81-ec6e-4851-84eb-be267ead2a42","html_url":"https://github.com/lni-dev/moodle-qtype_regexmatch","commit_stats":null,"previous_names":["lni-dev/moodle-qtype_regexmatch"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lni-dev/moodle-qtype_regexmatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lni-dev%2Fmoodle-qtype_regexmatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lni-dev%2Fmoodle-qtype_regexmatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lni-dev%2Fmoodle-qtype_regexmatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lni-dev%2Fmoodle-qtype_regexmatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lni-dev","download_url":"https://codeload.github.com/lni-dev/moodle-qtype_regexmatch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lni-dev%2Fmoodle-qtype_regexmatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-12T08:15:13.249Z","updated_at":"2026-01-12T08:15:15.049Z","avatar_url":"https://github.com/lni-dev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moodle Question Type Regex Match\nGrades student answers based on a single or multiple regular expressions.\n\n## Current capabilities\n- Add \"Regex Matcher\" question type\n- Edit question title, text, and feedback\n- Add as many regular expressions (patterns) with different grades as needed\n  - Pattern must be compatible with [preg_match](https://www.php.net/manual/en/function.preg-match.php). \n    A cheat sheet for preg_match can be found [here](https://courses.cs.washington.edu/courses/cse190m/12sp/cheat-sheets/php-regex-cheat-sheet.pdf)\n    - There is a help button (?) next to the first three Regular Expression, which show most of the syntax.\n  - The student's answer must completely match the pattern to receive the selected grade. Technically this means: \n    - \"^\" and \"$\" are always added to the beginning and end of the pattern respectively.\n    - Flag \"m\" (MULTILINE) is always set\n  - CASELESS (\"i\") and DOTALL (\"s\") flag can be selected\n    - CASELESS: Pattern ignores case when matching\n    - DOTALL: All dots (\".\") inside the pattern also match newlines.\n  - Optionally the students answer can be trimmed from any leading and trailing spaces\n  - Shell Options: Two options exist which make writing regular expressions for shell-code easier.\n  - Sanity Check:\n    - At least one regular expression with a grade of 100% must exist.\n- Hints: If the test allows multiple tries (with possible grade reduction), hints can be set for each try\n- Start test, grade and get feedback\n- Backup/Restore question\n\n## Moodle Installation\nReferences for installation on Windows and Ubuntu are given below.\n### Windows\n- https://download.moodle.org/windows/ \n  - Download and Extract Zip\n  - Start Moodle Server using `Start Moodle.exe`\n  - Stop Moodle Server using `Stop Moodle.exe`\n\n### Ubuntu\n- Step-by-Step Guide: https://docs.moodle.org/404/en/Step-by-step_Installation_Guide_for_Ubuntu\n\n## Regex Match Installation Using Git (for development)\nTo install using git for the latest version (the master branch), type this command in the\n`\u003cmoodle-installation\u003e/question/type` folder of your Moodle install:\n```\ngit clone --recurse-submodules https://github.com/lni-dev/moodle-qtype_regexmatch.git regexmatch\n```\nAfter the installation the moodle administration website `Website Administration` must be visited.\n\n## Regex Match Installation/Update (for use)\nThe Zip-File can be installed through the moodle Administration site:\n`Site administration` \u003e `Plugins` \u003e `Install plugins`.\nMore Information about installing plugins can be found\n[here](https://docs.moodle.org/404/en/Installing_plugins).\n\n## IDE\nThe following (example) IDEs can be used to edit the code.\n### PHPStorm\n- Download: https://www.jetbrains.com/phpstorm/download/\n  - Note: Student/Teacher license must only be used for non-commercial educational purposes.\n    - (including conducting academic research or providing educational services)\n    - See https://www.jetbrains.com/legal/docs/toolbox/license_educational/\n    - Get license: https://www.jetbrains.com/shop/eform/students\n- Select php executable: `Settings` -\u003e `PHP` -\u003e `CLI Interpreter` -\u003e `...` -\u003e `+` -\u003e `Other Local...` -\u003e `PHP executable`\n  - If Moodle is already installed, you can use the PHP of the moodle installation\n- Check out the complete `\u003cmoodle-installation\u003e` folder as project\n\n### Eclipse\n- https://docs.moodle.org/dev/Setting_up_Eclipse\n- Check out the complete `\u003cmoodle-installation\u003e` folder as project\n\n\n## Development Notes and Troubleshooting\nSome notes and troubleshooting occurred during development\n\n### Course backup remains on pending\nThis is a problem, if moodle is installed locally. Asynchronous backups must be disabled.\nThis can be done in the moodle administration site:\n`Site administration` \u003e `Courses` \u003e `Asynchronous backups`\n\n### Creating a new version\nSome steps must be taken if a new version if the plugin should be released.\n1. Increase the plugin-version in the file `version.php`. More information can be found in the specified file.\n2. If any changes regarding the database were taken (e.g. a column/table added or removed), this can be\n   done in `db/update.php`. The required code can mostly be generated using the moodle XMLDB Editor. More Information \n   about the XMLDB Editor can be found [here](https://moodledev.io/general/development/tools/xmldb).\n3. Create the new Zip for the Plugin: Zip the contents of the Plugins, so that the following structure is created:\n   ```\n   regexmatch.zip\n    | - db\n      | - ...\n    | - ...\n    | - version.php\n   ```\n   - The `.git` and `.idea` folder should not be added to the zip file.\n\n### supported PHP Version and Moodle Version\nMake sure, that the Plugin supports the lowest PHP version possible for your supported\nmoodle version. (Set the PHP Language Level to that version)\nThe supported moodle version must be set in `version.php.\n- [Required PHP Version](https://docs.moodle.org/404/en/PHP)\n- [Moodle Versions](https://moodledev.io/general/releases)\n\n### database errors after installation\n- Check the state of the required databases using the Moodle Adminer Plugin\n  (`Site administration` \u003e `Server` \u003e `Moodle Adminer`)\n  and \"repair\" the database using a customized version with a `update.php`, which\n  will repair the database. It is possible, that simply allowing `update.php` to run again\n  may fix the problem.\n\n### Uninstalling the plugin\nTo uninstall the plugin no questions of this plugin may exist. To achieve this, all entries in\nthe table `mdl_question` where the variable `qtype` is `regexmatch` must be deleted. The Plugin\n[Moodle Adminer](https://moodle.org/plugins/local_adminer) can be used to easily do this.\n\n## Development Links with useful information\nAdditional advice can be found here:\n- https://github.com/marcusgreen/moodle-qtype_TEMPLATE/wiki\n- Backup/Restore: https://moodle.org/mod/forum/discuss.php?d=397659\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flni-dev%2Fmoodle-qtype_regexmatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flni-dev%2Fmoodle-qtype_regexmatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flni-dev%2Fmoodle-qtype_regexmatch/lists"}