Bi-direction integration of openSIS and Moodle.

Moodle Integration Settings in openSIS

To start using the bi-directional integration feature of openSIS and Moodle, you have to set it up first. Navigate to Main Menu>>LMS>>LMS Settings

The first thing you will notice is this information bar. As it is mentioned here, the openSIS + Moodle integration will only work when your Moodle instance is online and publicly available via the internet. Access via VPN or locally hosted Moodle cannot be connected to openSIS.

The rest of the Settings page looks like this:

If you are subscribing to a hosted Moodle instance, you must have  permission to upload plugins.
If your provider does not allow you to upload third party plugins, this integration will not function.
If you are hosting your own Moodle instance, make sure you have provided Read-Write permission to the Moodle folder, otherwise you will get an authentication error as shown below:

Download the two plugins by clicking on the link. Follow the instructions below to upload, install the plugins, and enable a few items that are necessary.
  1. Login into Moodle as a site administrator, click on the Site administration tab from  the left menu.
  2. Then click on the Plugins tab. Then click the “Install plugins” link.
  3. Install manually two plugins i.e. openSIS-Moodle-User-Authenticator.zip and  openSIS-Web-Services.zip.
  4. Drag and drop or select manually the plugins on the “ZIP package” section. Then enter  the “Install plugin from the ZIP file” button.
  5. After installing both plugins, go to Plugins → Authentication and click on the “Manage  Authentication” link.
  6. Then, enable “User key authentication”. This can be done by clicking on the “eye” icon  link.
  7. Then click “settings” under “User key authentication”, set the “Mapping field” value to  “Email address”, and the “User key life time” to 120. Then click on the Save changes  button.
  8. Then, enable “Web services authentication” from Site Administration → Plugin → Authentication → Manage authentication . This can be done by clicking on the “eye” icon  link.
  9. Click again on the Plugins tab and click on the “External Services” link under the “Web  services” plugin section (Note: In some Moodle, the “Web services” menu isn’t listed  under the “Plugins” tab. In that case, you may find it in the “Server” tab).  Add an external service (Name: “opensis”).
  10. Need to check the following fields: “Enabled”, “Can download files”, and “Can upload  files”. Don’t check the “Authorized users only” field.
  11. Now enable web services. To do this, go to Site administration and click on the “General”  tab and then click on the “Advance features” link. Then, check if the “Enable web  services” checkbox is checked. If not checked, check it to enable web services.
  12. Go to Plugins/Server → External service. Then click on the “Authorized users” link under  the “User key authentication web service”. Add the Moodle admin user as an  Authorized User.
  13. Click again on the Plugins/Server tab and check if “REST protocol” is enabled or not  under the “Manage protocols“ section. If this is not enabled, then enable it.
  14. After step 9, add some functions to the newly created external service - “opensis”. Click  on the “Functions” link under “opensis” external service. Then click on the “Add  functions“ button and add the following function names:
  1. 14.1. auth_userkey_request_login_url
  2. 14.2. core_course_create_categories – Create categories
  3. 14.3. core_course_create_courses – Create new courses
  4. 14.4. core_course_get_contents – get course content (modules + web service file URLs)
  5. 14.5. core_course_update_categories – update categories
  6. 14.6. core_course_update_courses – Update courses
  7. 14.7. core_role_assign_roles – Manual role assignments
  8. 14.8. core_user_create_users – Create users - admin function (In opensis we are  creating teacher as Moodle editing teacher whose “roleid” in Moodle is 3 &  student as Moodle student whose roleid in Moodle is 5)
  9. 14.9. core_user_delete_users – Delete users - admin function
  10. 14.10. core_user_get_users – Search users. - If you want to get multiple users for one  specific field, use core_user_get_users_by_field(), it's designed for this purpose  and it should be faster
  11. 14.11. core_user_get_users_by_field – Retrieve users information for a specified unique  field - If you want to do a user search, use core_user_get_users()
  12. 14.12. core_user_update_users – Update users
  13. 14.13. enrol_manual_enrol_users – Manual enrol users
  14. 14.14. enrol_manual_unenrol_users – Manual unenroll users
  15. 14.15. gradereport_user_get_grade_items – Returns the complete list of grade items  for users in a course
  16. 14.16. local_get_assignment_information
  17. 14.17. local_get_course_information
  18. 14.18. local_get_schedule_information
  19. 14.19. local_get_users_information
  20. 14.20. mod_lesson_get_lessons_by_courses – Returns a list of lessons in a provided list  of courses, if no list is provided all lessons that the user can view will be returned
  21. 14.21. mod_quiz_get_quizzes_by_courses – Returns a list of quizzes in a provided list of  courses, if no list is provided all quizzes that the user can view will be returned
  22. 14.22. core_course_delete_courses – delete courses
  23. 14.23. core_course_delete_categories – delete categories
  24. 14.24. core_enrol_get_users_courses - Get the list of courses where a user is enrolled in
  25. 14.25. mod_assign_get_assignments - Returns the courses and assignments for the  user's capability
  26. 14.26. gradereport_overview_get_course_grades - Get the given user courses final  grades
  27. 14.27. core_enrol_get_enrolled_users - Get enrolled users by course id
  28. 14.28. local_get_grade_category_information - Get list of grade categories by course
  29. 14.29. local_get_grade_category_by_module - Get list of grade category by module
  30. 14.30. gradereport_user_get_grades_table - Get the user’s report grades table for a  course
  31. 14.31. core_webservice_get_site_info - Returns some site info
