CoursePress shortcode links are not working

[courses_student_dashboard] are creating some "find out more" links for courses that are not working (redirecting you to the actual course page)

  • Predrag Dubajic

    Hi mediastead,

    I did some tests with [courses_student_dashboard] but it's not creating any "find out more" links for me.

    I also checked your site and on my dashboard page I logged in with the user you provided to in chat, which I previously added as a student of one course, but the "find out more" button still wasn't shown.

    I tried checking in chat for more info about how to replicate this but I couldn't find anything.

    Can you please tell me what I'm missing here?

    Best regards,
    Predrag

  • mediastead

    Sohag,

    Unfortunately, I've been avoiding updating CoursePress because of a number of other bugs. I actaully downgraded to a couple of versions before your most recent version due to a glitch in the video module of CoursePress, an issue with the discussions module, and an issue with the course structure for non-admin users.

    I am worried that if I update at this point, there will be far too many bugs for the website to be user friendly.

    As far as this particular issue is concerned ...

    Honestly, all I really want in the member dashboard is a list of their current courses. If they aren't enrolled, I don't want to list the courses available in the dashboard, I'd rather link them to the course page, so they can browse.

    If you can tell me if there are any functions I can use to build a custom shortcode that loops a student's current courses, I think that would be much better for me.

    Thanks!

  • Ivan

    Hi mediastead !

    If you can tell me if there are any functions I can use to build a custom shortcode that loops a student's current courses, I think that would be much better for me.

    You can try to create MU-plugin as {wordpress_folder}/wp-content/mu-plugins/wpmu_shortcode_enrolled_course_list.php file via FTP with the following code

    <?php
    add_shortcode( 'enrolled_course_list', 'wpmu_shortcode_enrolled_course_list' );
    function wpmu_shortcode_enrolled_course_list() {
    	$user_id = get_current_user_id();
    	$content = '';
    	if ( $user_id ) {
    		$content = do_shortcode( '[course_list student="' . $user_id . '" course_status="incomplete"]' );
    		if ( empty( $content ) ) {
    			// add redirect or some text for students which aren't enrolled
    		}
    	} else {
    		// add redirect or some text for non-logged users
    	}
    	return $content;
    }

    [courses_student_dashboard] are creating some "find out more" links for courses that are not working

    Our developers already know about this issue and they will fix it as soon as possible. Thank you.
    Also, you can change one line in {wordpress_folder}/wp-content/plugins/coursepress/2.0/asset/js/front.js file via FTP - find there .on( "click", ".single_show_cart_button", CoursePress.procederDataLink ); (approximately 474th line) and replace it to .on( "click", ".single_show_cart_button, .featured-course-link button", CoursePress.procederDataLink ); (this solution for current 2.1.0.1 version of the plugin)

    Best regards,
    Ivan.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.