Is CoursePress Pro able to send notifications to teachers about enrollment/assignments?

This may be an option that I’ve overlooked, but as a teacher of a course, I need to be able to receive notifications when students enroll, especially self-enrollment of a course that can be completed at any time.

I also need to be notified when a student has submitted an assignment or assessment that needs grading. Again, for courses where students can enroll at any time, I won’t know to give a grade unless I’m alerted. This can be particularly aggravating to a student if they aren’t able to proceed further in the course due to performance/completion restrictions.

If this isn’t a feature, please consider this a MUCH needed request.

Thank you,

Caroline

  • Vaughan
    • Support/SLS MockingJay

    Hi Caroline,

    Hope you’re well?

    Currently at this time there isn’t any email functions for that, but it has been a requested feature & I will certainly add this to the list. In the meantime, let me just ask one of the developers to see if there’s a custom hook that could possibly be used to send an email with. But hopefully we can get these features added soon.

    Hopefully the developer should respond shortly.

    Thanks

  • Hoang Ngo
    • Code Slayer

    Hi Caroline,

    I hope you are well today.

    Unfortunately, there’s no custom hook there so we need to modify the plugin a little bit.

    In the file /coursepress/includes/classes/class.student.php line 94, you will see the code like this

    function enroll_in_course( $course_id, $class = '', $group = '' ) {
    global $cp;
    $current_time = current_time('mysql');

    update_user_meta($this->ID, 'enrolled_course_date_' . $course_id, $current_time); //Link courses and student ( in order to avoid custom tables ) for easy MySql queries ( get courses stats, student courses, etc. )
    update_user_meta($this->ID, 'enrolled_course_class_' . $course_id, $class);
    update_user_meta($this->ID, 'enrolled_course_group_' . $course_id, $group);
    update_user_meta($this->ID, 'role', 'student'); //alternative to roles used

    $email_args['email_type'] = 'enrollment_confirmation';
    $email_args['course_id'] = $course_id;
    $email_args['dashboard_address'] = CoursePress::instance()->get_student_dashboard_slug(true);
    $email_args['student_first_name'] = $this->user_firstname;
    $email_args['student_last_name'] = $this->user_lastname;
    $email_args['student_email'] = $this->user_email;

    if ( is_email($email_args['student_email']) ) {
    coursepress_send_email($email_args);
    }

    return true;
    //TO DO: add new payment status if it's paid
    }

    Please update it like

    function enroll_in_course( $course_id, $class = '', $group = '' ) {
    global $cp;
    $current_time = current_time('mysql');

    update_user_meta($this->ID, 'enrolled_course_date_' . $course_id, $current_time); //Link courses and student ( in order to avoid custom tables ) for easy MySql queries ( get courses stats, student courses, etc. )
    update_user_meta($this->ID, 'enrolled_course_class_' . $course_id, $class);
    update_user_meta($this->ID, 'enrolled_course_group_' . $course_id, $group);
    update_user_meta($this->ID, 'role', 'student'); //alternative to roles used

    $email_args['email_type'] = 'enrollment_confirmation';
    $email_args['course_id'] = $course_id;
    $email_args['dashboard_address'] = CoursePress::instance()->get_student_dashboard_slug(true);
    $email_args['student_first_name'] = $this->user_firstname;
    $email_args['student_last_name'] = $this->user_lastname;
    $email_args['student_email'] = $this->user_email;

    if ( is_email($email_args['student_email']) ) {
    coursepress_send_email($email_args);
    }

    do_action('cp_enrolled_in_course',$course_id,$this);

    return true;
    //TO DO: add new payment status if it's paid
    }

    And after that, Please add this code to your theme functions.php or use mu-plugins

    add_action('cp_enrolled_in_course', 'cp_enrolled_in_course', 10, 2);
    function cp_enrolled_in_course($c_id, $student)
    {
    $course = new Course($c_id);
    $teachers = Course::get_course_instructors($c_id);
    $subject = __("You have new enrolled", 'cp');
    $headers = array(
    'Content-Type: text/html; charset=UTF-8'
    );
    $student_name = $student->user_firstname . ' ' . $student->user_lastname;
    $content = sprintf(__("Student %s has enrolled to your course %s", 'cp'), $student_name, $course->details->post_title);
    foreach ($teachers as $teacher) {
    wp_mail($teacher->user_email, $subject, $content, $headers);
    }
    }

    This will send you a simple notification email when an user enrolled to your course.

    Please give it a try and let us update.

    Best regards,

    Hoang Ngo

  • Marko Miljus
    • The Incredible Code Injector

    Hi guys,

    I am working on the implementation of Automessage plugin with CoursePress so you’ll be able to receive e-mails upon number of different actions triggered from CoursePress. The update will be available, probably, by the end of the next week.

    Cheers,

    Marko

  • Mari
    • Design Lord, Child of Thor

    Hi Marko,

    Fantastic news! :slight_smile:

    I’m looking forward to having an email function included – not only for letting instructors know about new signups, but also hope letting students know about new announcements and discussions added to the courses they are taking. Not sure if the next update will be doing all that, but it’s good news nonetheless. :slight_smile:

    –Mari

  • Bryan
    • Site Builder, Child of Zeus

    I noticed that there is a file named class.automessage-integration.php included with the plugin. I have installed Automessage, but I am not seeing it work. am I missing something? Has this been implemented yet? If so, how can I use it?

  • Hoang Ngo
    • Code Slayer

    Hi @bryan,

    I hope you are well today.

    After you installed the Automessage, you need to setup the message sending rule. Please go to WP-Admin->Automessage->User Level Messages->Add new, from here you can setup the message content, when to send new message etc.

    If you have any issues please don’t hesitate to let us know so we can assist

    Best regards,

    Hoang

  • Vaughan
    • Support/SLS MockingJay

    Hi Tony,

    I’ll just tag @marko Miljus for you, he should then receive this message, i’m not sure that the automessage integration is fully complete yet as Marko has really been busy working on MP3.0 which has taken up a lot of time.

    Appreciate your patience, hopefully it should be completed soon though.

    Cheers

  • Vinod Dalvi
    • WP Unicorn

    Hi Mehdi,

    The plugin developer is working on it but due to other higher responsibilities the feature implementation is not completed yet.

    I hope it will be developed ASAP but We don’t publish ETAs to prevent disappointment if a deadline is missed(which in plugin development quite a frequent occurrence!).

    In the meanwhile you can also use the custom solution posted in the following reply.

    https://premium.wpmudev.org/forums/topic/is-coursepress-pro-able-to-send-notifications-to-teachers-about-enrollmentassignments#post-774620

    Thanks,

    Vinod Dalvi

  • Mehdi
    • Flash Drive

    Hi Vinod,

    I totally understand your point :slight_smile:

    The quick fix mentioned is for email when an user enroll to a course. What i need and i think is much more important in elearning is :

    1) To recieve an email when a new assignement is sent with a direct link to the assignement.

    Is that possible ?

    Thx for getting back quickly :wink:

  • Patrick
    • Support Monkey

    Hi there @mehdi

    I hope you’re having a great day!

    If I understand correctly, you’d like this email notification to be triggered when a student completes a Course Unit Element that is set to Mandatory & Assessable so you can grade the student’s answer and allow him/her to continue. Is that right?

    If so, we’ll be sure to pass that along to the developers of both CoursePress & Automessage to ensure that the required hooks are included in whatever processes are being added.

  • Bryan
    • Site Builder, Child of Zeus

    Hi @patrick,

    I think that this specific feature is what we are all waiting for. Currently, if a student completes a mandatory & assessable element, the only way that we know is by logging in to our system every day to check. And, sometimes we have to do this multiple times each day. Then we have to navigate the system to find the single element that needs to be graded. It would be nice to get a notification each time one of these elements are completed with a direct link to grade that element.

    Something that may be helpful with this is the option to assign a student to an instructor(s). This way the notification email has the option to either go to every instructor on a course, only to the student’s instructor(s), or a default instructor. The default instructor would have the permissions to assign a student to any other instructor(s) with or without asking the other instructors’ approval (via a checkbox). Any instructor may assign any of their own students to another instructor(s) with the other instructor approving the transfer. Any admin user may assign students to any instructor(s) with or without the instructors’ approval.

    I can add this as a feature request if it is too far away from the original thought here. Thanks for all of the great support!

  • Mehdi
    • Flash Drive

    Hey guys,

    Some news about that feature ? Its really important because the assignments management is really awful in coursepress pro. Please add the feature or change the way we can access/search/correct assignments. Im losing a lot of time now as my business is raising (200+ students, 10+ courses, 200+ assignments).

    Thank you guys

  • Vinod Dalvi
    • WP Unicorn

    Hi Mehdi,

    I can see in the following coursepress plugin file the code has developed to integrate coursepress plugin and automessage plugin but it seems the code is not completed yet so i have notified the developers @marko Miljus and @Rheinard to get their valuable replies here regarding the development progress of it.

    /coursepress/includes/classesclass.automessage-integration.php

    Thanks,

    Vinod Dalvi

  • Mehdi
    • Flash Drive

    Hey guys,

    Hope you’re doing well. Its been more than a month now on this issue also and still nothing… I have 255 students, more than 10 courses and literally hundreds of assignments. I really can’t manage all this by myself because of the poor assignment management. Please do something about that quickly.

  • Patrick
    • Support Monkey

    Hey there @mehdi

    I hope you had a great weekend!

    I just spoke with the developer of the Automessage plugin and he informed me that the required modifications to it have proved to be a whole lot more complicated than originally thought.

    Also, he & the rest of the development team have been very occupied these last several months with other projects that really ate up their time.

    However, he has assured me that he will be able to devote more attention to other projects like this one as of next week. So we can hope for an update on the situation after that time.

  • Sajid
    • DEV MAN’s Sidekick

    Hi @mehdi

    Hope you are doing good :slight_smile:

    Developer of this plugin is working frantically on a major release of CoursePress Pro with lots of improvements and bug fixes.

    I am afraid we are unable to make an ETA. Please keep an eye on this thread for updates.

    Take care and thanks for your patience :slight_smile:

    Cheers, Sajid

  • Robert
    • WPMU DEV Initiate

    Wow this thread has been ongoing since Nov 2014… almost 2 years and no sign on this feature yet? Please WPMUDEV let’s get this one moving. I too need to get this feature going, I’m embedding Jotform forms into my pages for assessments at the moment, so at least I get a live email to confirm an assessment has been completed. Thanks :slight_smile:

  • Nastia
    • Support Rock Star

    Hello Caroline

    I trust you are doing well today. Is this request is quite old.

    Thank you for letting us know about the Jotform, this might be usefull to out other members.

    This feature might take a little longer to be implemented inside the plugin. Our developers are working on a new version of CoursePress 2.0, I can’t provide an ETA right now, when it’s going to be out officially, but it is gonna be great!

    Kind Regards,

    Nastia

  • Bryan
    • Site Builder, Child of Zeus

    Jotform is not a very sustainable option for us – or at least me, at the moment. The cost and extra time are just not worth it to do what seems to be something that should be an inherent part of this plugin.

    Forgive me if I am off too much by this, but, I would think that it would be fairly easy for one to be able to trigger a simple php email whenever the code is called to save/submit an answer from the user. Maybe even offer the option to use a smtp mailer instead of the default php mailer.

    sudo code:

    If (element is submitted and assessable) {

    $to_email = get_instructor_email;

    $subject = get_student_username() . ‘ submitted an assessment on ‘ . get_bloginfo( ‘name’ );

    $message = ‘Dear ‘ . get_instructor_name . ‘, rn’ . get_student_username() . ‘ has submitted an answer to ‘ . get_assesment_name() . ‘. You may view and grade the assessment here ‘ . get_assessment_url();

    mail($to_email, $subject, $message);

    }

    I would “hack” my own install if I knew where the specific calls were for me to insert a more formal and better thought through code snippet than the one above.

  • Robert
    • WPMU DEV Initiate

    Correct Bryan – I’m paying a subscription to this so don’t want to have to pay a subscription to Jotform too. I can see that a developer had started to crunch out some code earlier in the thread, but that seemed to stop and never resumed. :slight_frown:

    Coursepress Pro 2.0 – Tell me more! What’s the main features and benefits of 2.0 – Would be great if we could get Assessment completion notifications, New User notifications, LRS integration, ability to duplicate units, the functionality to show the correct answer when someone selects the incorrect answer in quiz… :slight_smile:

  • Nastia
    • Support Rock Star

    Hello morfjord ,

    It took some time, though the CoursePress 2.0 is almost ready, it’s on alpha testing stage and it is our high priority now.

    This feature might not be implemented in 2.0 but it will be added to 2.X. This, because the CoursePrse is rewritten from the scratch and out high priority is to build the basic features for the End user.

    I hope this helps!

    Cheers,

    Nastia

  • Nastia
    • Support Rock Star

    Hello morfjord ,

    Unfortunatelly, the beta version is not out yet and I can not provide an ETA when the plugin will be out.

    Even when the new CoursePress will be out, this feature might not be included in 2.0 and it will be added in later updates. I am afraid we do not accept payments for custom projects, if this feature is vital and you need it right away, please feel free to post a new job in the Jobs & Pros section, so an independent developer can do this for you.

    Kind regrads,

    Nastia

  • Nastia
    • Support Rock Star

    Hello morfjord ,

    Unfortunatelly, the beta version is not out yet and I can not provide an ETA when the plugin will be out.

    Even when the new CoursePress will be out, this feature might not be included in 2.0 and it will be added in later updates. I am afraid we do not accept payments for custom projects, if this feature is vital and you need it right away, please feel free to post a new job in the Jobs & Pros section, so an independent developer can do this for you.

    Kind regrads,

    Nastia

  • Sajid
    • DEV MAN’s Sidekick

    Hello morfjord,

    Hope you are doing good today :slight_smile:

    I am sorry but this feature is not added in the latest public version of CoursePress. As mentioned by Nastia above, we can not provide an ETA of whether or when exactly it will be added in the plugin. Sorry!

    Best Regards,

    Sajid

  • Nastia
    • Support Rock Star

    Hello morfjord ,

    My apologies for the inconvenience this delay might have caused you. Unfortunately, we can’t provide an ETA for this feature.

    Someone who will like to get a programmer job?

    If this feature is essentials to your site and you need it right away, please feel free to post a new job in the Jobs & Pros section. In Jobs & Pros section you will find skillful developers that can develop the notification feature for you.

    Have a nice day and take care!

    Kind regards,

    Nastia

  • Adam Czajczyk
    • Support Gorilla

    Hi marjet

    You’re asking about the notifications mentioned in an original post, right? Some of them are already available in CoursePress already. If you go to “CoursePress -> Settings -> E-mail Settings” page in your site back-end you’ll see a number of e-mails listed there and among them are:

    – Enrollment Notification for Instructor E-mail

    – Instructor Invitation to a Course E-mail

    – Discussion Notification E-mail

    These are those that are being sent to instructors (teachers). There are also other that are sent to students in different cases.

    Kind regards,

    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.