Changes for page Competent - iTrivio integration
Last modified by Petr Blšťák on 2024/09/18 11:55
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -74,121 +74,73 @@ 74 74 75 75 1. Log into iTrivio as admin user and go to the **Courses & Tests** 76 76 1. **Create a new folder** named for example Competent courses - this is where all your courses will be stored 77 -1. If you want the company default admin user to manage all the courses and users creation in iTrivio, skip to step 7), otherwise 78 78 1. Go to **Administration **to the section **Users** 79 -1. **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.78 +1. **Create new user** that will be responsible for manipulating all objects in iTrivio (courses and users). Fill just his email, name and surename. 80 80 1. Optionally you can create another new user that will be responsible only for creating new users in iTrivio 81 81 1. Go to the **Usergroups administration** and create new usergroup (for ecample Competent users) - this is where all your new users will be assigned. 82 82 83 -=== __Databases info__ ===82 +=== __Databases__ === 84 84 85 -Now we need to write down IDs of all the objects we just created (and some more). If you have both systems fresh installations, you did not create any specific subtypes in Competent and users in iTrivio, you can just use the default values from brackets.84 +Now we need to write down IDs of all the objects we just created (and some more). 86 86 87 87 1. In __Competent__ database, in the table __subtype__ write down 88 88 1*. **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 89 89 1*. **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 90 90 1. In __Competent__ database, in the table __activity_set__ write down 91 -1*. **ACTIVITY_FOLDER **(by default 1) = ID of the folder you created for new itrivio courses (find by name in the column "name") 90 +1*. **CMP_ACTIVITY_FOLDER **(by default 1) = ID of the folder you created for new itrivio courses (find by name in the column "name") 92 92 1. In __iTrivio__ database, in the table __company__ write down 93 -1*. **COMPANY_ID **(by default 1) = ID of the company that will be synchornized with Competent (find by name in the column "name") 94 -1*. **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") 95 -1. In __iTrivio__ database, in the table __course__ write down 96 -1*. **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") 97 -1. In __iTrivio__ database, in the table __itrivio_user__ write down 98 -1*. If you skipped the steps 4) - 6) in iTrivio preparation and you are using fresh iTrivio instalation, just write down the default values 99 -1*. **ADMIN_CREATOR **(by default 2) = ID of the user that will be creating all the users and courses in iTrivio 100 -1*. **ADMIN_USER_CREATOR **(by default 2) = ID of the user that will be creating all the users in iTrivio 101 -1. In __iTrivio__ database, in the table __usergroup__ write down 102 -1*. **USERGROUP **(by default 1) = ID of the usegroup that all your new users will be assigned to 103 -1. In __iTrivio__ database, in the table __playerskintemplate__ write down 104 -1*. **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) 105 -1. IMPORTANT BUT CHECK WITH ONDREJ - manually connect the two admins in Competent DB by external ID??? 92 +1*. COMPANY_NAME (by default 1) = ID of the company that will be synchornized with Competent (find by name in the column "name") 106 106 94 += Competent part = 107 107 108 -= Configuration = 109 109 110 - Nowyoucanmodify thesystemsconfiguration files,use thevalueswrittendown from databases.97 +in application.properties, or in your own application-yourNameShortcut.properties file set the following propeties: 111 111 112 -=== __Competent__ === 99 +* **competentItrivioIntegration.enabled=true** 100 +//(true to allow the connection between apps)// 101 +* **competentItrivioIntegration.itrivioCompanyUrlContext=/test** 102 +//(url name of the company for which you are setting the connection, leave empty if the only company is the root)// 103 +* **competentItrivioIntegration.url=http:~/~/localhost:8080/** 104 +//(url of the iTrivio app)// 105 +* **competentItrivioIntegration.linkUrl=http:~/~/127.0.0.1:8080** 106 +//(probably the same as above, this will be the url where the iTrivio courses will run, leave out the final slash! or the course address will show wrong)// 107 +* **competentItrivioIntegration.itrivioCompanyId=1** 108 +//(Id of the company you are setting it for)// 109 +* **competentItrivioIntegration.userCreatorItrivioUserId=2** 110 +//(ID of the user - existing in the system - in whos name the courses will be created. Someone with Admin roles)// 111 +* **competentItrivioIntegration.newUserSubtypeId=1** 112 +//(ID of subtype of user in Competent? - for when creating new users - probably)// 113 +* **competentItrivioIntegration.newActivitySubtypeId=2** 114 +//(ID of subtype of Activity? - when creating new activities - probably)// 115 +* **competentItrivioIntegration.newActivityTargetFolderId=20** 116 +//(ID of folder in iTrivio in which to create new Activites)// 117 +* **competentItrivioIntegration.auth.userId=2** 118 +//(ID of user in whose name the authorisation of running the course will be done?)// 119 +* **competentItrivioIntegration.auth.key=** 120 +//(secret key for JWT token)// 121 +* **competentItrivioIntegration.auth.environment=demo** 122 +//(authentication environment, used in JWT token I think)// 113 113 114 -In the application.properties, or in your own application-yourNameShortcut.properties file set the following propeties: 115 - 116 -{{code language="properties"}} 117 -#-# set to true if enabled 118 -competentItrivioIntegration.enabled=true 119 - 120 -#-# itrivio company url context, leave empty if company has no url context 121 -competentItrivioIntegration.itrivioCompanyUrlContext=<COMPANY_URL> 122 - 123 -#-# url of iTrivio app (for integration API communication - accessible from Competent server location) 124 -competentItrivioIntegration.url=http://localhost:8080/ 125 - 126 -#-# url of iTrivio app (for generating user links - accessible from browser of users) 127 -competentItrivioIntegration.linkUrl=http://localhost:8080 128 - 129 -#-# integrated iTrivio db company ID 130 -competentItrivioIntegration.itrivioCompanyId=<COMPANY_ID> 131 - 132 -#-# -------------- COMPETENT INTEGRATION ------------ 133 -#-# --- From Competent to iTrivio synchronization --- 134 - 135 -#-# iTrivio db user ID, which will be used as a creator iTrivio ID when creating new users in iTrivio 136 -competentItrivioIntegration.userCreatorItrivioUserId=<ADMIN_USER_CREATOR> 137 - 138 -#-# iTrivio db user ID, which account will be used to perform actions in iTrivio (such as creating courses and users) 139 -competentItrivioIntegration.auth.userId=<ADMIN_CREATOR> 140 - 141 -#-# need to be same as "environment.id" property in iTrivio "settings.properties" file 142 -competentItrivioIntegration.auth.environment=PROD 143 - 144 -#-# need to be same as "jwt.key" property in iTrivio "settings.properties" file 145 -competentItrivioIntegration.auth.key=CHANGE_ME 146 - 147 -#-# -------------- COMPETENT INTEGRATION ------------ 148 -#-# --- From iTrivio to Competent synchronization --- 149 - 150 -#-# competent db subtype ID, which will be used when creating new Users in Competent 151 -competentItrivioIntegration.newUserSubtypeId=<USER_SUBTYPE> 152 - 153 -#-# competent db subtype ID, which will be used when creating new Activities in Competent 154 -competentItrivioIntegration.newActivitySubtypeId=<ACTIVITY_SUBTYPE> 155 - 156 -#-# competent db activitySet (folder) ID, which will be used when creating new Activities in Competent as parent folder ID 157 -competentItrivioIntegration.newActivityTargetFolderId=<ACTIVITY_FOLDER> 158 -{{/code}} 159 - 160 160 = iTrivio part = 161 161 162 -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. 163 163 164 - Fill in the settingsCOMPETENT_INTEGRATION_XXX:127 +Run the url [[http:~~/~~/localhost:8080/(companyUrl/)setCompanyConfig.html>>url:http://localhost:8080/setCompanyConfig.html?locale=cs]] of course on the domain your iTrivio runs and with the companyUrl of the comany you are setting this for. 165 165 166 -* **COMPETENT_INTEGRATION_ENABLED// //**//check the box to be set to true// 167 -* **COMPETENT_INTEGRATION_TARGET_FOLDER_ID** = <COURSE_FOLDER> 168 -* **COMPETENT_INTEGRATION_API_URL **//(url where Competent is running eg.: //[[http:~~/~~/localhost:9000/>>url:http://localhost:9000/]]//)// 169 -* **COMPETENT_INTEGRATION_USERGROUP_ID** = <USERGROUP> 170 -* **COMPETENT_INTEGRATION_COURSE_TEMPLATE** = <PLAYER_TEMPLATE> 129 +Fill in the settings COMPETENT_INTEGRATION_: 171 171 172 -Save the setting with the **Odeslat **button (nothing visible will happen, don't be worried, it was saved) 131 +* **COMPETENT_INTEGRATION_ENABLED**// (set to true)// 132 +* **COMPETENT_INTEGRATION_TARGET_FOLDER_ID **//(ID of folder in iTrivio in which to create new Activites)// 133 +* **COMPETENT_INTEGRATION_API_URL **//(url where competent is running eg.: //[[http:~~/~~/localhost:9000/>>url:http://localhost:9000/]]//)// 134 +* **COMPETENT_INTEGRATION_USERGROUP_ID **//(ID of usergroup in iTrivio in which new users will be created)// 135 +* **COMPETENT_INTEGRATION_COURSE_TEMPLATE **//(optional - ID of course template in which new courses will be created)// 173 173 174 - Now openthefile "/com.itrivio/src/main/resources/settings.properties"and set the two following properties:137 +//(Save the settings... )// 175 175 176 -{{code language="properties"}} 177 -# custom environment name, e.g. PROD,DEV,TEST... (must match the competentItrivioIntegration.auth.environment property from Competent) 178 -environment.id=PROD 139 +Now open the file /com.itrivio/src/main/resources/settings.properties and set the two following properties: 179 179 180 -# secret part of you JWT key - used for communication with the Competent system and creating auto-login links 181 -# see also jwt.expiration 182 -# (must match the competentItrivioIntegration.auth.key property from Competent) 183 -jwt.key=aaasssddd 184 -{{/code}} 141 +**environment.id=croco**// (must match the **competentItrivioIntegration.auth.environment** property from Competent)// 142 +**jwt.key=CCzzzQYDR1HTdfe67zoa **//(must match the **competentItrivioIntegration.auth.key** property from Competent)// 185 185 186 186 = Final setting test = 187 187 188 -* Now run both Apps, **but do not touch iTrivio app** apart from making changes in the course creator tool when redirected there from Competent. 189 -* Log into Competent, go to the Admin view to the Activities page. 190 -* Create an Activity (of whatever subtype) and go to it's tab Details 191 -* Edit the Launch type property, set it to iTrivio and hit the Save and Create in iTrivio button 192 -* If you get any errors, check the configuration if all is set properly 193 -* Click the Edit button 194 -* Go to Competent, create some Activity and in Detail, set the RUN_TYPE (Typ spouštění) to iTrivio, then select in type and hit **Save and Create in iTrivio** button. If it works, you are almost good to go. Now try to Edit the course, add one page and then try to run it. if THAT works, you are all set. 146 +Thats it, you should be good to go. Now run both Apps, DO NOT TOUCH ITRIVIO FROM NOW ON. Go to Competent, create some Activity and in Detail, set the RUN_TYPE (Typ spouštění) to iTrivio, then select in type and hit **Save and Create in iTrivio** button. If it works, you are almost good to go. Now try to Edit the course, add one page and then try to run it. if THAT works, you are all set.