lepo-project/lepo

Sync LePo db with OneRoster API for Term, Course, CourseMember and User

kyoshizaki opened this issue · 3 comments

Issue

  • Course.status is NOT related to term duration.
    • Term.end_at and Term.start_at are NOT used in LePo
  • Existing courses are always visible even though corresponding data is deleted from OneRoster data
  • Existing course members are always visible even though corresponding data is deleted from OneRoster data

Current status: before v0.3.1

Possible activities for each Course.status

draft

manager assistant learner
Show course YES YES NO
Show lesson YES YES NO
Show member YES YES NO
Create sticky YES YES NO
Create highlight YES YES NO
Create notice YES YES ---
Create worksheet YES YES ---
Create member YES YES ---
Edit course YES YES ---

open

manager assistant learner
Show course YES YES YES
Show lesson YES YES YES
Show member YES YES YES
Submit assignment --- --- YES
Evaluate assignment YES --- ---
Create sticky YES YES YES
Create highlight YES YES YES
Create notice YES YES ---
Create worksheet YES YES ---
Create member YES YES ---
Edit course YES YES ---

archived

manager assistant learner
Show course YES YES YES
Show lesson YES YES YES
Show member YES YES YES
Submit assignment --- --- YES
Evaluate assignment YES --- ---
Create sticky YES YES YES
Create highlight YES YES YES
Create notice YES YES ---
Create worksheet NO NO ---
Create member NO NO ---
Edit course YES YES ---

Course.status setting procedure

  • system admin / system manager
  • course manager / course assistant

CRUD processing in data synchronization with OneRoster API

  • Sync to course existence by daily job
  • Course: Create and Update
  • CourseMember: Create and Update

Implementation

Possible activities for each Course.status

  • same as the current status

Course.status setting procedure

  • Sync to term period by daily job (TermJob)
    • Course must belong to a term
    • set status "draft": current time is before Term.startDate
    • set status "open": current time is after Term.startDate and before Term.endDate
    • set status "archived": current time is after Term.endDate

CRUD processing in data synchronization with OneRoster API

  • Sync to course existence by daily job
  • Course: Create, Update and Logical delete
    • records in OneRoster data: bulk update with "true" for enabled column
    • records deleted from OneRoster data: set "false" for enabled column
  • CourseMember: Create and Update
    • records in OneRoster data: bulk update
    • records deleted from OneRoster data: delete from LePo db

CRUD processing by user from UI

  • when SYSTEM_ROSTER_SYNC is "on"
    • Create: post data to API server and reflect it to DB
    • Read: from DB
    • Update / Delete
      • Resources synchronized with API server: put/delete data to API server and reflect it to DB
      • Resources NOT synchronized with API server (old data): Not permitted (Keep on DB as it is)
  • when SYSTEM_ROSTER_SYNC is "suspended"
    • Create: temporarily not permitted
    • Read: from DB
    • Update / Delete: temporarily not permitted
  • when SYSTEM_ROSTER_SYNC is "off"
    • CRUD: with DB
      • operable only for no sourced_id resource?

Considerations

  • When making Roster API use micro-service in LePo, disable "off" status?
  • State "off" is restricted to be usable only in the development environment?
  • Whether resource owner is SIS or API client
  • Issue: Sync users with both LDAP and local authentication types
  • Solution: Save authentication as "local " and hashed password from user.password of OneRoster data
  • Use offset and limit parameters when calling to OneRoster API