{"id":22621422,"url":"https://github.com/cca/moodle_enroll","last_synced_at":"2025-10-19T13:01:56.428Z","repository":{"id":191944807,"uuid":"685710225","full_name":"cca/moodle_enroll","owner":"cca","description":"WD report -\u003e Moodle enrollments","archived":false,"fork":false,"pushed_at":"2025-01-28T00:19:25.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-28T01:27:06.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cca.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-08-31T20:42:44.000Z","updated_at":"2025-01-28T00:19:29.000Z","dependencies_parsed_at":"2023-09-01T17:06:18.577Z","dependency_job_id":"aed1c5c8-2f8c-4fca-afe6-bbd4ed167bd0","html_url":"https://github.com/cca/moodle_enroll","commit_stats":null,"previous_names":["cca/moodle_intrn_enroll"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fmoodle_enroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fmoodle_enroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fmoodle_enroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Fmoodle_enroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cca","download_url":"https://codeload.github.com/cca/moodle_enroll/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246127739,"owners_count":20727778,"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","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":"2024-12-08T23:08:46.666Z","updated_at":"2025-10-19T13:01:56.422Z","avatar_url":"https://github.com/cca.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ad Hoc Enrollments Scripts\n\nConvert reports into Moodle enrollments CSVs.\n\n## Setup\n\nPrerequisites:\n\n- Access to \"Students for Internship Review\" report in Workday (ask AIS)\n- Python 3\n- uv (`brew install uv`)\n\n```sh\nuv install\nuv run pytest -k enroll # run tests\n```\n\n## Multiple Groups\n\nIn a Moodle enrollment CSV, we can add someone to multiple courses using `course1`, `course2`, etc. columns. However, this means a row with a single `course1` but multiple groups (`group1`, `group2`) doesn't add the user to multiple groups in the course (`group2` would be a group in `course2`). To add a student to multiple groups in the same course, create multiple rows with different groups:\n\n| username | course1 | group1 |\n|----------|---------|--------|\n| maria | ART-101 | transfer |\n| maria | ART-101 | international |\n\nThis is how interns.py adds students to multiple groups in the same course.\n\n## Internship Enrollments Usage\n\nGenerate enrollments CSV for Moodle from Workday report.\n\n1. Download the \"Students for Internship Review\" report\n1. `uv run python enroll/interns.py -r report.xlsx -s \"Fall 2025\"`\n    1. \"data/Students_for_Internship_Review.xlsx\" is the default report path\n    1. `-s` is the semester group for students\n    1. Generate enrollments for a single program with `-p $PROGRAM` e.g. `-p Architecture`\n1. Go to Moodle \u003e [Upload Users](https://moodle.cca.edu/admin/tool/uploaduser/index.php)\n    1. Select the CSV\n    1. Don't modify user values (e.g. no updates, no default values, etc.)\n\n```sh\nUsage: interns.py [OPTIONS]\n\n  Generate enrollments for students who are ready for internship courses.\n\nOptions:\n  -h, --help                      Show this message and exit.\n  -r, --report PATH               path to the Workday Excel file  [required]\n  -s, --semester TEXT             semester group (like \"Fall 2023\"))\n                                  [required]\n  -p, --program [Architecture|Graduate Architecture|Graphic Design|Interior Design]\n                                  Generate enrollments for only a specific\n                                  program\n  -l, --list-mode                 print list of students (instead of CSV)\n```\n\n## NSO Enrollments Usage\n\nThis script is used to generate enrollments for the New Student Orientation courses. It lets you specify where in a provided CSV to look for the few pieces of information we need (email, type, international status). Example using CSV of Leave of Absence students: `uv run python enroll/nso.py --infile loa.csv -e \"Student Institutional Email Address\" -t \"Program of Study Status\" --intl \"Student is International\" -c \"NSO-2024SP\"`\n\n```sh\nUsage: nso.py [OPTIONS]\n\n  Convert new students CSV into Moodle enrollment CSV.\n\nOptions:\n  -h, --help          Show this message and exit.\n  -i, --infile TEXT   Input CSV file\n  -o, --outfile TEXT  Output CSV file (default: nso.csv)\n  -e, --email TEXT    Email column (default: CCA Email)\n  --intl TEXT         International column (default: International?)\n  -t, --type TEXT     Student type (First Year, Transfer, Graduate) column\n                      (default: Applicant Type)\n  -c, --course TEXT   Course shortname (e.g. NSO-2024SP). If {type} is present\n                      in the course name, it will be replaced with the student\n                      type (GRAD, TRSFR, FRESH).\n```\n\n## LICENSE\n\n[ECL Version 2.0](https://opensource.org/licenses/ECL-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcca%2Fmoodle_enroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcca%2Fmoodle_enroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcca%2Fmoodle_enroll/lists"}