Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Batch Enrollment From Studio Side: Everything you need to know

Enrollment management is a critical aspect of any educational institution’s operations. The process of enrolling students, whether for a school, college, or training program, can be time-consuming and labor-intensive. However, with the advent of technology and the availability of open edX tools, institutions can simplify and streamline this process. In this blog, we’ll explore the concept of batch enrollment from the studio side, explaining what it is, its benefits, and how to effectively implement it.

Concept of Batch Enrollment

Batch enrollment from the studio side refers to the process of enrolling a group of students or participants in a course or program all at once. This approach can be incredibly beneficial in scenarios where you need to manage a large number of enrollments efficiently.

Let’s move towards the process of Batch Enrollment from the studio side.

Step-by-Step Process of Batch Enrollment from the Studio Side

Enroll a student and send an invitation Email from the studio interface.

Currently, when the button is clicked, an email is generated that provides course details, including a link to the course. However, the student is neither enrolled in the course nor granted access to course materials. However, you can execute batch enrollment from the instructor tab on the LMS side.

To implement the same functionality in the studio side schedule & details page go through the following steps:

Step 1: Create a Popup Form

When we click the “Invite Your Students” button, a popup should appear with a text area, a “Close” button, and an “Enroll” button. Along with an Error message and Success message with style=”display: none;” to let the user know that their request was completed successfully or encountered an error.

To add a popup form for inviting students, you need to add the following code to the cms/templates/settings.html file:

Step 2: Add a JavaScript Code Using Backbone JS

Here, when the user clicks “Invite your students”, the Ajax function will be called to display the popup form. After entering the data in the textarea, when a user clicks the “Enroll” button, it should send information to a Python function, for instance, the data-action = “enroll” the course _id, and the content from the textarea. This information should be sent in a list or CSV format.

After the AJAX call is successful, you want to show a success message to the user. If there’s an issue during this process, you should display an error message for 5 seconds. To achieve this, you need to add an AJAX function in the “course_details.js” file located in the “static/js/models/settings” directory of your CMS.

Add your Ajax Backbone View at cms/static/js/models/settings/course_details.js file.

Step 3: Create a Python Function

Create a Python function that gets triggered when a user clicks the “Submit” or “Enroll” button. This function should have two main tasks:

  • Enroll the Student

    This function should handle the process of enrolling the student in the course. You can look at the code in “lms/djangoapps/instructor/views/api.py” and specifically the “student_update_enrollment” function to understand how to perform this enrollment process.

  • Send Enrollment Email

    It should also send an email to the enrolled student. This email should contain important information, including a link to access the course. To implement this email-sending functionality, you can refer to the code in “lms/djangoapps/instructor/enrollment.py” especially the “enroll_email” function.

Step 4: Create Email Mako Template

By default, the EnrollEnrolled class will render the default Django HTML template (Jinja). However, the studio side requires a Mako template to be rendered. To achieve this, a new class and template should be created for sending emails using ace. Create a new class at lms/djangoapps/instructor/message_types.py.

Assign this class to a variable at lms/djangoapps/instructor/enrollment.py, To do this first, import the class CustomEnrollMessage and assign CustomEnrollMessage as a variable inside the the given path.

def send_mail_to_student —> ace_emails_dict = {}

Assign your variable to Email_params[‘message_type’] = ‘your_variable_name’. This code will send an email to the user using the CustomEnrollMessage class. The email template that is used will be the one that is defined in the lms/djangoapps/instructor/message_types/templates/ directory.

Create a folder with the same name as your class name at lms/templates/instructor/edx_ace/ and make 5 files namely:

Customize your mako code in the html/txt files according to your need.

Step 5: Sending an Email Using Ace

When attempting to send emails through Ace (Automated Communication Engine), if you’ve configured your SMTP settings in the settings file but still encounter issues with email delivery, you should investigate the “devstack.py” file within the “openedx/core/djangoapps/ace_common/settings” directory for solutions.

Replace “settings.ACE_ENABLED_CHANNELS = [ ‘file_email’ ]” with “settings.ACE_ENABLED_CHANNELS = [ ‘django_email’ ]”.

Step 6: Enter Data and Enroll

There are 2 ways to enter data you can either use comma-separated values or write each entry on a new line. Here we enter data using both ways.

Enter data using CSV

Enter Data Using Next Line

Note: Only usernames and email addresses are accepted as input for the enrollment process.

If a user tries to enroll in a course using an email address that is not registered with the system, the system will create a dummy user account for them and send them an email at that address. This allows the user to start taking the course, even if they have not yet created a full account.

Note: Enrolling with a non-existing username will not create a dummy user.

After successful enrolment, the success message will be displayed at the bottom of the popup.

Furthermore, the user will receive an email confirmation, and the course will now be visible on their dashboard.

The user will be enrolled in the course and the course will be displayed on his dashboard.

If you encounter an error during email sending, the displayed error message will resemble the one shown in the given image.

You need to re-enter the emails or usernames and click the “Enroll” button again.
When the students are successfully enrolled, and the emails are sent without any issues, a Success message will replace the previous Error message.

Conclusion

Batch enrollment from the Studio side is a simple and efficient way to enroll multiple students in your Open edX course at once. By following the steps outlined in this article, you can easily enroll your students and get them started on their learning journey.

Need help with your Open edX project? CodeTrade’s Open edX experts can help you solve any issues you’re facing, big or small. Want to build your own Open edX platform? CodeTrade India is a leading Open edX development agency that can help you create a custom platform that meets your specific needs.

The post Batch Enrollment From Studio Side: Everything you need to know appeared first on Custom Software Development Company.



This post first appeared on Web Development Trends 2023, please read the originial post: here

Share the post

Batch Enrollment From Studio Side: Everything you need to know

×

Subscribe to Web Development Trends 2023

Get updates delivered right to your inbox!

Thank you for your subscription

×