Finally, create two tokens for both of the plugins. To do this go to Plugins/Server → Web  services . Then click on the “Manage tokens“ link and create two tokens. One for “ User key authentication web service ” and another for “ opensis ” services. Click on add button and choose user and service and submit the “Save changes” button.

The tokens and the Moodle server URL will be required to be entered inside the openSIS  application under the configuration section. Only the Super Administrator has access to do so.



Once you complete step number 2, steps 3 and 4 will become visible. Test the connection by clicking on Connect. If the integration is properly configured, it will show you the Moodle server's build and version number.
The connection details will vanish after some time, but it won't mean that the Moodle server is disconnected. You can click on Connect anytime to check the connection details.



Finally, turn the Enable Synchronization switch on. Keep it on for the synchronization to work.



Go to the Main Menu>>LMS>> Go to LMS via SSO and try out the connection. It should automatically log you in to your Moodle instance as an administrator.



Students and Teachers will be able to use the SSO login also.

Now that you have successfully completed the integration setup, follow this article on how to use the openSIS + Moodle integration.



    • Related Articles

    • Using Moodle LMS with openSIS

      If you have configured the Moodle integration steps following the previous instructions, you are now ready to use the LMS from within openSIS. Integration Points openSIS to Moodle All Students and Staff records are synced so that users can use SSO ...
    • How to Map Custom Fields from Moodle to openSIS

      When integrating Moodle with openSIS, only basic fields such as First Name, Middle Name, Last Name, Login Email, and Phone are retrieved by default. However, in Moodle, you may create custom fields for users, and similarly, you can create custom ...
    • How to Get Data from Moodle into openSIS

      When schools implement openSIS after they have been using Moodle, that Moodle data needs to be synchronized into openSIS before starting transactions with the integrated products. openSIS provides seamless integration with Moodle, enabling schools to ...
    • How to Add an Extra Field for Capturing Student Behavior Infractions in openSIS

      When recording a behavior infraction for a student in openSIS, it’s important to capture all relevant details accurately. Sometimes, the default fields provided may not cover all the information you need. In such cases, you can add an extra field to ...
    • How to Set Up Subscriptions in openSIS

      What is a Subscription? A subscription is a recurring payment charged to a user at specified intervals. In openSIS, this feature enables schools to set up automatic deductions of subscription fees from student accounts. For the system to work ...