LMS setup · All Moodle guides
- Register RollWise in Moodle
- Add the Moodle configuration in the Control Center
- Launch RollWise in Moodle and check the roster
- Create a web service token
- Add the Moodle API integration in the Control Center
- Check group sync
- Moodle setup checklist
- Moodle troubleshooting
- Moodle role settings for teachers without editing rights
Create a web service token
Set up a RollWise web service, a RollWise user with only the permissions it needs, and a token. Optional, for group sync, the Engagement tab and group limits.
The short version
Site administration then Server then Web services then Manage tokens then Create token
The tool registration covers launches, the roster and grades. Group sync, the Engagement tab and group limits (which groups a teacher without editing rights may see) go through Moodle's web services, which need a token.
This part is optional. Without it, attendance, the roster and grade push still work. But in a course set to Separate groups, a teacher without editing rights then sees every student in RollWise, because RollWise cannot ask Moodle which groups they may see.
Turn on web services and create the service
Enable web services and REST
Go to Site administration, Server, Web services, Overview, and follow the list there to enable web services and the REST protocol.
Add the RollWise service
Go to Site administration, Server, Web services, External services and click Add. Name it RollWise, tick Enabled and Authorised users only, then click Add service.
Add all fourteen functions
On the new service, click Functions, then Add functions, and add each of these:
core_webservice_get_site_info core_enrol_get_enrolled_users core_group_get_course_groups core_group_get_group_members core_course_get_courses_by_field core_course_get_course_module_by_instance core_group_get_activity_allowed_groups mod_assign_get_assignments mod_assign_get_submissions mod_quiz_get_quizzes_by_courses mod_quiz_get_user_quiz_attempts mod_forum_get_forums_by_courses mod_forum_get_forum_discussions mod_forum_get_discussion_postsThe first two check the connection and read the course's students. The two group functions serve group sync. The two course functions and the allowed groups function serve group limits. The assignment, quiz and forum functions serve the Engagement tab.
Pick the exact names. Moodle lists look alike functions next to these. The most common mistake is core_enrol_get_enrolled_users_with_capability instead of core_enrol_get_enrolled_users. The Engagement tab then shows Your LMS didn't allow this.
Create the RollWise user
Turn on web services authentication
Go to Site administration, Plugins, Authentication, Manage authentication and enable Web services authentication with its eye icon. An account using it can call web services with its token but cannot sign in to Moodle's web pages.
Add the user
Go to Site administration, Users, Add a new user:
- Username: rollwise.
- Choose an authentication method: Web services authentication.
- Password: any strong password. Nobody signs in with it.
Click Create user. The form has no role field; you give the role next.
Give the user only the permissions it needs
RollWise does not need the Manager role or any other standard role. Choose one of two options:
| Option A: one role | Option B: two roles | |
|---|---|---|
| RollWise can read | every course on the site | only the course categories you choose |
| Setup | simpler | a little more work |
The sixteen permissions both options use:
| Type in Filter | Allow this row |
|---|---|
webservice/rest:use | Use REST protocol |
moodle/course:view | View courses without participation |
moodle/course:viewparticipants | View participants |
moodle/course:managegroups | Manage groups |
mod/assign:view | View assignment |
mod/assign:viewgrades | View grades |
mod/quiz:view | View quiz information |
mod/quiz:viewreports | View quiz reports |
mod/forum:viewdiscussion | View discussions |
mod/forum:viewqandawithoutposting | Always see Q and A posts |
moodle/user:viewdetails | View user profiles |
moodle/site:accessallgroups | Access all groups |
moodle/course:viewhiddencourses | View hidden courses |
moodle/course:viewhiddenactivities | View hidden activities |
mod/lti:view | Launch external tool activities |
moodle/course:ignoreavailabilityrestrictions | Ignore availability restrictions |
Type each code into the Filter box and set Allow only on the row whose grey code line matches exactly. Leave every other row on Not set. Why each one matters is in Moodle troubleshooting.
Option A: one role for the whole site
- Go to Site administration, Users, Permissions, Define roles and click Add a new role.
- Set Use role or archetype to No role and click Continue.
- Short name rollwise_integration, custom full name RollWise integration.
- Under Context types where this role may be assigned, tick System only.
- Allow all sixteen permissions above, then click Create this role.
- Go to Site administration, Users, Permissions, Assign system roles, choose RollWise integration and add the rollwise user.
Option B: two roles, limited to chosen categories
Moodle accepts the web service permission only at site level, so it goes in its own role.
- Web service role. Add a new role as in Option A with short name rollwise_ws, custom full name RollWise web service, context System only, and allow only Use REST protocol.
- Data role. Add a second role with short name rollwise_integration, custom full name RollWise integration, context Category only, and allow the other fifteen permissions.
- Assign the web service role at site level in Assign system roles: choose RollWise web service and add the rollwise user.
- Assign the data role on each category. From the site home open Courses and click the category name. In the category's menu (under More if it is not shown), choose Assign roles, then RollWise integration, and add the rollwise user. Repeat for every category RollWise should serve.
Option B limits RollWise on purpose. In courses outside those categories, RollWise still launches and takes attendance, but group sync and the Engagement tab do not work. The actions menu on Manage courses and categories offers Permissions, not Assign roles; that is a different page.
Authorize the user and create the token
Authorize the user on the service
Go to Site administration, Server, Web services, External services, click Authorised users next to RollWise and add the rollwise user.
Check the Missing capabilities list
Under the user's entry, Moodle lists any permissions it thinks are missing.
- Option A: none of the sixteen may be listed. If one is, the role is missing it or is not assigned.
- Option B:
webservice/rest:usemust not be listed. The fifteen data permissions may appear; that is expected, because this page checks site level and you assigned them on categories. - The list never shows
mod/lti:viewormoodle/course:ignoreavailabilityrestrictions. Check those two by hand on the role. - Moodle may list others, such as
moodle/user:update. RollWise does not need them, so do not add them.
Create the token
Go to Site administration, Server, Web services, Manage tokens and click Create token. Choose user rollwise and service RollWise, set no expiry, then click Save changes.
Copy the token straight away
Moodle shows it only once. If you miss it, delete the token and create a new one. You paste it into the Control Center in the next guide.