Aaronw/Quick Mnet setup: Difference between revisions
From Mahara Wiki
< User:Aaronw
(Created page with "In working on the Mahara assignment submission plugin & Mahara assignment feedback plugin for Moodle, I've had to set up Mnet lots and lots of times. I've gotten pretty quick at …") |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
# Set up MNet roaming between a Moodle & Mahara site | # Set up MNet roaming between a Moodle & Mahara site | ||
# Set up the Mahara assignment plugin for Moodle | # Set up the Mahara assignment plugin for Moodle | ||
== The outline version == | |||
Most of the steps are on the Moodle side. | |||
# Moodle: Enable networking (Advanced Features) | |||
# '''Mahara''': Enable networking (Configure site -> Networking) | |||
# '''Mahara''': Set up an XML-RPC authentication instance that goes to your Moodle site | |||
# Moodle: Create an MNet host for your Mahara site (Networking -> Manage Peers) | |||
# Moodle: Tick all the services boxes for the Mnet host | |||
# Moodle: Enable the Mnet authentication plugin | |||
# Moodle: Allow the "Roam to a remote application via ment" permission for the "Authenticated Users" role | |||
# Moodle: Create a student user | |||
# Moodle: Create a course to put MNet content in | |||
# Moodle: Add a "Network Servers" block to the course | |||
# Moodle: Add an "Assignment" activity to the course, and add the "Mahara" submission type | |||
# Moodle: Enrol the student in the course. Enrol yourself in the course as a teacher. | |||
== The detailed version == | |||
Throughout these instructions, I'll list relative links to some of the admin pages you'll need to access. If you're running through this process repeatedly, you may wish to make a list of this links, put your sitename in front of it, and use those as a shortcut to get to the necessary admin pages instead of navigating there through the menu. | |||
There are also a couple of steps that can be configured via the config.php file, as noted. | |||
=== In Mahara === | === In Mahara === | ||
Line 9: | Line 32: | ||
1. Log in as an admin. Go to "Administration" -> "Configure site" -> "Networking" | 1. Log in as an admin. Go to "Administration" -> "Configure site" -> "Networking" | ||
* (aka <code>/admin/site/networking.php</code> ) | |||
* Set "Enable networking" to "Yes" | * Set "Enable networking" to "Yes" | ||
* (or in your Mahara config.php file, add <code>$cfg->enablenetworking=1;</code> and you can skip this step!) | |||
=== In Moodle === | === In Moodle === | ||
0. Get a Moodle instance. Again, clean install or configure existing install. The admin options here assume you're using Moodle 2.6; in other versions some things may be labelled differently. | 0. Get a Moodle instance. Again, clean install or configure existing install. The admin options here assume you're using Moodle 2.6; in other versions some things may be labelled differently. | ||
0.5. If you're testing the Mahara plugins for Moodle, then install those now. You may either install them by fetching them from git, or by using Moodle's facility to install them from the Moodle plugin database (Site administration -> Plugins -> Install plugins). | |||
1. Log in as an admin. Go to "Site administration" -> "Advanced Features". | 1. Log in as an admin. Go to "Site administration" -> "Advanced Features". | ||
* (aka <code>/admin/settings.php?section=optionalsubsystems</code> ) | |||
* Set "Networking" to "On" | * Set "Networking" to "On" | ||
* (or in your Moodle config.php file, add <code>$CFG->mnet_dispatcher_mode = 'strict';</code> and you can skip this step!) | |||
2. Go to "Site Administration" -> "Plugins" -> "Authentication" -> "Manage authentication" | |||
* (aka <code>/admin/settings.php?section=manageauths</code> ) | |||
* Tick the eye icon to enable the "MNet authentication" plugin | |||
3. Go to "Site Administration" -> "Users" -> "Permissions" -> "Define roles" | |||
* Tick the "edit" icon next to the "Authenticated user" role | |||
* (or go directly to <code>admin/roles/define.php?action=edit&roleid=7</code>) | |||
* Find the permission "Roam to a remote application via MNet" i.e. "moodle/site:mnetlogintoremote" | |||
** It's under the "System" permissions. | |||
* Tick "Allow" for this permission | |||
* Scroll to the bottom and click "Save changes" | |||
4. Go to "Site administration" -> "Networking" -> "Manage Peers" | |||
* (aka <code>/admin/mnet/peers.php</code> ) | |||
* Hostname: The URL to your Mahara site (doesn't have to end with a slash) | * Hostname: The URL to your Mahara site (doesn't have to end with a slash) | ||
* Application type: Mahara | * Application type: Mahara | ||
* Click "Save changes" | * Click "Save changes" or "Add host" | ||
5. It should now load up a screen showing the public key of your Mahara site. If it doesn,t make sure that the web server your Moodle site is on has HTTP/HTTPS access to the web server your Mahara site is on, and vice versa. | |||
* If it does show the public key, click "Save changes" | * If it does show the public key, click "Save changes" | ||
6. The page will reload, still showing the public key. You should now have some tabs on the top that say "Review host details", "Services", and "Profile fields" | |||
* Go to the "Services" tab and tick these boxes | * Go to the "Services" tab and tick these boxes | ||
* SSO (Identity Provider): Publish | * SSO (Identity Provider): Publish | ||
* SSO (Service Provider): Subscribe | * SSO (Service Provider): Subscribe | ||
* Assign Submission Mahara services: Subscribe '''and''' Publish | |||
* Click "Save changes" | * Click "Save changes" | ||
7. Create a student & teacher user in Moodle. | |||
* | * You can do this however you'd like, but I like to do this quickly using the "Upload users" tool at "Site administration -> Users -> Accounts -> Upload users" | ||
* (aka <code>/admin/tool/uploaduser/index.php</code> ) | |||
* ... and this CSV file: | |||
username,password,firstname,lastname,email | |||
teacher,passwords,Teach,Er,[email protected] | |||
student,passwords,Stu,Dent,[email protected] | |||
8. Create a course. | |||
* | * Enrol the teacher in the course as a teacher | ||
* Enrol the student in the course as a student | |||
* | |||
9. Log out as admin. Log in as the teacher user. Navigate to the course. | |||
10. Add a "Network servers" block to the course page | |||
* If you don't have an option for the "Network servers" block, make sure that you've carried out all the above steps | * If you don't have an option for the "Network servers" block, make sure that you've carried out all the above steps | ||
** Enabling Networking | ** Enabling Networking | ||
Line 54: | Line 97: | ||
** Setting the "moodle/site:mnetloginremote" permission to "Allow" | ** Setting the "moodle/site:mnetloginremote" permission to "Allow" | ||
11. If you're testing the Mahara assignment submission plugin: | |||
* Add an "assignment" activity to the course. | |||
* In the assignment's "Submission types" section, make sure "Mahara portfolio" is ticked. | * In the assignment's "Submission types" section, make sure "Mahara portfolio" is ticked. | ||
Line 62: | Line 106: | ||
1. Go to "Administration" -> "Institutions" | 1. Go to "Administration" -> "Institutions" | ||
* (aka <code>/admin/users/institutions.php</code> ) | |||
2. Create an institution (or edit an existing one) | 2. Create an institution (or edit an existing one) | ||
Line 71: | Line 116: | ||
* Authority name: Name displayed to admins to describe this auth instance | * Authority name: Name displayed to admins to describe this auth instance | ||
* WWW root: The URL of your Moodle site | * WWW root: The URL of your Moodle site | ||
* Site name: | * Site name: Display name of the Moodle site (Used in the "Roam back to ____" message) | ||
* Application: Moodle | * Application: Moodle | ||
* Parent authority: Internal is a good choice | * Parent authority: Internal is a good choice | ||
Line 89: | Line 134: | ||
3. You should roam through to your Mahara site. There'll be a sideblock that says "You have logged in from (site name you entered into Moodle)". Clicking on that link should take you back to Moodle | 3. You should roam through to your Mahara site. There'll be a sideblock that says "You have logged in from (site name you entered into Moodle)". Clicking on that link should take you back to Moodle | ||
4. | 4. In a second browser window, log in to Moodle as the student user. | ||
* I like to use Firefox's "New Private Window" for this. | |||
* I believe Chrome's "Incognito Window" feature may also work | |||
* Or just open Chrome and Firefox both. | |||
5. | 5. As the student user, go to the course with the "Network Servers" block. Roam across to Mahara and create some pages and/or collections. | ||
6. | 6. Still as the student user, return to Moodle. Go into the assignment activity you created earlier as an admin. When you go to edit your submission, you should see an option to choose one of your Mahara pages (and/or collections) | ||
* You should also be able to link through to your pages and view them. | * You should also be able to link through to your pages and view them. | ||
* Note that one important test-case is to test what happens if you try to do this but you don't have any pages or collections in Mahara | * Note that one important test-case is to test what happens if you try to do this but you don't have any pages or collections in Mahara. | ||
7. Pick a Mahara page (or collection) for your submission, and submit your submission in Moodle. | 7. Pick a Mahara page (or collection) for your submission, and submit your submission in Moodle. | ||
Line 101: | Line 149: | ||
* This means that if you roam over to Mahara, you should not be able to edit or delete the page | * This means that if you roam over to Mahara, you should not be able to edit or delete the page | ||
8. Now | 8. Now look at the first window, where you are still logged in as the teacher. | ||
9. View the assignment. | |||
* You should see a gradebook | * You should see a gradebook | ||
* The gradebook should have a link to the submitted page for the student | * The gradebook should have a link to the submitted page for the student | ||
* If you click the link to grade the student's submission, the grading page should also have a link to the submitted page | * If you click the link to grade the student's submission, the grading page should also have a link to the submitted page |
Latest revision as of 17:53, 7 December 2015
In working on the Mahara assignment submission plugin & Mahara assignment feedback plugin for Moodle, I've had to set up Mnet lots and lots of times. I've gotten pretty quick at it. Here is basically what you have to do to:
- Set up MNet roaming between a Moodle & Mahara site
- Set up the Mahara assignment plugin for Moodle
The outline version
Most of the steps are on the Moodle side.
- Moodle: Enable networking (Advanced Features)
- Mahara: Enable networking (Configure site -> Networking)
- Mahara: Set up an XML-RPC authentication instance that goes to your Moodle site
- Moodle: Create an MNet host for your Mahara site (Networking -> Manage Peers)
- Moodle: Tick all the services boxes for the Mnet host
- Moodle: Enable the Mnet authentication plugin
- Moodle: Allow the "Roam to a remote application via ment" permission for the "Authenticated Users" role
- Moodle: Create a student user
- Moodle: Create a course to put MNet content in
- Moodle: Add a "Network Servers" block to the course
- Moodle: Add an "Assignment" activity to the course, and add the "Mahara" submission type
- Moodle: Enrol the student in the course. Enrol yourself in the course as a teacher.
The detailed version
Throughout these instructions, I'll list relative links to some of the admin pages you'll need to access. If you're running through this process repeatedly, you may wish to make a list of this links, put your sitename in front of it, and use those as a shortcut to get to the necessary admin pages instead of navigating there through the menu.
There are also a couple of steps that can be configured via the config.php file, as noted.
In Mahara
0. Get a Mahara instance. For dev work this is often a clean install, or you can just configure an existing instance.
1. Log in as an admin. Go to "Administration" -> "Configure site" -> "Networking"
- (aka
/admin/site/networking.php
) - Set "Enable networking" to "Yes"
- (or in your Mahara config.php file, add
$cfg->enablenetworking=1;
and you can skip this step!)
In Moodle
0. Get a Moodle instance. Again, clean install or configure existing install. The admin options here assume you're using Moodle 2.6; in other versions some things may be labelled differently.
0.5. If you're testing the Mahara plugins for Moodle, then install those now. You may either install them by fetching them from git, or by using Moodle's facility to install them from the Moodle plugin database (Site administration -> Plugins -> Install plugins).
1. Log in as an admin. Go to "Site administration" -> "Advanced Features".
- (aka
/admin/settings.php?section=optionalsubsystems
) - Set "Networking" to "On"
- (or in your Moodle config.php file, add
$CFG->mnet_dispatcher_mode = 'strict';
and you can skip this step!)
2. Go to "Site Administration" -> "Plugins" -> "Authentication" -> "Manage authentication"
- (aka
/admin/settings.php?section=manageauths
) - Tick the eye icon to enable the "MNet authentication" plugin
3. Go to "Site Administration" -> "Users" -> "Permissions" -> "Define roles"
- Tick the "edit" icon next to the "Authenticated user" role
- (or go directly to
admin/roles/define.php?action=edit&roleid=7
) - Find the permission "Roam to a remote application via MNet" i.e. "moodle/site:mnetlogintoremote"
- It's under the "System" permissions.
- Tick "Allow" for this permission
- Scroll to the bottom and click "Save changes"
4. Go to "Site administration" -> "Networking" -> "Manage Peers"
- (aka
/admin/mnet/peers.php
) - Hostname: The URL to your Mahara site (doesn't have to end with a slash)
- Application type: Mahara
- Click "Save changes" or "Add host"
5. It should now load up a screen showing the public key of your Mahara site. If it doesn,t make sure that the web server your Moodle site is on has HTTP/HTTPS access to the web server your Mahara site is on, and vice versa.
- If it does show the public key, click "Save changes"
6. The page will reload, still showing the public key. You should now have some tabs on the top that say "Review host details", "Services", and "Profile fields"
- Go to the "Services" tab and tick these boxes
- SSO (Identity Provider): Publish
- SSO (Service Provider): Subscribe
- Assign Submission Mahara services: Subscribe and Publish
- Click "Save changes"
7. Create a student & teacher user in Moodle.
- You can do this however you'd like, but I like to do this quickly using the "Upload users" tool at "Site administration -> Users -> Accounts -> Upload users"
- (aka
/admin/tool/uploaduser/index.php
) - ... and this CSV file:
username,password,firstname,lastname,email teacher,passwords,Teach,Er,[email protected] student,passwords,Stu,Dent,[email protected]
8. Create a course.
- Enrol the teacher in the course as a teacher
- Enrol the student in the course as a student
9. Log out as admin. Log in as the teacher user. Navigate to the course.
10. Add a "Network servers" block to the course page
- If you don't have an option for the "Network servers" block, make sure that you've carried out all the above steps
- Enabling Networking
- Setting up an Mnet host with SSO services
- Enabling the Mnet auth plugin
- Setting the "moodle/site:mnetloginremote" permission to "Allow"
11. If you're testing the Mahara assignment submission plugin:
- Add an "assignment" activity to the course.
- In the assignment's "Submission types" section, make sure "Mahara portfolio" is ticked.
Back in Mahara
Now for users to be able to roam to Mahara, you need to set up an auth instance for Moodle in your Mahara site.
1. Go to "Administration" -> "Institutions"
- (aka
/admin/users/institutions.php
)
2. Create an institution (or edit an existing one)
3. Once the institution is created, you'll now be able to edit its "Authentication plugins" on its settings page.
- Add an "XML-RPC" instance
4. Fill in the details of your Moodle site into the popup
- Authority name: Name displayed to admins to describe this auth instance
- WWW root: The URL of your Moodle site
- Site name: Display name of the Moodle site (Used in the "Roam back to ____" message)
- Application: Moodle
- Parent authority: Internal is a good choice
- SSO direction: They SSO in
- Update user info on login: Yes
- We auto-create users: Yes
- We import content: Yes
- Click "Submit"
- Once the popup closes, it automatically saves the details to the DB and you don't actually need to save on the parent page.
Back in Moodle
1. Go to the course where you added a "Network Servers" block
2. You should see a link to your Mahara site. Click on it.
3. You should roam through to your Mahara site. There'll be a sideblock that says "You have logged in from (site name you entered into Moodle)". Clicking on that link should take you back to Moodle
4. In a second browser window, log in to Moodle as the student user.
- I like to use Firefox's "New Private Window" for this.
- I believe Chrome's "Incognito Window" feature may also work
- Or just open Chrome and Firefox both.
5. As the student user, go to the course with the "Network Servers" block. Roam across to Mahara and create some pages and/or collections.
6. Still as the student user, return to Moodle. Go into the assignment activity you created earlier as an admin. When you go to edit your submission, you should see an option to choose one of your Mahara pages (and/or collections)
- You should also be able to link through to your pages and view them.
- Note that one important test-case is to test what happens if you try to do this but you don't have any pages or collections in Mahara.
7. Pick a Mahara page (or collection) for your submission, and submit your submission in Moodle.
- Unless you're using the assignment "draft" settings, your Mahara page should now be locked from editing in Mahara
- This means that if you roam over to Mahara, you should not be able to edit or delete the page
8. Now look at the first window, where you are still logged in as the teacher.
9. View the assignment.
- You should see a gradebook
- The gradebook should have a link to the submitted page for the student
- If you click the link to grade the student's submission, the grading page should also have a link to the submitted page