A generic skill for accessing myCourseVille, the learning management system (LMS) used by Chulalongkorn University. It authenticates with Chula IT credentials supplied at invocation and works against any semester or course.
- Logs in via Chula IT OAuth using credentials provided at runtime
- Discovers the user's enrolled courses for a given (or default) semester
- Pulls course materials, assignments, and announcements
- Returns everything as structured Markdown, organized per course
- Credentials, always supplied when the skill is invoked
- Course IDs or semester values, discovered dynamically each run
- Session tokens/cookies, obtained fresh each run and not persisted
A four-step curl-based OAuth flow against mycourseville.com:
- Fetch the landing page to locate the OAuth authorize link
- Follow the
itchulalogin form to grab a CSRF_token - POST the Chula IT username/password along with that token
- Follow the (bug-corrected) OAuth callback to complete login
The result is a cookie jar (laravel_session, XSRF-TOKEN, SESS...) used for all subsequent requests.
All authenticated calls go through mycourseville.com with ?q=... routes, requiring the cookie jar plus X-Requested-With: XMLHttpRequest and a matching Referer header. Key routes:
| Purpose | Route |
|---|---|
| Default semester preference | courseville/ajax/cvhomepanel_load_user_preference |
| Enrolled courses | courseville/ajax/cvhomepanel_get_filter |
| Course landing / materials | courseville/course/{CID} |
| Material detail (file URLs) | courseville/course/{CID}/view_content_node_{NID}_material |
| Assignments | courseville/course/{CID}/assignment |
| Schedule / About / Syllabus | courseville/course/{CID}/schedule, /about, /syllabus |
Course landing pages are static HTML (no JS rendering needed), so materials and their titles can be parsed directly. Each material's detail page contains direct S3 links (PDF/PPTX/DOCX/XLSX/ZIP), and video-only materials appear as Google Drive links rather than through a video host.
- Ask the user for Chula IT credentials, if not already given
- Authenticate and build the session cookie jar
- Discover courses for the target semester (defaults to the user's saved preference)
- For each requested course (by code, "current semester", or "all"):
- Fetch materials, assignments, and announcements
- Return a per-course Markdown summary: code/title/CID, announcements, materials (title + URL + type), and assignments (title, dates, submission status)
- Clean up, no credentials or cookies are left behind after the run
- "fetch myCourseVille materials for current semester"
- "check myCourseVille assignments"
- "list my courses on myCourseVille"
- "download slides for 2190250 from myCourseVille"
- "what's due this week on myCourseVille"
- Landing and material pages are static SPA shells, content is present in the initial HTML response
- Some courses have empty schedule/syllabus tabs
- The
/api/chulaloginOAuth redirect has a known double-slash bug that must be corrected to a single slash before following it - Use
curl -Land reuse the same cookie jar across all requests - Credentials and session cookies should never persist beyond the current session