Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

myCourseVille Skill

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.

What it does

  • 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

What it deliberately does not contain

  • 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

How it works

1. Authentication

A four-step curl-based OAuth flow against mycourseville.com:

  1. Fetch the landing page to locate the OAuth authorize link
  2. Follow the itchula login form to grab a CSRF _token
  3. POST the Chula IT username/password along with that token
  4. 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.

2. Endpoints

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

3. Material extraction

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.

Invocation flow

  1. Ask the user for Chula IT credentials, if not already given
  2. Authenticate and build the session cookie jar
  3. Discover courses for the target semester (defaults to the user's saved preference)
  4. For each requested course (by code, "current semester", or "all"):
    • Fetch materials, assignments, and announcements
  5. Return a per-course Markdown summary: code/title/CID, announcements, materials (title + URL + type), and assignments (title, dates, submission status)
  6. Clean up, no credentials or cookies are left behind after the run

Example prompts

  • "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"

Implementation notes

  • 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/chulalogin OAuth redirect has a known double-slash bug that must be corrected to a single slash before following it
  • Use curl -L and reuse the same cookie jar across all requests
  • Credentials and session cookies should never persist beyond the current session

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors