2.22.2 • Published 4 months ago

@universis/one-roster v2.22.2

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
-
Last release
4 months ago

@universis/one-roster

Universis OneRoster 1.2 middleware

Installation

npm i @universis/one-roster

Configuration

Register @universis/one-roster under universis api server services section of application configuration:

    {
        "services": [
            {
                "serviceType": "@universis/one-roster#OneRosterService"
            }
        ]
    }

Add the OneRosterSchemaLoader under universis api server schema/loaders section of application configuration:

{
  "schema": {
    "loaders": [
      { "loaderType": "@universis/one-roster#OneRosterSchemaLoader"}
    ]
  }
}

Configure line items and results

Exporting line items and results of each course is optional and can be configured in application configuration:

{
  "services": [
    {
      "serviceType": "@universis/one-roster#OneRosterLineItemProvider",
      "strategyType": "@universis/one-roster#OneRosterNoLineItemProvider",
    },
    {
      "serviceType": "@universis/one-roster#OneRosterResultProvider",
      "strategyType": "@universis/one-roster#OneRosterNoResultProvider",
    }
  ]
}

where OneRosterNoLineItemProvider and OneRosterNoResultProvider does not export line items and results respectively. This operation may be important for environments where one roster services are going be used for exporting data associated with course enrollments only e.g. Universis API server is used for exporting data to LMS.

Configure class title format

OneRosterClass providers are using classTitleFormat to generate class titles. The default format is "${title}" -the title of the class-. The format can be changed in application configuration e.g.:

{
    "settings": {
      "universis": {
        "one-roster": {
          "classTitleFormat": "${displayCode} ${title}"
        }
      }
    }
}

where the class provider will produce class titles in the format "${displayCode} ${title}" e.g. 101 Mathematics The available variables are:

  • ${id} - the class identifier
  • ${title} - the title of the class
  • ${course} - the course identifier
  • ${displayCode} - the display code of the course
  • ${academicYear} - the academic year of the class
  • ${academicPeriod} - the academic period of the class
  • ${department} - the department identifier

Configure class section title format

OneRosterClass providers are using classSectionTitleFormat to generate class titles if they are derived from course class sections. The default format is "${title} - ${name}". The format can be changed in application configuration e.g.:

{
    "settings": {
      "universis": {
        "one-roster": {
          "classSectionTitleFormat": "${displayCode} ${title} - ${name}"
        }
      }
    }
}

where the class provider will produce class titles in the format "${displayCode} ${title} - ${name}" e.g. 101 Mathematics - Section 1 The available variables are:

  • ${id} - the class identifier
  • ${title} - the title of the class
  • ${name} - the name of the class section
  • ${section} - the section identifier
  • ${course} - the course identifier
  • ${displayCode} - the display code of the course
  • ${academicYear} - the academic year of the class
  • ${academicPeriod} - the academic period of the class
  • ${department} - the department identifier

Configure class part title format

OneRosterClass providers are using classPartTitleFormat to generate class titles if they are derived from course class parts. The default format is "${title} - ${name}". The format can be changed in application configuration e.g.:

{
    "settings": {
      "universis": {
        "one-roster": {
          "classPartTitleFormat": "${displayCode} ${title} - ${name}"
        }
      }
    }
}

where the class provider will produce class titles in the format "${displayCode} ${title} - ${name}" e.g. 101 Mathematics - Section 1 The available variables are:

  • ${id} - the class identifier
  • ${title} - the title of the class
  • ${name} - the name of the class part
  • ${classIndex} - the part identifier
  • ${course} - the course identifier
  • ${displayCode} - the display code of the course
  • ${academicYear} - the academic year of the class
  • ${academicPeriod} - the academic period of the class
  • ${department} - the department identifier

Using @universis/robot

The @universis/one-roster package can be used with @universis/robot package to prepare and export OneRoster data.

The following example demonstrates how to use @universis/robot package to export OneRoster data:

At the root director of @universis/api start the robot with the following command:

npx @universis/robot --config ./node_modules/@universis/one-roster/jobs/config.json

The robot will start and export OneRoster data by registering a new job for @universis/robot based on the configuration provided in ./node_modules/@universis/one-roster/config.json file.

[
  {
    "name": "one-roster-syncer",
    "interval": "20 minutes",
    "path": "./syncer.js"
  }
]

syncer.js job is trying to get classes that modified since the last time the job was run and exports them to the OneRoster API. The job is running by default every 20 minutes.

@universis/robot may be configured to run under pm2 or any other process manager to ensure that the robot is running continuously.

pm2 start npx --name one-roster-syncer -- @universis/robot --config ./node_modules/@universis/one-roster/jobs/config.json 
2.22.2

4 months ago

2.22.1

4 months ago

2.22.0

5 months ago

2.21.0

5 months ago

2.21.2

5 months ago

2.21.3

5 months ago

2.20.6

5 months ago

2.20.7

5 months ago

2.20.5

6 months ago

2.20.4

6 months ago

2.20.2

6 months ago

2.20.3

6 months ago

2.19.2

6 months ago

2.19.3

6 months ago

2.19.0

6 months ago

2.19.1

6 months ago

2.20.0

6 months ago

2.20.1

6 months ago

2.18.3

7 months ago

2.18.2

7 months ago

2.17.10

8 months ago

2.18.1

8 months ago

2.18.0

8 months ago

2.17.8

8 months ago

2.17.9

8 months ago

2.17.6

8 months ago

2.17.7

8 months ago

2.17.5

9 months ago

2.17.4

9 months ago

2.17.3

9 months ago

2.17.2

9 months ago

2.17.0

9 months ago

2.17.1

9 months ago

2.16.1

9 months ago

2.16.2

9 months ago

2.16.0

9 months ago

2.15.2

9 months ago

2.15.0

9 months ago

2.15.1

9 months ago

2.14.4

9 months ago

2.14.3

9 months ago

2.14.1

9 months ago

2.14.2

9 months ago

2.14.0

9 months ago

2.13.8

9 months ago

2.13.7

9 months ago

2.13.4

9 months ago

2.13.5

9 months ago

2.13.2

9 months ago

2.13.3

9 months ago

2.13.0

9 months ago

2.13.1

9 months ago

2.12.1

9 months ago

2.12.2

9 months ago

2.11.0

9 months ago

2.10.1

10 months ago

2.11.1

9 months ago

2.10.0

10 months ago

2.9.0

10 months ago

2.8.1

10 months ago

2.8.0

10 months ago

2.9.1

10 months ago

2.7.4

10 months ago

2.7.0

10 months ago

2.6.1

11 months ago

2.7.2

10 months ago

2.7.3

10 months ago

2.6.0

11 months ago

2.5.0

12 months ago

2.5.2

12 months ago

2.5.1

12 months ago

2.4.0

1 year ago

2.3.4

1 year ago

2.3.2

1 year ago

2.3.3

1 year ago

2.3.0

2 years ago

2.3.1

2 years ago

2.2.2

2 years ago

2.2.1

2 years ago

2.1.2

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.0.2

2 years ago

2.1.3

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago