This section is currently under construction... please wait until is finished

Software to be installed

Unless stated otherwise, newer stable versions of the program should work.

iTrivio 2.9.017

Competent 33

Introduction

On this page we use the term "Course" for both: course and test in iTrivio.

The integration of Competent and iTrivio provides features from both softwares merged together and accessible through Competent.

When specific objects are created (and deleted) in Competent, they are automatically created (and deleted) in iTrivio as well. Competent stores the ID references to the iTrivio objects in it's database.

This applies to creation of:

  • Users
  • Courses (Activities with the specific launch type iTrivio)
  • User-Course assignments
  • User-Course attempts

iTrivio application is accessible only throught specific links in Competent when:

  • editing a content of Course
  • playing a Course
  • displaying specific User-Course reports

The links to iTrivio contain a one time auto-login security token that approves the current user's action in iTrivio. There is no need for the user to log into iTrivio system manually.

By default the password of a user in iTrivio is different (random) from his password in Competent to prevent direct access to iTrivio. We recommend to disable iTrivio emailing and to keep iTrivio user's password secret to the user. 

Modifying iTrivio directly (out of Competent platform) can cause synchronization issues, especially when manipulating with Users, Courses, User-Course attempts and assignments.

The configuration below describes the basic scenario where

  • both iTrivio and Competent are fresh installations
  • login with the default iTrivio and Competent admin accounts were successfully tested
  • Competent will be the main platform to handle course creation/deletion, user management and user-course management.

Contact Educasoft for specific configuration procedure in other, more complex scenarios (e.g. Competent is going to use existing iTrivio application already filled with course/user data).

Systems preparation

In order for the two systems to work together, we first have to create the basic structures they will operate with - users, folders etc.

Competent

If you have both systems as a fresh installations and you will use them only throught the Competent system, you can skip this step and go to the iTrivio preparation.

  1. We need to decide what subtypes we want to use for new Users and new Activites in the use case, when we would need to synchronize users and courses from iTrivio into Competent. This will not typically happen if you will use the systems as described above.
    • If you want new Users and Activities to be of default subtype, you don't need to create anything.
    • If you want new Users and Activities to be of some other subtype
      • Log into Competent as the admin user
      • switch to the Admin view
      • go to the page Settings, to the tab Subtypes and create new subtypes for User and Activity (click on the green plus icon, fill in the new subtype name and hit the Create button).
  2. Furthermore we need to create a folder, that would hold all the iTrivio courses in case of synchronization from iTrivio, so
    • Log into Competent as the admin user and switch to the Admin view (if you didn't already)
    • Go to the Competent page Activities and create a new folder named for example iTrivio Courses (click on the green plus icon, choose Folder, fill in it's name and click Save).
  3. If you want some other user than the default Competent admin to be able to edit the iTrivio courses, create this user.

iTrivio

Here we need to create the users that will manipulate iTrivio courses and a folder to store them.

  1. Log into iTrivio as admin user and go to the Courses & Tests
  2. Create a new folder named for example Competent courses - this is where all your courses will be stored
  3. If you want the company default admin user to manage all the courses and users creation in iTrivio, skip to step 7), otherwise
  4. Go to Administration to the section Users
  5. Create new user that will be responsible for manipulating all objects in iTrivio (courses and users). Fill just his email, name and surename and assign him the role Administrator.
  6. Optionally you can create another new user that will be responsible only for creating new users in iTrivio
  7. Go to the Usergroups administration and create new usergroup (for example Competent users) - this is where all your new users will be assigned.

Databases info

Now we need to write down IDs of all the objects we just created (and some more). If you have both systems as fresh installations, you did not create any specific subtypes in Competent and users in iTrivio, you can just use the default values from brackets.

  1. Competent database, in the table subtype write down
    • USER_SUBTYPE (by default 1) = subtype ID of the default_user (column "name") or if you created a specific subtype, find it by its name and write down it's ID
    • ACTIVITY_SUBTYPE (by default 2) = subtype ID of the default_timeless_activity (column "name") that has "activity_type_id" = 1. If you created a specific subtype, find it by its name and write down it's ID
  2. Competent database, in the table activity_set write down
    • ACTIVITY_FOLDER (by default 1) = ID of the folder you created for new itrivio courses (find by name in the column "name")
  3. iTrivio database, in the table company write down
    • COMPANY_ID (by default 1) = ID of the company that will be synchornized with Competent (find by name in the column "name")
    • COMPANY_URL (by default empty) = value from the column "urlContext" of the company that will be synchornized with Competent (find by name in the column "name")
  4. iTrivio database, in the table course write down
    • COURSE_FOLDER (by default 1) = ID of the folder that you created for new courses created from Competent (find by name in the column "name")
  5. iTrivio database, in the table itrivio_user write down
    • If you skipped the steps 4) - 6) in iTrivio preparation and you are using fresh iTrivio instalation, just write down the default values
    • ADMIN_CREATOR (by default 2) = ID of the user that will be creating all the users and courses in iTrivio
    • ADMIN_USER_CREATOR (by default 2) = ID of the user that will be creating all the users in iTrivio
  6. iTrivio database, in the table usergroup write down
    • USERGROUP (by default 1) = ID of the usegroup that all your new users will be assigned to
  7. iTrivio database, in the table playerskintemplate write down
    • PLAYER_TEMPLATE (by default 1) = ID of the player that will play your iTrivio courses (this is optional as the system has a default player)
  8. TODO - IMPORTANT BUT CHECK WITH ONDREJ - manually connect the two admins in Competent DB by external ID??? And generally who can EDIT the courses...?

