-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update the readmes and the how-tos, and add quickstart and a tu…
…torial (#61) * docs: update the readmes and the how-tos, add quickstart and a tutorial * docs: improve the doc with feedback * docs: ordered lists in READMEs
- Loading branch information
Showing
21 changed files
with
332 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+58.8 KB
(190%)
docs/source/_images/how-tos/create_an_openedx_app/openedx-sync-plugin-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.25 KB
(91%)
docs/source/_images/how-tos/create_enroll_request/new_enroll_request.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+40.5 KB
docs/source/_images/how-tos/create_openedx_course_product/add-base-info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ Decisions | |
0001-purpose-of-this-repo | ||
0002-api-connection | ||
0003-fulfillment-and-refund | ||
0004-naming-of-the-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,44 @@ | ||
Create an Open edX Application for the Plugin Settings | ||
======================================================= | ||
|
||
You will learn how to create an Open edX Application for filling out the form in the Open edX Sync Plugin Settings in our Wordpress Settings. | ||
You will learn how to create an Open edX Application for filling out the form in the Open edX Sync Plugin Settings in our WordPress Settings. | ||
|
||
Index | ||
------- | ||
- `Requisites`_ | ||
- `Create an Open edX Application to Configure the Open edX Commerce plugin`_ | ||
- `Next Steps`_ | ||
|
||
Requisites | ||
----------- | ||
|
||
Have access to a Django admin dashboard for your Open edX platform. | ||
|
||
Create an Open edX Application to Configure the Open edX Commerce plugin | ||
------------------------------------------------------------------------- | ||
|
||
#. Go to Applications in your Django Admin in your Open edX instance. (URL: `<domain>/admin/oauth2_provider/application/`) | ||
|
||
.. image:: /_images/how-tos/create_an_openedx_app/applications.png | ||
:alt: Applications in Django Admin | ||
|
||
#. Create an Application with a staff user and Client Credentials as Authorization grant type. | ||
#. Create an Application with a staff user and **Client Credentials** as **Authorization grant type**. | ||
|
||
.. note:: Why do we need a staff user? Because we use those credentials to create, edit, and delete enrollments, which are staff operations. | ||
|
||
.. image:: /_images/how-tos/create_an_openedx_app/add-application.png | ||
:alt: Add Application | ||
|
||
#. Use your platform domain and your application's client id and client secret in the Open edX Sync Plugin Settings in your WordPress Settings. | ||
#. Use your platform **domain** and your **application's client id and client secret** in the Open edX Sync Plugin Settings in your WordPress Settings. | ||
|
||
.. image:: /_images/how-tos/create_an_openedx_app/openedx-sync-plugin-settings.png | ||
:alt: Open edX Sync Plugin Settings | ||
|
||
#. Test the credentials by clicking "Save Changes" and "Generate JWT Token." | ||
#. Test the credentials by clicking **Save Changes** and **Generate JWT Token**. | ||
|
||
.. note:: If you don't have credentials to enter the Django Admin, you need to contact an operator of your Open edX instance to provide you the client id and client secret of an Application with Client Credentials as Authorization grant type and staff user. | ||
.. note:: If you do not have credentials to enter the Django Admin, you need to contact an operator of your Open edX instance to provide you the **client id and client secret of an Application** with **Client Credentials** as **Authorization grant type** and **staff user**. | ||
|
||
Next Steps | ||
----------- | ||
|
||
- :doc:`Create enrollment requests manually </how-tos/create_enrollment_requests_manually>`. | ||
- :doc:`How-to: Create enrollment requests manually </how-tos/create_enrollment_requests_manually>`. |
53 changes: 38 additions & 15 deletions
53
docs/source/how-tos/create_enrollment_requests_manually.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,65 @@ | ||
Create enrollment requests manually | ||
Create Enrollment Requests Manually | ||
==================================== | ||
|
||
The Open edX WooCommerce Plugin uses Enrollment Request to manage the enrollments generated by the WooCommerce integration, but you can create an Enrollment Request manually. | ||
The Open edX WooCommerce Plugin uses Enrollment Request to manage the enrollments generated by the WooCommerce integration, but you can create it manually. | ||
|
||
In this section, you will learn how to create an Enrollment Request manually. | ||
|
||
Index | ||
------- | ||
- `Requisites`_ | ||
- `Create an Enrollment Request`_ | ||
- `Exploring the Enrollment Request View`_ | ||
- `Next Steps`_ | ||
|
||
Requisites | ||
----------- | ||
|
||
To connect with the Open edX platform, you must have valid settings for this plugin. If you don't have this plugin set yet, the how-to :doc:`Create an Open edX Application for the Plugin Settings </how-tos/create_an_openedx_app>` will be helpful. | ||
To connect with the Open edX platform, you must have valid settings for this plugin. If you do not have this plugin set yet, the :doc:`How-to: Create an Open edX Application for the Plugin Settings </how-tos/create_an_openedx_app>` will be helpful. | ||
|
||
Steps | ||
------ | ||
Create an Enrollment Request | ||
----------------------------- | ||
|
||
#. Enter the Enrollments Manager option in your WordPress dashboard's Open edX Sync tab. | ||
|
||
.. image:: /_images/how-tos/create_enroll_request/menu.png | ||
:alt: Enrollments Manager option | ||
|
||
#. Create a new Enrollment Request (URL: `<domain>/wp-admin/post-new.php?post_type=openedx_enrollment`) | ||
#. Click **Add New** and fill out the form with the following fields: | ||
|
||
- **Course ID**: the ID from your Open edX platform course. e.g. ``course-v1:edX+DemoX+Demo_Course``. | ||
|
||
- **User Email**: the user's email address that will be used in the request. | ||
|
||
- **Course Mode**: the mode of your enrollment request. Make sure to set a mode that your course has. We only support the modes that come by default on the Open edX platform. | ||
|
||
- **Request type**: If you select **Enroll**, you will create an enrollment, and if you choose **Un-enroll**, you will set a soft un-enrollment (enrollment with status inactive) if you update in Open edX. | ||
|
||
- **WC Order ID (Auto-filled)**: You can leave this field blank. If your request was created automatically and has an order associated, this field will fill automatically. | ||
|
||
.. image:: /_images/how-tos/create_enroll_request/new_enroll_request.png | ||
:alt: New Enrollment Request | ||
|
||
* Use a valid course ID that will be used in the request. e.g. course-v1:edX+DemoX+Demo_Course. | ||
|
||
* Enter the email of the user who will be used in the request. | ||
Exploring the Enrollment Request View | ||
---------------------------------------- | ||
|
||
* Select a Course Mode that the course has. | ||
Checkboxs | ||
^^^^^^^^^^ | ||
|
||
* Select the type of request you want to execute. If you select **Enroll**, you will create an enrollment, and if you select **Un-enroll**, you will set a soft unenrollment (enrollment with status inactive). | ||
- **Use the "force" flag**: if you select this, the action will not consider the course enrollment end dates. | ||
|
||
* If this request has an Order associated, you can fill in the "WC Order ID" field. | ||
- **Creating a course enrollment allowed if the user does not exist**: if you select this, create a register in the table Course Enrollment Allowed if the email we use in the request is not a user in our Open edX platform yet. It is available only if you have a release greater or equal to Quince. | ||
|
||
* If you select to use the force flag, the action will not consider the course enrollment dates. | ||
Buttons | ||
^^^^^^^^ | ||
|
||
* Creating a "course enrollment allowed" if the user doesn't exist is available only if you have a release greater than Palm. | ||
- **Save in WordPress**: this allows you to store the form information in WordPress. | ||
- **Save and update Open edX**: save the information in WordPress and create a POST API request, considering all the flags and fields except the **WC Order ID.** | ||
- **Read from Open edX**: bring information with GET methods over the API and only use the **Couse ID** and **User email** fields. | ||
- **View Order**: allows you to navigate from the Enrollment Request to the Order associated with that request. | ||
|
||
And that's it! | ||
Next Steps | ||
----------- | ||
|
||
You can save it in Wordpress or Save and Update it in Open edX. | ||
- :doc:`Tutorial: Configure your WordPress so that purchases and refunds automatically generate enrollments </tutorials/configuration_to_automate_enrolls>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Create an Open edX Course in WordPress | ||
======================================= | ||
|
||
Index | ||
------ | ||
- `Create an Open edX Course`_ | ||
- `Next Steps`_ | ||
|
||
Create an Open edX Course | ||
-------------------------- | ||
|
||
#. In the sidebar of the WordPress admin dashboard, go to **Products** and then to **Add New**. | ||
|
||
#. Click the **Open edX Course checkbox** and fill in the information required. | ||
|
||
.. image:: /_images/how-tos/create_openedx_course_product/add-base-info.png | ||
:alt: Add new Open edX Course product. | ||
|
||
|
||
.. warning:: We recommend not to use the **Downloadable check** when you use the **Open edX Course check** to avoid problems creating the enrollment. For more information, visit :doc:`Decisions: Fulfillment and Refund </decisions/0003-fulfillment-and-refund>`. | ||
|
||
#. Add more information in your product as a title, description and image. | ||
|
||
#. Save your changes. | ||
|
||
Next Steps | ||
----------- | ||
|
||
- :doc:`Tutorial: Configure your WordPress so that purchases and refunds automatically generate enrollments </tutorials/configuration_to_automate_enrolls>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Refund an Order With an Open edx Course from a WooCommerce Order | ||
================================================================== | ||
|
||
You will learn how to refund an Open edX product from a WooCommerce order. | ||
|
||
Index | ||
------ | ||
- `Refund an Open edX Course`_ | ||
- `Expected Behavior`_ | ||
- `Next Steps`_ | ||
|
||
Refund an Open edX Course | ||
-------------------------- | ||
To refund products in order with WooCommerce, you can follow the `WooCommerce Refund Documentation <https://woo.com/document/woocommerce-refunds/>`_. | ||
|
||
For a refund to generate an un-enrollment in your Open edX platform, the following is required: | ||
|
||
#. The item you will refund must be an Open edX Course (:doc:`How-to: Create an Open edX Course in WordPress </how-tos/create_openedx_course_wordpress>`). | ||
|
||
#. You need to add a **Quantity** for that item. | ||
|
||
.. image:: /_images/decisions/refund-order.png | ||
:alt: Refund process marking the course to be refunded | ||
|
||
Expected Behavior | ||
------------------ | ||
|
||
- When the refund is made, an Enrollment Request with the **Un-enroll** request type will automatically be created in your WordPress site. | ||
|
||
- Have a course enrollment with the course and user and the ``is_active`` flag in ``False`` in your Open edX platform. | ||
|
||
Next Steps | ||
----------- | ||
|
||
- :doc:`Decisions </decisions/index>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.