Professional Documents
Culture Documents
1 Configure Your Moodle Website
1 Configure Your Moodle Website
1 Configure Your Moodle Website
Once you have installed and activated the Edwiser Bridge plugin on your website the next step would be to
configure the Moodle website and generate an ‘Access Token‘ which will be used on the WordPress website.
The following steps will have to be taken through to complete the Moodle site settings.
Login to your Moodle site and go to Site Administration -> Plugins -> Web Services -> External
Services.
Click on the ‘Add‘ button on the external services page.
Enter a name for the External Service, check the ‘Enabled‘ field, check the ‘Authorised Users Only‘
field.
Now click on the ‘Add Service’ and follow it up with clicking the ‘Add functions‘ link.
The next step would be to add users to the list of authorized users for the external service that you
created. To do this you will have to go to Site Administration -> Plugins -> Web Services ->
External Services and click on the ‘Authorised users‘ link against the external service you created.
Once there you will be able to add users to the list of authorised users. Conversely, you can also
remove users from the same setting at a later point of time if required.
1. Go to Site Administration –> Plugins –> Web Services –> Manage Protocols.
2. Click on the grey icon in the REST protocol row to enable the REST protocol and save the changes
made.
1. Go to Site Administration –> Plugins –> Web Services –> Manage Tokens
2. Click on the ‘Add‘ link and select the admin user under the ‘User‘ list.
3. Now select the external service that you created earlier in the ‘Service‘ drop down list.
4. Click on the ‘Save Changes’ button. The token generated will be used in the Edwiser Bridge settings
page on your WordPress website.
Go to Site Administration –> Advance features, check the ‘Enable Web Services’ field and click ‘Save
Changes‘ to save the changes you have made.
With that last bit on disabling the password policy, we have completed the Moodle end configurations for
the WordPress – Moodle integration to work seamlessly.
To start selling the courses from WordPress, you will also have to configure a Payment Gateway. In this
case, it is PayPal. Let’s go through the process of setting up PayPal on your WordPress website.
1. Enter the email id which will be used to accept payments in the ‘PayPal Email‘ field.
2. Next choose your chosen currency of transaction from the ‘PayPal Currency‘ drop down box.
3. Enter the country from which you will be operating the transaction in the ‘PayPal Country‘ field.
4. In the ‘PayPal Cancel URL‘ field, you will enter the link of the page to which the buyer should be
redirected should a payment not go through.
5. In the ‘PayPal Return URL‘ field, you will enter the link of the page to which the buyer should be
redirected after the payment of a purchase has been completed.
6. The ‘Use PayPal Sandbox‘ field should only be checked at the time of making test transactions.
Uncheck the field once the website is made live.
To give refunds to your students you have to add these details in Edwiser Bridge settings,
These settings are optional in nature but if you are planning to set them up then following the steps given
below,
Go to Edwiser Bridge > Settings tab > PayPal Settings tab > Scroll down to PayPal API Credentials
You will find three fields API Username, API Password & API Signature, all fields are mandatory,
You will get these details by following these steps,
1. Log in to your PayPal Business account.
2. Click the My Account tab.
3. Click the Profile tab. If you haven’t already done so, you need to verify your account before
requesting API credentials.
4. Click Request API credentials under Account information.
5. Click Set up PayPal API credentials and permissions under Option 1.
6. Click Request API Credentials.
7. Click Request API signature.
8. Click Agree and Submit.
9. Copy and paste the API username, password, and signature into Edwiser’s settings (one
mentioned above)
Here is a link for detailed explaination and better understanding.
1. To edit email templates, browse ‘Edwiser Bridge’ → ‘Manage Email Templates’ in your WordPress
backend.
2. Select an email template you wish to edit in the list of Email Templates.
3. After making the changes, click on ‘Save Changes’ button to save the changes.
From Name: (Here you could add the title of your choice to the selected email template),
Subject: (Here you could add a custom subject line for the selected email template)
{USER_NAME} – Use this constant if you want to send users their username to access your site.
{FIRST_NAME} – Use this constant to display the first name of the user in emails.
{LAST_NAME} – Use this constant to display the last name of the user in emails.
{COURSES_PAGE_LINK} – Use this constant to add a link of the course which the user has purchased.
{USER_ACCOUNT_PAGE_LINK} – Use this constant to add a link of the user-account page on email.
{WP_LOGIN_PAGE_LINK} – Use this constant to add a link of the WordPress login page.
{MOODLE_URL} – Use this constant to add a link of your Moodle site in the emails.
{USER_PASSWORD} – This constant displays the user’s password on your site to whom the email is being
sent to.
{TOTAL_AMOUNT_PAID} – This constant displays amount paid at the time when the order was placed.
{CURRENT_REFUNDED_AMOUNT} – This constant displays the amount that has been refunded to the
course buyer.
{TOTAL_REFUNDED_AMOUNT} – This constant displays the total amount that has been refunded to the
course buyer.
As admins, you could also make sure that few important email ID’s are notified whenever a refund is given
out for that simply add those email address here and Save them.
Synchronize Courses
1. To synchronize Moodle courses with WordPress go to Edwiser Bridge –> Settings –>
Synchronization Tab.
2. To synchronize only the course categories from Moodle to WordPress check the ‘Synchronize
Course Categories‘ field and click save. Leave the remaining check boxes unchecked.
3. To update courses that have been synchronized previously check the ‘ Update Courses Synchronized
Previously‘ field and click save. Leave the remaining check boxes unchecked.
4. To import only Moodle courses to WordPress as drafts check the ‘Synchronize Courses as Drafts‘
field and click save. Leave the remaining check boxes unchecked. The courses that have been
synchronized will be saved in as a custom post type and can be accessed by going to Edwiser Bridge
–> Courses from the admin menu.
5. If all the checkboxes are checked then all values will get synchronized with WordPress and
appropriate messages will be displayed once the process has been completed.
6. If no checkbox is selected and the ‘Synchronize‘ button is clicked then the Moodle courses will get
synchronized with WordPress and will be published on the website.
Synchronize Users
1. To synchronize enrolled user data between the two systems go to Edwiser Bridge –> Settings –>
Synchronization and click on the ‘Users‘ link provided at the top left.
2. Once here you can synchronize user data for enrolled courses by checking the ‘Update user’s course
enrollment status’ field provided. This field would be particularly useful to synchronize data for
users who have been enrolled to some courses from the Moodle website.
1. In the case that there is a situation in which a user’s Moodle account is not linked with his
WordPress account then you can do so from the ‘Users’ page at the backend of the WordPress
website.
2. To link or unlink a Moodle account with a WordPress account go to ‘Users‘ in the admin menu and
select the WordPress user accounts you want to link or unlink with Moodle.
3. Now select the required menu from the ‘Bulk Actions‘ drop down list and click apply.
4. It is important to note that if you link a WordPress account with a Moodle account the password will
not get synced and will be the same as it was while creation of the respective accounts.
5. If you have users who are already registered in Moodle and want to create their WordPress user
accounts then you could do that by manually creating WordPress user accounts in WordPress and
then following the step 2 & 3 as mentioned in this documentation.
1. To enroll or un-enroll users from the WordPress website go to the ‘Users‘ tab in the admin menu and
select the user you want to enroll or un-enroll to or from a course.
2. On the users profile page at the back end, a setting will be provided to select a course from a drop-
down box and enroll the user to that course.
3. Similarly, a drop down box will be provided to select a course from the drop-down box and un-enroll
the user from that course.
4. For both fields, on selecting the required course and saving the details, the enrollment information is
updated in both WordPress as well as Moodle.
5 Create Categories in WordPress
Courses imported from Moodle can be assigned various categories. The categories can either be imported
from Moodle by using the ‘Synchronize Course Categories‘ Option in the ‘Synchronization’ tabs on the
settings page.
Alternatively, new courses can be created and can be assigned to courses imported from Moodle.
Go to the Edwiser Bridge –> Courses and open a course page of your choice.
Lower on the course page there is a ‘Course Options‘ widget. Here you can set the various
parameters to start selling the course.
You can select if you want to make a course paid or not from the ‘Course Price Type‘ drop down
box. In this field, there are three options that can be selected.
o The ‘Free‘ option is for free courses which will be available for all registered users.
o The ‘Paid‘ option is for courses which will have to be purchased by users.
o The ‘Closed‘ option is if the course is not available to be taken however you still want to
display it on the website.
If you have selected ‘Free‘ in the previous field all users will be able to take the course from the
Moodle website.
If you select the ‘Paid‘ option the ‘Course Price‘ field will now be displayed. You will have to enter
the price at which you want to sell the course here.
On selecting the ‘Closed’ option, an additional field labelled ‘Optional URL‘ will be displayed. Here
you will have to enter the URL of a page to which you want the end user to be redirected to on
clicking the ‘Take Course‘ button.
e sure to save any changed that you make to the course page by clicking on ‘Publish‘ or ‘Update‘
whichever is applicable.
Below is a screen shot of the course page when a new user lands on it.
On clicking the ‘Take Course‘ button, the user will be redirected to the login page as he is not logged
in.
Since the user is new, he will have to click on the ‘Don’t have an Account?‘ following which the
user will be redirected to the registration page.
Once a user has successfully registered on the WordPress website an account for that user is also
created on the Moodle website with the same username and password.
The user will now be redirected to the course page from which the user will be able to purchase the
course by clicking the ‘Take Course‘ button on the course page.
On successful payment for the course, the ‘Take Course‘ button on the course page will now be
replaced by the ‘Access Course‘ button. On clicking this button, the user will now be redirected to
the Moodle website where he can take the course by signing in to the system.
To view the compilation of all the courses that have been purchased from your course you will have to go to
Edwiser Bridge –> Orders where you will be able to see a full purchase history of all courses.
Refunds Orders
Go to Edwiser Bridge > Orders > Edit Order > Scroll to Refund Order section,
You can give a partial refund to your client by entering the amount to be refunded in the “Refund
Amount” field > Later Hit the ” Refund $ ” button given below this will initiate the refund,
Once done you could update the Order by clicking on the “Update” button,
Simply enter the price at the which the buyer purchased the course and grant refund.
If you wish to bar the user from accessing the course after refund?
Check the “Suspend Course Enrollment” checkbox and then provide the refund this would unenroll the
student from the course.
This shortcode is used to display the courses on a page. The parameter which can be used with this
shortcode is as follows:
[eb_courses per_page=”Number”] – Enables pagination and limits the number of courses displayed on a
page. For instance, [eb_courses per_page=”12″] will display only 12 courses on page one and the next
courses on page 2 and so on.
[eb_courses cat_per_page=”Number”] – Shows only those courses from the set number of categories.
[eb_courses group_by_cat=”yes”] – Groups and displays the courses as per categories on the page.
Shortcode [eb_my_courses]:
This shortcode is used to display the ‘my courses’ on a page. The parameter which can be used with this
shortcode is as follows:
Shortcode [eb_user_account]:
Step 1:
Create a folder named ‘edwiserBridge’ in your theme folder (preferably inside the child theme). The path of
the created folder will be ‘wp-content/themes/{themename}/child-theme/edwiserBridge’
Step 2:
archive-eb_course.php
content-eb_course.php
content-single-eb_course.php
single-eb_course.php
Step 3:
<?php
[INITIALISATIONS]
[CONTENT]
<?php
$template_loader->wpGetTemplate('global/wrapper-end.php', $wrapper_args);
?>
<?php
/**
* Load Sidebar content.
*/
if (file_exists(get_template_directory_uri().'/sidebar.php')) {
get_sidebar();
}
?>
</div>
<?php
get_footer();
Remove the line (this line loads the default template wrapper elements).
$template_loader->wpGetTemplate('global/wrapper-start.php', $wrapper_args);
Remove the line (this line loads the default template wrapper elements).
$template_loader->wpGetTemplate('global/wrapper-end.php', $wrapper_args);
</main>
</section>
Replace the above structure, except the [INITIALISATIONS] and [CONTENT] part with the structure in
your theme’s archive.php file. The archive.php file can be found on the following path.
wp-content/themes/{themename}.
Step 4:
<?php
/**
* The template for displaying all single moodle courses.
*/
namespace app\wisdmlabs\edwiserBridge;
[INITIALISATIONS]
if (file_exists(get_template_directory_uri().'/sidebar.php')) {
get_sidebar();
}
?>
<?php
get_footer();
Remove the line (this line loads the default template wrapper elements).
$template_loader->wpGetTemplate('global/wrapper-start.php', $wrapper_args);
$template_loader->wpGetTemplate('global/wrapper-end.php', $wrapper_args);
</main>
</section>
Replace the above structure, except the [INITIALISATIONS] and [CONTENT] part with the structure in
your theme’s single.php file. The single.php file can be found on the following path
‘wp-content/themes/{themename}’.
Once you have executed the above steps the display of the ‘course archive page’ and ‘single course page’
should blend with the look of your theme.
So that’s about the steps you have to follow to make Edwiser Bridge Compatible with your theme.
Feel free to use the comments section for any queries you might have!