Configuration

Now you can modify the systems configuration files, use the values written down from databases.

Competent

In the application.properties, or in your own application-yourNameShortcut.properties file set the following propeties:

#-# set to true if enabled
competentItrivioIntegration.enabled=true

#-# itrivio company url context, leave empty if company has no url context
competentItrivioIntegration.itrivioCompanyUrlContext=<COMPANY_URL>

#-# url of iTrivio app (for integration API communication - accessible from Competent server location)
competentItrivioIntegration.url=http://localhost:8080/

#-# url of iTrivio app (for generating user links - accessible from browser of users)
competentItrivioIntegration.linkUrl=http://localhost:8080

#-# integrated iTrivio db company ID
competentItrivioIntegration.itrivioCompanyId=<COMPANY_ID>

#-# -------------- COMPETENT INTEGRATION ------------
#-# --- From Competent to iTrivio synchronization ---

#-# iTrivio db user ID, which will be used as a creator iTrivio ID when creating new users in iTrivio
competentItrivioIntegration.userCreatorItrivioUserId=<ADMIN_USER_CREATOR>

#-# iTrivio db user ID, which account will be used to perform actions in iTrivio (such as creating courses and users)
competentItrivioIntegration.auth.userId=<ADMIN_CREATOR>

#-# need to be same as "environment.id" property in iTrivio "settings.properties" file
competentItrivioIntegration.auth.environment=PROD

#-# need to be same as "jwt.key" property in iTrivio "settings.properties" file
competentItrivioIntegration.auth.key=CHANGE_ME

#-# -------------- COMPETENT INTEGRATION ------------
#-# --- From iTrivio to Competent synchronization ---

#-# competent db subtype ID, which will be used when creating new Users in Competent   
competentItrivioIntegration.newUserSubtypeId=<USER_SUBTYPE>

#-# competent db subtype ID, which will be used when creating new Activities in Competent
competentItrivioIntegration.newActivitySubtypeId=<ACTIVITY_SUBTYPE>

#-# competent db activitySet (folder) ID, which will be used when creating new Activities in Competent as parent folder ID
competentItrivioIntegration.newActivityTargetFolderId=<ACTIVITY_FOLDER>

iTrivio part

Run the url "http(s)://<yourdomain>:<port>/(companyUrl/)setCompanyConfig.html" on the domain and port your iTrivio runs and with the companyUrl of the company you are setting this for.

Fill in the settings COMPETENT_INTEGRATION_XXX:

  • COMPETENT_INTEGRATION_ENABLED check the box to be set to true
  • COMPETENT_INTEGRATION_TARGET_FOLDER_ID = <COURSE_FOLDER>
  • COMPETENT_INTEGRATION_API_URL (url where Competent is running eg.: http://localhost:9000/)
  • COMPETENT_INTEGRATION_USERGROUP_ID = <USERGROUP>
  • COMPETENT_INTEGRATION_COURSE_TEMPLATE = <PLAYER_TEMPLATE> TODO This doesn't seem to have any effect

Save the setting with the Odeslat button (nothing visible will happen, don't be worried, it was saved)

Now open the file "/com.itrivio/src/main/resources/settings.properties" and set the two following properties:

# custom environment name, e.g. PROD,DEV,TEST... (must match the competentItrivioIntegration.auth.environment property from Competent)
environment.id=PROD

# secret part of you JWT key - used for communication with the Competent system and creating auto-login links
# see also jwt.expiration
# (must match the competentItrivioIntegration.auth.key property from Competent)
jwt.key=xxxsecret

Final setting test

  • Now run (or restart) both Systems, but from now on do not touch iTrivio apart from making changes in the course creator tool when redirected there from Competent.
  • Log into Competent, go to the Admin view to the Activities page.
  • Create an Activity (of whatever subtype) and go to it's tab Details
  • Edit the Launch type property, set it to iTrivio and hit the Save and Create in iTrivio button
  • If you get any errors, check the configuration if all is set properly
  • Click the Edit button, it should take you to the iTrivio course editor, so add one new slide here, save it and close the browser tab.
  • Click the Start button, it should launch the iTrivio course for you.
  • If all this works, everything is set correctly
Tags:
Created by admin admin on 2020/04/26 02:04