How openstax/tutor-server works
OpenStax Tutor is a Rails backend for managing courses, course membership, learning tasks, and related services. One evidenced user workflow is enrollment: a learner submits an enrollment request, the API validates its parameters, creates an enrollment change, and an authorized user can approve it to process the membership change. The tree also shows distinct content, course, task, research, and LMS capabilities. Those branches are represented as subsystems, but their internal connections are not established by the sampled source; dashed edges mark those uncertain links.
Main entry points: enrollment_controller.rb Enrollment API · process_enrollment_change.rb Process enrollment change · enrollment_change.rb Membership records · studies_controller.rb Study management
Components 23
Courses and membership
- Validate enrollment
app/subsystems/course_membership/validate_enrollment_parameters.rb - Process enrollment change
app/subsystems/course_membership/process_enrollment_change.rb - Membership records
app/subsystems/course_membership/models/enrollment_change.rb - Course profiles
app/subsystems/course_profile/models/course.rb - Course membership
app/subsystems/course_membership/add_student.rb - Course content links
app/subsystems/course_content/add_ecosystem_to_course.rb
Learning content and tasks
- Content import
app/subsystems/content/import_book.rb - Content catalog
app/subsystems/content/models/ecosystem.rb - Task distribution
app/routines/distribute_tasks.rb - Task execution
app/subsystems/tasks/get_tasks.rb - Preview course work
app/routines/work_preview_course_tasks.rb
Research
- Study management
app/controllers/research/studies_controller.rb - Cohort membership
app/subsystems/research/cohort_membership_manager.rb - Survey workflow
app/subsystems/research/complete_survey.rb
LMS integration
- LMS launch
app/subsystems/lms/launch.rb - LMS entry point
app/controllers/lms_controller.rb - LMS course API
app/controllers/api/v1/lms/courses_controller.rb
API and access
- Enrollment API
app/controllers/api/v1/enrollment_controller.rb - Enrollment access policy
app/access_policies/enrollment_change_access_policy.rb - Enrollment representations
app/representers/api/v1/enrollment_change_representer.rb
Other components
- Learner
- PostgreSQL
- Learning platform
Connections 19
- Learner → Enrollment API: requests enrollment
app/controllers/api/v1/enrollment_controller.rb - Enrollment API → Validate enrollment: validates parameters
app/controllers/api/v1/enrollment_controller.rb - Enrollment API → Process enrollment change: processes approval
app/controllers/api/v1/enrollment_controller.rb - Enrollment API → Enrollment access policy: checks approval
app/controllers/api/v1/enrollment_controller.rb - Enrollment API → Enrollment representations: renders enrollment
app/controllers/api/v1/enrollment_controller.rb - Validate enrollment → Membership records: validates against
- Process enrollment change → Membership records: updates membership
- Process enrollment change → Course membership: changes enrollment
- Course profiles → Course membership: has membership
- Course content links → Content catalog: uses ecosystem
- Content import → Content catalog: imports content
- Task distribution → Task execution: assigns tasks
- Preview course work → Task execution: works preview tasks
- Study management → Cohort membership: manages cohorts
- Study management → Survey workflow: manages surveys
- Learning platform → LMS entry point: launches course
- LMS entry point → LMS launch: handles launch
- LMS course API → LMS launch: pairs courses
- Membership records → PostgreSQL: persists records