During the installation of the Moodle extension in your Zoho CRM, custom fields will be created in modules for easy operating and usage during the sync.
Moodle Role: dropdown values (Student, Teacher).
Moodle ID: INT
Moodle Username: text
Moodle Password: Text
Enrol Status: dropdown values (Pending, Approved).
Course Name: Lookup of Products module
Moodle ID: INT
Deals (Enrolments) Sync:
After the field of ‘Enrol Status’ within the Deals (Enrolments) module changes into ‘Approved’ or is created with an “Approved” value, the process to enroll a Moodle user under a course will be initiated. The course lookup from the Products module and Contact lookup field for a student/teacher (moodle user) is mandatory.
The extension helps to check if the Contact is present in Moodle as an user and if the course (lookup from Products module) is added to Moodle as a course of not. After a successful check and coming across an unique contact, a Moodle user ID & password will be automatically generated for the contact in the module and save user ID in “Moodle ID”, password in “Moodle Password” CRM fields.
As soon as a student/teacher is enrolled, they will get an email notification with a unique Moodle user ID and password from the CRM Deals module.
Grades Sync (Custom Module):
After a student successfully completes his/her course, the grades are visible in Moodle by clicking on the “Sync Grades” button. The grades will sync to the custom module from Moodle for a Contact (grade_get_course_grade($userid, $couseid)) and is also added in the Contact module as a related list.
Extension Setting Widget:
The configure tab will showcase a window with two more tabs - Moodle Settings and Moodle Field Mapping. The Moodle Settings tab will contain two input fields - one is for moodle API URL and another is for moodle token and a save button. After getting user input, it’ll save as an organization variable against extension. And the field mapping tab will facilitate users to map CRM fields into moodle.
The extension works from the Deals module. Two vital parts of information are needed to have a successful enrolment first - Moodle user (Student/Teacher) details which are derived from the Contacts module, second - Course details which are derived from the Products module. If a Moodle user and course details persists, a user can be created/updated from the Deals module using two methods:
The enrol status is “Approved” in the Deals module.
Enrol Status field changes to “Approved”.
As a result of the above, the user will get enrolled under the course which is associated with the Deals module as Course Name (Product).
After the successful conversion of a Moodle user to Moodle ID, username to Moodle Username, password to Moodle Password, the Contacts module will save all the details.
If a new course is added, the course ID from Moodle will be saved as Moodle ID in the Products module.
If an email address is already registered in Moodle as an existing user, the user details is then updated to the Contact module instead of creating a new one. The same function applies if there is already an existing course registered, it is then updated in the Products module. This avoids duplication of data.
Exception/Error/misleading queries will create a Note in Deal/Contact module.
By clicking the “Sync Grades” button of the widget in the top right corner in the Deals module, a grade report will automatically save into the Grades (Custom Module), The report will save it as the Grade name and the Grade ID will be saved as Moodle ID.
Screenshot-1: Moodle Settings page for Moodle users with access
Screenshot-2: Moodle fields mapping with CRM module (Contacts, Deals, Products) fields.
Screenshot-4: Sync enrolled users grades in Zoho CRM Grades module
Screenshot-5: Error will save into Deals module Notes.
Moodle fields are predefined can’t be altered from user’s end.
Managing dividation of Moodle widget functionality as a single widget.