lepo-project / roster-hub Goto Github PK
View Code? Open in Web Editor NEWRosterHub: Roster Management System based on IMS OneRoster specification
License: GNU Affero General Public License v3.0
RosterHub: Roster Management System based on IMS OneRoster specification
License: GNU Affero General Public License v3.0
Service Call | Endpoint | HTTP Verb | Action |
---|---|---|---|
getStudentsForClass | /classes/{class_id}/students | GET | Return the collection of students that are taking this class. |
getTeachersForClass | /classes/{class_id}/teachers | GET | Return the collection of teachers that are teaching this class. |
Write results of the batch job to the log file.
remove metadata
add dateLAstModified
can't import the csv files users and orgs .
After processing, check whether the referenced record exists.
If not , log to the file as an Error .
All data models of OneRoster 1.1 can be extended within the metadata elements.
By making RosterHub correspond to this metadata element, various data can be sent within the specification of OneRoster 1.1.
[migration file]
class xxxxxx < ActiveRecord::Migration[5.1]
+CREATE_TIMESTAMP = 'DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP'
+UPDATE_TIMESTAMP = 'DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'
def change
:
- t.timestamps
+ t.column :created_at, CREATE_TIMESTAMP
+ t.column :updated_at, UPDATE_TIMESTAMP
[csv_import_job.rb]
Line 109: Add for the new record.
hash['created_at'] = Time.current
hash['updated_at'] = hash['created_at']
Line 112(114): Alter
update_columns = cl.column_names.reject{|c| %w[id sourcedId created_at updated_at].include? c}
cl.import instances, on_duplicate_key_update: update_columns, timestamps: false
With this way, update timestamps only if record changes.
Does it need to be simpler?
If use "NOW()" instead of "CURRENT_TIMESTAMP",
it might work with Postgresql. (need to confirm)
I've written to use the URI Query Parameter when sending the access token.
That is not recommended. in [RFC 6750].
Use swagger-blocks gem.
IMS OneRoster 1.1 for rostering only supports GET method for API accesses. So one can NOT add information on classes not registered in SIS.
For example, "dateLastModified" is needed to oneroseter , but need not in the bulk mode.
{"academicSessions": [{"sourcedId":"sample-guid-1","status":null,"dateLastModified":null,"title":"2017-intensive","type":"term","startDate":"2017-04-01","endDate":"2018-03-31","parentSourcedId":null,"schoolYear":2018},{"sourcedId":"sample-guid-2","status":null,"dateLastModified":null,"title":"2017-full","type":"term","startDate":"2017-04-01","endDate":"2018-03-31","parentSourcedId":null,"schoolYear":2018}]}
[{"id":1,"sourcedId":"sample-guid-1","status":null,"dateLastModified":null,"title":"2017-intensive","type":"term","startDate":"2017-04-01","endDate":"2018-03-31","parentSourcedId":null,"schoolYear":2018,"created_at":"2018-10-13T08:31:29.330+09:00","updated_at":"2018-10-13T08:31:29.330+09:00"},{"id":2,"sourcedId":"sample-guid-2","status":null,"dateLastModified":null,"title":"2017-full","type":"term","startDate":"2017-04-01","endDate":"2018-03-31","parentSourcedId":null,"schoolYear":2018,"created_at":"2018-10-13T08:31:29.328+09:00","updated_at":"2018-10-13T08:31:29.328+09:00"}]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.