Wiki source code of Competent - iTrivio integration
Version 7.1 by Petr Blšťák on 2020/04/30 02:37
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | (% class="box errormessage" %) | ||
2 | ((( | ||
3 | This section is currently under construction... please wait until is finished | ||
4 | ))) | ||
5 | |||
6 | = Software to be installed = | ||
7 | |||
8 | //Unless stated otherwise, newer stable versions of the program should work.// | ||
9 | |||
10 | ==== [[iTrivio 2.9.017>>doc:Main.Official manuals.iTrivio installation manual.WebHome]] ==== | ||
11 | |||
12 | ==== [[Competent 33>>doc:Main.Official manuals.Competent installation manual.WebHome]] ==== | ||
13 | |||
14 | |||
15 | = Introduction = | ||
16 | |||
17 | //On this page we use the term "Course" for both iTrivio courses and tests.// | ||
18 | |||
19 | The integration of Competent and iTrivio provides features from both softwares merged together and accessible through the Competent. | ||
20 | |||
21 | When specific objects are created in Competent, they are automatically created in iTrivio as well. Competent stores the ID references to the iTrivio objects in its database. | ||
22 | |||
23 | This applies to creation of: | ||
24 | |||
25 | * Users | ||
26 | * Courses (Activities with the specific launch type iTrivio) | ||
27 | * User-Course assignments | ||
28 | * User-Course attempts | ||
29 | |||
30 | iTrivio application is accessible only throught specific links in Competent when: | ||
31 | |||
32 | * editing a content of Course | ||
33 | * playing a Course | ||
34 | * displaying specific User-Course reports | ||
35 | |||
36 | 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. | ||
37 | |||
38 | 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. | ||
39 | |||
40 | (% class="box warningmessage" %) | ||
41 | ((( | ||
42 | **Modifying iTrivio directly (out of Competent platform) can cause synchronization issues, especially when manipulating with Users, Courses, User-Course attempts and assignments.** | ||
43 | ))) | ||
44 | |||
45 | The configuration below describes the basic scenario where | ||
46 | |||
47 | * both iTrivio and Competent are fresh installations | ||
48 | * login with the default iTrivio and Competent admin accounts were successfully tested | ||
49 | * Competent will be the main platform to handle course creation/deletion, user management and user-course management. | ||
50 | |||
51 | 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). | ||
52 | |||
53 | = Competent part = | ||
54 | |||
55 | |||
56 | in application.properties, or in your own application-yourNameShortcut.properties file set the following propeties: | ||
57 | |||
58 | * **competentItrivioIntegration.enabled=true** | ||
59 | //(true to allow the connection between apps)// | ||
60 | * **competentItrivioIntegration.itrivioCompanyUrlContext=/test** | ||
61 | //(url name of the company for which you are setting the connection, leave empty if the only company is the root)// | ||
62 | * **competentItrivioIntegration.url=http:~/~/localhost:8080/** | ||
63 | //(url of the iTrivio app)// | ||
64 | * **competentItrivioIntegration.linkUrl=http:~/~/127.0.0.1:8080** | ||
65 | //(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)// | ||
66 | * **competentItrivioIntegration.itrivioCompanyId=1** | ||
67 | //(Id of the company you are setting it for)// | ||
68 | * **competentItrivioIntegration.userCreatorItrivioUserId=2** | ||
69 | //(ID of the user - existing in the system - in whos name the courses will be created. Someone with Admin roles)// | ||
70 | * **competentItrivioIntegration.newUserSubtypeId=1** | ||
71 | //(ID of subtype of user in Competent? - for when creating new users - probably)// | ||
72 | * **competentItrivioIntegration.newActivitySubtypeId=2** | ||
73 | //(ID of subtype of Activity? - when creating new activities - probably)// | ||
74 | * **competentItrivioIntegration.newActivityTargetFolderId=20** | ||
75 | //(ID of folder in iTrivio in which to create new Activites)// | ||
76 | * **competentItrivioIntegration.auth.userId=2** | ||
77 | //(ID of user in whose name the authorisation of running the course will be done?)// | ||
78 | * **competentItrivioIntegration.auth.key=** | ||
79 | //(secret key for JWT token)// | ||
80 | * **competentItrivioIntegration.auth.environment=demo** | ||
81 | //(authentication environment, used in JWT token I think)// | ||
82 | |||
83 | = iTrivio part = | ||
84 | |||
85 | |||
86 | 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. | ||
87 | |||
88 | Fill in the settings COMPETENT_INTEGRATION_: | ||
89 | |||
90 | * **COMPETENT_INTEGRATION_ENABLED**// (set to true)// | ||
91 | * **COMPETENT_INTEGRATION_TARGET_FOLDER_ID **//(ID of folder in iTrivio in which to create new Activites)// | ||
92 | * **COMPETENT_INTEGRATION_API_URL **//(url where competent is running eg.: //[[http:~~/~~/localhost:9000/>>url:http://localhost:9000/]]//)// | ||
93 | * **COMPETENT_INTEGRATION_USERGROUP_ID **//(ID of usergroup in iTrivio in which new users will be created)// | ||
94 | * **COMPETENT_INTEGRATION_COURSE_TEMPLATE **//(optional - ID of course template in which new courses will be created)// | ||
95 | |||
96 | //(Save the settings... )// | ||
97 | |||
98 | Now open the file /com.itrivio/src/main/resources/settings.properties and set the two following properties: | ||
99 | |||
100 | **environment.id=croco**// (must match the **competentItrivioIntegration.auth.environment** property from Competent)// | ||
101 | **jwt.key=CCzzzQYDR1HTdfe67zoa **//(must match the **competentItrivioIntegration.auth.key** property from Competent)// | ||
102 | |||
103 | = Final setting test = | ||
104 | |||
105 | 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. |