Moodle

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.

  1. When subjects are created, a category is created in Moodle.
  2. When course sections are created, a course is created in Moodle.
  3. When course sections are updated, the course is updated in Moodle.
  4. When a user is created (FAC, STU or APL person type) or an application is submitted, the user is created in Moodle.
  5. When a user is updated, the user is updated in Moodle.
  6. When a user updates his/her password or a staff member resets the password, the password is reset or updated in Moodle.
  7. When a student registers for a course, the student will be enrolled into the Moodle course with the student role.
  8. When a staff member registers a student into a course, the student will be enrolled into the Moodle course with the student role.
  9. 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.
  10. 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.

  1. The user’s username in Moodle, must match the username in eduTrac SIS.
  2. 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

  1. Go to Home > Site administration > Advanced features. Mark the “Enable web services” option. Click “Save changes”.
  2. 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

  1. Go to Home > Site administration > Plugins > Web services > External services. Click “Add”. Specify a name (for example, eduTrac SIS) and mark the “Enabled” box.
  2. 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:
    1. core_cohort_create_cohorts
    2. core_course_create_courses
    3. core_course_get_categories
    4. core_course_create_categories
    5. core_user_get_users
    6. core_user_get_users_by_field
    7. core_user_create_users
    8. enrol_manual_enrol_users
    9. enrol_manual_unenrol_users (Only available in Moodle 3.0+)
    10. core_user_update_users
    11. core_course_get_courses
    12. core_course_update_courses

User

  1. 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”.
  2. 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.
  3. 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:
    1. moodle/user:create
    2. moodle/user:update
    3. moodle/webservice:createtoken
    4. moodle/user:editprofile
    5. moodle/category:manage
    6. moodle/category:viewhiddencategories
    7. moodle/cohort:assign
    8. moodle/cohort:manage
    9. moodle/course:create
    10. enrol/manual:enrol
    11. enrol/manual:manage
    12. enrol/manual:unenrol (Only available in Moodle 3.0+)
    13. moodle/course:changecategory
    14. moodle/course:changefullname
    15. moodle/course:changeidnumber
    16. moodle/course:changeshortname
    17. moodle/course:changesummary
    18. moodle/course:update
    19. moodle/course:useremail
    20. moodle/course:view
    21. moodle/course:viewhiddencourses
    22. moodle/course:visibility
    23. moodle/site:viewfullnames
    24. moodle/site:viewuseridentity
    25. moodle/user:viewdetails
    26. moodle/user:viewhiddendetails
    27. webservice/rest:use
  4. 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.
  5. 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.

API

  1. 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 SIS) and generate token.

When you activate the Moodle plugin in eduTrac SIS, 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.

moodle-crse-ID

1.1.0 (2017.07.11)

  • Revamped for release 6.3.0

1.0.9 (2016.01.12)

  • Updated actions and filters.
Submit your review
1
2
3
4
5
Submit
     
Cancel

Create your own review

Moodle Plugin
Average rating:  
 0 reviews
Tags