Difference between revisions of "Preparing Moodle 20"

From Joomdle
Jump to: navigation, search
(Activate Moodle's Network Authentication)
(Get auth token for Joomdle config in Joomla)
 
(11 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
{{Current Version}}
 
{{Current Version}}
  
<blockquote style="background-color:#FFECAF; padding:1em; border:1px solid #8FBC8F; font-size: 10pt">
 
<tt>Note: This document applies to the preparation of Joomdle with Moodle 2.0+  If you are installing Joomdle for Moodle 1.9+ please refer to this document [[Preparing Moodle 19|Preparing Moodle 1.9+ for Joomdle]]</tt>
 
</blockquote>
 
 
==Moodle 2 Prerequisites==
 
==Moodle 2 Prerequisites==
  
Line 17: Line 14:
 
{{End of Section}}
 
{{End of Section}}
  
==Networking Settings ==
+
==Configuring Moodle for Joomdle==
Ensure that Moodle's Networking Settings are on as in the picture below.
+
  
[[File:networking_settings_m20.jpg]]
+
In newest Joomdle versions, all required Moodle setup is done automatically when Joomdle package is installed.
{{End of Section}}
+
 
+
==Activate Moodle's Network Authentication==
+
Under Users/Authentication/Manage Authentication, activate the Moodle Network Authentication option by clicking on the "eye" and the greyed out words will now be clickable including the Settings link for that option.
+
 
+
[[File:networ_authentication_m20.jpg]]
+
 
+
 
+
Click on Settings to bring up the following screen and choose Yes
+
 
+
[[File:networ_authentication_m20-2.jpg]]
+
 
+
{{End of Section}}
+
 
+
==Setting up Moodle Web services==
+
 
+
Moodle 2.0 introduces a new Web Services approach to integration with external applications like Joomdle.  As such, beginning with Moodle 2.0, to integrate Joomdle with Moodle, you will need to complete the following steps to configure Moodle's Web services.
+
 
+
 
+
To make it easier Moodle  2, has created a Step-by-step table that you can following for configuring Moodle's Web Services.  This can be found here
+
 
+
 
+
Site Administration->Plugins->Web services->Overview.
+
 
+
 
+
[[File:wsoverview.png]]
+
 
+
 
+
{{End of Section}}
+
 
+
==Enable web services==
+
 
+
Enable Web Services.  The status should change to Yes
+
 
+
[[File:enablews.png]]
+
 
+
 
+
{{End of Section}}
+
 
+
==Enable protocols: XMLRPC==
+
 
+
Joomdle leverages XMLRPC to connect with Moodle.  Therefore, select 2. Enable Protocols from the table and enable XMLRPC.  You will need to ensure that your webhost has the PHP XMLRPC libraries loaded and enabled.  Refer to [[Prerequisites#PHP_Prerequisites | PHP Prerequisites]] for more information.
+
 
+
 
+
 
+
[[File:enablexmlrpc.png]]
+
 
+
{{End of Section}}
+
 
+
==Create a specific user==
+
 
+
Moodle's Web Services requires a "user" to connect with Joomdle.
+
 
+
 
+
To configure Moodle's Web Services, we need to define a specific "user" which will be given the appropriate access to "enter" / connect with Moodle.  Ideally, this "user" should be used '''only''' for connecting Joomla to Moodle.  It should '''not''' be used as a typical Joomla front end or Joomla backend user.  Also, it should not be your Joomla or Moodle system admin user.  For example, we created a user called '''joomdle connector'''.
+
 
+
{{End of Section}}
+
 
+
==Check user capability==
+
 
+
====Check user permissions====
+
 
+
For Joomdle to connect to Moodle using Web services, a specific user must be created in Moodle, as defined above.  Once defined this user must be given the appropriate access to the Web services protocol being used, XML-RPC.  This is done by defining a role, assigning the user to that role and then granting that role access to the Web services.  In this section, we show you how to:
+
* Check the permissions of existing users
+
* Create a new role
+
* Assign a specific user, eg. Joomdle Connector, to a given role
+
 
+
 
+
From the table click on 4. Check user capability.  Select the user who you have created to be the Web services user and press the '''Show this user's permissions''' button.
+
 
+
 
+
 
+
[[File:Checkpermissions.png]]
+
 
+
Scroll down until you see XML-RPC and ensure this is set to yes.  The background colour will have changed as well.  In this case the background colour is light blue/green indicating it is set to yes in comparison to pink for no.
+
 
+
If it is not set to '''Yes''' you will need to do one or more of the following:
+
* Create a new role
+
* Assign the user to the specific role
+
 
+
[[File:Checkuserpermission.png]]
+
 
+
{{End of Section}}
+
 
+
====Define a new role, to manage access to Joomdle Web services====
+
 
+
To define a new role, go to Site Administration->Users->Permissions->Define roles, and click the 'Add a new role' button.  Then enter a unique name, short name and description.  These should be something that you will recognise relating to Joomdle services.
+
 
+
[[File:newrole.png]]
+
 
+
Then, check 'System' as Context types where this role may be assigned.
+
 
+
Scroll down looking through the Capability table and Allow (check):
+
* Use XML-RPC protocol
+
* View discussions
+
 
+
[[File:capabilities.png]]
+
 
+
{{End of Section}}
+
 
+
====Assign the user to the new role====
+
 
+
After you have created the new role, you will need to add your Joomdle Web services user (eg. joomdle connector) to this role.
+
 
+
Go to Users->Permissions->Assign System roles, and select the new role.
+
 
+
 
+
[[File:assignrole.png]]
+
 
+
{{End of Section}}
+
 
+
==Add a new service==
+
 
+
Next we must add a new "service" for Joomdle.  This "service" will allow you to define what Joomdle can do inside Moodle.  For example pulling course details information from Moodle or creating a new user in Moodle.  This task is split into two tasks:
+
* Create a new service
+
* Defining what functions this new service can perform (See the next section)
+
 
+
This is done in Site Administration->Plugins->Web services->External services
+
 
+
[[File:newservice.png]]
+
 
+
==Add functions to service==
+
 
+
Normally, this would be the first time you are setting up Joomdle on this webserver.  Therefore, it is assumed the '''Joomdle for Moodle''' has not been installed and you will not be able to perform this task at this time.  Instead, this activity will be completed as part of the [[Installing Joomdle in Moodle 2|Installing Joomdle in Moodle 2.0]] task.
+
 
+
 
+
 
+
If Joomdle has already been installed, you can perform this task now.  The details of this task can be found here [[Installing Joomdle in Moodle 2#Add_functions_to_service|Add Functions to Service]]
+
 
+
{{End of Section}}
+
 
+
==Add user as authorized user for the service==
+
 
+
Now that we have created a new service and added the appropriate functions (All Joomdle functions), we need to authorise / grant the Joomdle Web services 'user' to the newly created service.  This is done in:
+
 
+
Site Administration->Plugins->Web services->External services
+
 
+
Click on '''Authorized users for the new service''' and add the Joomdle Web services '''user''' we created before.
+
 
+
[[File:adduser.png]]
+
 
+
{{End of Section}}
+
 
+
==Create token==
+
 
+
The final step is to create a '''token''' which will be entered in Joomdle configuration page in the Joomdle Joomla component.  Without this token, even if everything is configured in Moodle, Joomla and Joomdle correctly, Joomdle will not be able to connect with Moodle.
+
  
In the Moodle Administration menu:
 
  
Site Administration->Plugins->Web services->Manage tokens, click on Add.
+
==Get auth token for Joomdle config in Joomla==
  
[[File:addtoken.png]]
+
When you install Joomdle on Moodle, a new token will be created. You need to get this token to enter it later in Joomdle configuration in Moodle.
  
 +
Token can be found at: Administration -> Plugins -> Web Services -> Tokens.
  
Select the user and the service we created, and Save.
+
In Moodle > 3.11, location is different:
 +
Site administration -> Server -> Web services -> Manage tokens
  
[[File:tokens.png]]
+
==Allow frame embedding for wrapper==
  
 +
Depending on your setup, you may need to enable an option if you want to use the Joomdle wrapper.
  
You will get a new token, to enter in Joomdle's component configuration in Joomla.  Refer to this page for entering the token in Joomdle.
+
In Site Administration->Security->Http Securty, enable option '''Allow frame embedding'''

Latest revision as of 10:33, 19 August 2021

This document applies to Joomdle Release 2.0.0

Moodle 2 Prerequisites

If you are installing Moodle for the first time, it will check for the existence of the PHP extension XML-RPC.  Please ensure it is installed.

xmlrpc_check.jpg

For further information on PHP XML-RPC libraries refer to PHP XML-RPC Prerequisites


.

Configuring Moodle for Joomdle

In newest Joomdle versions, all required Moodle setup is done automatically when Joomdle package is installed.


Get auth token for Joomdle config in Joomla

When you install Joomdle on Moodle, a new token will be created. You need to get this token to enter it later in Joomdle configuration in Moodle.

Token can be found at: Administration -> Plugins -> Web Services -> Tokens.

In Moodle > 3.11, location is different: Site administration -> Server -> Web services -> Manage tokens

Allow frame embedding for wrapper

Depending on your setup, you may need to enable an option if you want to use the Joomdle wrapper.

In Site Administration->Security->Http Securty, enable option Allow frame embedding