/** * EnrollUserToCourse. * php version 5.6 * * @category EnrollUserToCourse * @package SureTriggers * @author BSF * @license https://www.gnu.org/licenses/gpl-3.0.html GPLv3 * @link https://www.brainstormforce.com/ * @since 1.0.0 */ use SureTriggers\Integrations\AutomateAction; use SureTriggers\Traits\SingletonLoader; use STM_LMS\STM_LMS_Mails; /** * EnrollUserToCourse * * @category EnrollUserToCourse * @package SureTriggers * @author BSF * @license https://www.gnu.org/licenses/gpl-3.0.html GPLv3 * @link https://www.brainstormforce.com/ * @since 1.0.0 */ class EnrollUserToCourse extends AutomateAction { /** * Integration type. * * @var string */ public $integration = 'MasterStudyLms'; /** * Action name. * * @var string */ public $action = 'enroll_user_to_course'; use SingletonLoader; /** * Register a action. * * @param array $actions actions. * @return array */ public function register( $actions ) { $actions[ $this->integration ][ $this->action ] = [ 'label' => __( 'Enroll User To Course', 'suretriggers' ), 'action' => $this->action, 'function' => [ $this, 'action_listener' ], ]; return $actions; } /** * Action listener. * * @param int $user_id user_id. * @param int $automation_id automation_id. * @param array $fields fields. * @param array $selected_options selectedOptions. * @psalm-suppress UndefinedMethod * @throws Exception Exception. * * @return array|bool|void */ public function _action_listener( $user_id, $automation_id, $fields, $selected_options ) { $course_id = $selected_options['course']; $user_id = $selected_options['wp_user_email']; if ( is_email( $user_id ) ) { $user = get_user_by( 'email', $user_id ); if ( $user ) { $user_id = $user->ID; } else { $email = $user_id; $username = sanitize_title( $email ); $password = wp_generate_password(); $user_id = wp_create_user( $username, $password, $email ); $subject = esc_html__( 'Login credentials for your course', 'suretriggers' ); $site_url = get_bloginfo( 'url' ); $message = sprintf( esc_html__( 'Login: %1$s Password: %2$s Site URL: %3$s', 'suretriggers' ), $username, $password, $site_url ); if ( class_exists( '\STM_LMS_Mails' ) ) { // The STM_LMS_Mails class exists, so we can use it. \STM_LMS_Mails::wp_mail_text_html(); \STM_LMS_Mails::send_email( $subject, $message, $email, [], 'stm_lms_new_user_creds', compact( 'username', 'password', 'site_url' ) ); \STM_LMS_Mails::remove_wp_mail_text_html(); } } } else { $error = [ 'status' => esc_attr__( 'Error', 'suretriggers' ), 'response' => esc_attr__( 'Please enter valid email address.', 'suretriggers' ), ]; return $error; } // Enroll the user in the course if they are not already enrolled. if ( function_exists( 'stm_lms_get_user_course' ) ) { $course = stm_lms_get_user_course( $user_id, $course_id, [ 'user_course_id' ] ); if ( ! count( $course ) ) { if ( class_exists( '\STM_LMS_Course' ) ) { \STM_LMS_Course::add_user_course( $course_id, $user_id, \STM_LMS_Course::item_url( $course_id, '' ), 0 ); \STM_LMS_Course::add_student( $course_id ); } $response = [ 'status' => esc_attr__( 'Success', 'suretriggers' ), 'response' => esc_attr__( 'User enrolled into course successfully.', 'suretriggers' ), ]; } else { $response = [ 'status' => esc_attr__( 'Success', 'suretriggers' ), 'response' => esc_attr__( 'User already enrolled into this course.', 'suretriggers' ), ]; } return $response; } } } EnrollUserToCourse::get_instance(); Educational Institution - Profit Mentoring

Educational Institution

Detailed close-up of a hand pointing at colorful charts with a blue pen on wooden surface.

I was invited by one of my clients (NIIT Franchise) to see what is going wrong in the business as he was suffering losses from the last 6 months. I did my Right Fit (discovery meeting) with him to see what he is doing to improve his business and offered him a Financial Assessment. After a week doing my financial assessment I met him for Financial Assessment review meeting in which I asked him what will he do to improve his business. He said I’ll do more marketing. In my financial assessment I discovered that he is getting 10 leads every day i.e., there is footfall of 10 students every day but they are able to convert only 1 student out of it. With this his Income statement was like this:

Monthly Revenue – 500,000
Franchise Fee (40%) – 200,000
Salaries – 200,000
Rent – 100,000
Overheads – 50,000
Overall Loss – (50,000)

What I suggested him is, there is no problem with the marketing but the Conversion rate. His conversion rate is only 10% right now, if he can increase the rate to 20%, meaning 2 students out of 10, he can improve his business; in that way let’s see his Income Statement:

Monthly Revenue – 1,000,000
Franchise Fee (40%) – 400,000
Salaries – 200,000
Rent – 100,000
Overheads – 50,000
Overall Profit – 250,000

Which he said he can do it alone and he was in profits next month only and after that we worked on 30% and so forth and keep improving his profits and cash flows.

So you see, we need to find out the real problem before we can make any decision for the solution.

Author

  • As both, an accountant and a business owner, I understand the challenges of growing a profitable business. I specialize in spotting the reasons behind poor profitability and cash flow, and more importantly, I know how to fix them. My mission is to help business owners like you achieve sustainable growth and profitability. With my financial expertise and hands-on experience, I’m dedicated to guiding you toward a more successful business.

    View all posts
Scroll to Top