Please note that this Moodle plugin is different from the single sign on plugin. This plugins allows for deep communication with Moodle. Below are the current features.
A thank you goes out to Jose Alexander Finol for his code contributions to make this plugin better.
- When subjects are created, a category is created in Moodle.
- When course sections are created, a course is created in Moodle.
- When course sections are updated, the course is updated in Moodle.
- When a user is created (FAC, STU or APL person type) or an application is submitted, the user is created in Moodle.
- When a user is updated, the user is updated in Moodle.
- When a user updates his/her password or a staff member resets the password, the password is reset or updated in Moodle.
- When a student registers for a course, the student will be enrolled into the Moodle course with the student role.
- When a staff member registers a student into a course, the student will be enrolled into the Moodle course with the student role.
- When a staff member batch registers a group of students, those groups of students will be enrolled into the Moodle course with the student role.
- When a faculty member is added to the course section, the faculty will be enrolled in the Moodle course with the teacher role.
Before you get started with setting up the Moodle plugin and Moodle services, there are few things to keep in mind in order for the integration and communication to work properly between Moodle user => eduTrac SIS student, and Moodle course => eduTrac SIS course section.
- The user’s username in Moodle, must match the username in eduTrac SIS.
- The ID Number field for the course in Moodle must match the course section name in eduTrac SIS.
This is also good to know in case you are already using Moodle, but would like to connect your current Moodle courses to the corresponding course sections in eduTrac SIS.
Configure Web Services
- Go to Home > Site administration > Advanced features. Mark the “Enable web services” option. Click “Save changes”.
- Go to Home > Site administration > Plugins > Web services > Manage protocols. Enable the REST protocol (by clicking on the marker in the “Enable” column). Click “Save changes”.
Create a Web Service
- Go to Home > Site administration > Plugins > Web services > External services. Click “Add”. Specify a name (for example, eduTrac) and mark the “Enabled” box.
- Add functions to the newly created web service. Go to Home > Site administration > Plugins > Web services > External services and click on the Functions link in the Functions column of the user you just created. Click “Add functions”. You need to add the following functions:
- Create a user to access web services by going to Home > Site administration > Users > Accounts > Browse list of users. Click the “Add a new user” link. Create a user, with all default values. For example, Name: Web Service and Username: web_service_user. Also, make sure that for the “Choose an authentication method”, you select “Manual accounts”.
- Go to Home > Site Administration > Users > Permissions > Define roles. Create a new role, and name it “Web Service Role” and give it the short name web_service_role.
- Now we need to assign capabilities to this role. It is critical for this role to have all the required capabilities in order to execute the functions above. When a capability is missing, Moodle generates and catches exceptions internally, leaving you in the dark about what may be wrong. Here is a list of capabilities we need:
- Assign web_service_user account to the “Web Service Role” role by going to Home > Site administration > Users > Permissions > Define roles. Click on the “Web Service User” and add the web_service_role to the role on the next page. This makes web_service_user to have the capabilities assigned to the “Web Service Role” role in the previous steps.
- Now, we need to make the Web Service User an administrator. This is necessary in order to see more details via the REST endpoints. Navigate to Home > Site administration > Users > Permissions > Site Administrators. Select Web Service User on the right, and click the Add button to move the user to the left. Now, the Web Service User is an administrator. By now we have a Moodle account with the capabilities necessary to execute our functions.
- Create a token to access web service (we’ll need it for the plugin settings). Go to Home > Site administration > Plugins > Web services > Manage tokens. Click “Add”. Select the Web Service user, a service (eduTrac) and generate token.
When you activate the Moodle plugin in eduTrac, enter this token in the Moodle API Token field, and lastly add the url to your Moodle Install in the Moodle URL field. Do *not* enter a backslash “/”.
Q. What if I created subjects in eduTrac SIS before activating the Moodle plugin?
A. There really isn’t a one to one connection between subjects and categories. Categories are there when you create a course section because categories in required when creating Moodle courses. So, if you created your subjects before activating the plugin, all you need to do is head over to your Moodle install, and create the categories you need.
Q. What if I created course sections in eduTrac SIS before activating the Moodle plugin?
A. If you created course sections before activating the Moodle plugin, copy the course section (i.e. 16/SP-MATH-1001-01), and paste it into the Course ID number field when editing the course in Moodle.
- Updated actions and filters.