Modifying the Dashboard when there's no enrollments / checkout workflow

We are trying to make an intuitive and easy-flowing sign up process for our (sometimes tech illiterate) subscribers. As it stands, once they create an account via CoursePress Pro, it forwards them to the Dashboard. That's counter-intuitive, because they haven't enrolled into any courses.

Can we modify the system to forward to the course catalog at /courses during sign up instead?

Also, the Dashboard lists random courses at the bottom of the page when a user isn't enrolled in any. This too is counter-intuitive and misleading because our courses are laid out in a specific order and there's no way to view more courses outside of the random three available. Can we remove or modify this section? I would rather it say something like, "You don't have any courses (yet), but let's get started!" along with a link to /courses.

How can we achieve this?

  • Vaughan

    Hi @wpmudev253

    Hope you're well?

    Can you try unchecking the 'Redirect after login' checkbox in the general settings.

    Dashboard > coursepress > settings > general

    That should then hopefully prevent them being redirected to the dashboard page.

    To change the courses on the dashboard page, you can create a custom page and then use shortcodes. Select this custom page in the select page option for course dashboard option in the settings.

    Then use the shortcodes on the page from the shortcodes help page

    Dashboard > coursepress > settings > shortcodes

    You will see a shortcode for [course_list] & [featured_course]

    So you can add these on your custom dashboard page as in the screenshot below.

    Hope this helps

  • Toneee.com

    UGGGH! I replied to this already but it's not showing up in this ticket!! I'm frustrated. I'll try to retype. Also, I have provided support access so you may review.

    The problem with your suggestion is that we don't mind going to the custom dashboard page we already created when there ARE enrolled courses. The problem lies when the student is first enrolling or otherwise have no enrolled courses. To create the dashboard page, I used the [cp_pages page="student_dashboard"] shortcode. It automatically generates the random courses box in the attached illustration.

    The random course offerings (without the ability to view ALL courses) is counter-intuitive to new students during the signup process. We would rather the system skip the Dashboard and head on over to /courses instead. If this is not easily achieved, another option would be NOT to list the random courses and modify the "You are not enrolled in any courses" text to something like, "Looks like you're not enrolled into any courses yet! ENROLL NOW."

    Finally, during checkout, the default is 2 courses instead of 1.

    Thank you.

  • Toneee.com

    I'm sorry, allow me to clarify further. You stated that the following:

    You will see a shortcode for [course_list] & [featured_course]

    There are multiple issues with this option, making it counter-intuitive to the end-user. For example:

    1.) If the student is already enrolled, there's no need to list all courses on the dashboard; a link to /courses is sufficient.

    2.) Even if we got the list to only show up when the student was not enrolled in any courses, the list itself is plain and ugly.

    We would rather the proposal I mentioned in my last reply, which is either:

    a.) Text that includes a link that encourages them to choose a course, linking directly to /courses; or

    b.) Automatically forwarding to courses if no courses are found.

    How can we achieve one of the above?

    Thank you.

  • Vaughan

    Hi,

    Apologies, to do what you're asking would require using a custom template.

    First, copy the following file from your site using FTP.

    /wp-content/plugins/coursepress/includes/templates/student-dashboard.php

    Copy this file to /wp-content/themes/<your current theme>/coursepress/student-dashboard.php

    Now you can open up & edit the file in your editor.

    Firstly, to disable the random course list.

    Find the following:

    if ( empty( $course_list ) && $show_random_courses ) {
    
    			//Random Courses
    			echo '<div class="dashboard-random-courses-list">';
    			echo '<h3 class="title suggested-courses">' . __( 'You are not enrolled in any courses.', 'cp' ) . '</h3>';
    			_e( 'Here are a few to help you get started:', 'cp' );
    			echo '<hr />';
    			echo '<div class="dashboard-random-courses">' . do_shortcode( '[course_random number="3" featured_title="" media_type="image"]' ) . '</div>';
    			echo '</div>';
    		} else {
    			// Course List
    			echo '<div class="dashboard-current-courses-list">';
    			echo '<h1 class="title enrolled-courses-title current-courses-title">' . __( 'Your current courses:', 'cp' ) . '</h1>';
    			echo '<div class="course-list course-list-current course course-student-dashboard">';
    			echo $course_list;
    			echo '</div>';
    			echo '</div>';
    			echo '<div class="clearfix"></div>';
    		}

    Change this to:

    if ( empty( $course_list ) && $show_random_courses ) {
    
    			//Random Courses
    			echo '<div class="dashboard-random-courses-list">';
    			echo '<h3 class="title suggested-courses">' . __( 'Looks like you\'re not enrolled into any courses yet! <a href="' . site_url('/courses/') . '">ENROLL NOW.</a>', 'cp' ) . '</h3>';
    		} else {
    			// Course List
    			echo '<div class="dashboard-current-courses-list">';
    			echo '<h1 class="title enrolled-courses-title current-courses-title">' . __( 'Your current courses:', 'cp' ) . '</h1>';
    			echo '<div class="course-list course-list-current course course-student-dashboard">';
    			echo $course_list;
    			echo '</div>';
    			echo '</div>';
    			echo '<div class="clearfix"></div>';
    		}

    Hopefully that should get you going.

  • Toneee.com

    Thank you so much for your response. Unfortunately, the changes are ignored. I'm not sure whether it matters, but I was using an actual WordPress page containing the [cp_pages page="student_dashboard"] shortcode.

    To recapitulate, I copied /wp-content/plugins/coursepress/includes/templates/student-dashboard.php to /wp-content/themes/Avada/coursepress/student-dashboard.php. (Note that there was no coursepress subfolder; I had to create it myself.) I replaced the coding in the latter file and navigated to the dashboard. I realized then that I was using a custom dashboard page. I wasn't sure whether that made a difference, so I modified the CoursePress Pro settings to use the default virtual page instead. I navigated as a new student to the virtual dashboard page, but it rendered the same results; it still shows the random courses and no sign of change.

    So ultimately, the system seems to ignore the new student-dashboard.php file (located in the Avada/theme folder) altogether.

    I would imagine that any customization to the original student-dashboard.php file will be overwritten once upgraded, right? How do you think I should proceed?

  • Toneee.com

    Thank you very much! While moving the file to the root of the Avada theme worked well, it was ignored when switching back from the virtual dashboard page to the custom dashboard page. However, the coding you gave me allowed me to redirect students to /courses when they aren't enrolled. This was particularly important during the signup process the first time, as we didn't want them to see the dashboard during initial signup.

    I have one more question:
    The /courses page is virtually created. Is there a shortcode for this page, so that we can modify this as well? If not, what is the file used to generate this, so that we can add custom coding ourselves?

    Thanks.

  • Vaughan

    Hi,

    Glad that worked :slight_smile:

    with regards to the /courses virtual page. At this moment it's just a virtualpage, you can't create a normal page. We are hoping to improve this in a future update so that all pages can be made proper instead of virtual.

    You can certainly use a custom template though like for the dashboard.

    You can find all the templates in /wp-content/plugins/coursepress/includes/templates/

    The archive page is

    /wp-content/plugins/coursepress/includes/templates/archive-courses-single.php

    As before, just copy this to the Avada theme folder.

    Hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.