student course details page navigation disappears

Hi, in student view, they click the 'Course Details' link and the subnavigation disappears, leaving them nowhere to go.

  • Sajid
    • DEV MAN’s Sidekick

    Hi @rogera,

    Hope you are doing good today :slight_smile:

    When you click on course detail link it will take you to the details page of course from where you can click on continue learning button to get back to the course page with sub navigation.

    Adding subnavigation for students on course page is quite a complex job and requires some custom development that is beyond the level of support we can provide here.

    However, if you wish I could move it to features and feedback section from where it can be considered for development if it gets enough +1's from other members of community.

    Take care and have a nice day :slight_smile:
    Cheers, Sajid

  • Roger Allsopp
    • Site Builder, Child of Zeus

    Sajid, the key thing to bear in mind here is USER EXPERIENCE. Courspress is not being deployed for me or for you, it's for hundreds, possibly thousands of people whose only motivation is to log on and complete courses. They do not want to be challenged by difficult, quirky navigation that hasn't been properly thought through - that's just a roadblock for them.

  • Sajid
    • DEV MAN’s Sidekick

    Hi @rogera,

    Hope you are doing good today :slight_smile:

    I agree with you and come up with a code snippet to display the quick links on course detail page.

    Open up single-course.php file and add following code where you want display the links. If you don't have single-course.php file then copy the single.php file, paste in the same directory and rename it to
    single-course.php.

    if( is_user_logged_in() ){
    		global $post;
    		$user_id = get_current_user_id();
    		$student = new Student( $user_id );
    		$student->enrolled = $student->user_enrolled_in_course( $post->ID );
    		if( $student->enrolled ){
    			// So, the user is a student of current course
    			// Do whatever you want
    			echo do_shortcode( '[course_unit_archive_submenu]' );
    
    		}
    }

    Also, we are continuously working on improvements of CoursePress plugin that will be out soon so stay tuned :slight_smile:

    Best Regards,
    Sajid J

  • Sajid
    • DEV MAN’s Sidekick

    Hi @rogera,

    Hope you are doing good today :slight_smile:

    There are few exceptions for this code snippet. One if the user is not login and second user is enrolled to current visible course (I tested this before suggesting and it worked for me).

    If its still not working then please send in FTP and WordPress admin login details. I will make this change for you. You can send in these details using our private contact form in following format.

    Subject: "Attn: Sajid Javed"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me

    https://premium.wpmudev.org/contact/

    Also, its recommended never ever add PHP snippet via Appearance > Editor. Because if there is slight mistake it can break your website and changes can't be reverted unless you go to the file via FTP and remove the code manually.

    Take care and have a nice day :slight_smile:
    Cheers, Sajid

  • Roger Allsopp
    • Site Builder, Child of Zeus

    Hi Sajid, thanks for offering to insert the snippet. I did originally try to add it to the template via FTP, but the server, whose management is out of my hands, has a very complicated read/write permissions structure. In this case, it would not allow me to save the template onto the server. If you could describe to me exactly where within the template it should appear, I would be happy to retry using the appearance>editor.

  • Sajid
    • DEV MAN’s Sidekick

    Hi @rogera,

    Hope you are doing good today :slight_smile:

    I can see you are using lamda child theme but adding the code in CoursePress (it does not loads automatically you have to activate it from appearance > themes if you want to use this one instead of the active one) theme.

    In this case here are the steps to follow.

    1. Go to you parent theme lamda.

    2. Copy single.php file from parent and paste in lamd child theme.

    3. Rename this file to single-course.php file.

    4. Now open it up via FTP or Appearance > Editor > Lamda Child theme this file and add the code before loop as seen in the attached screenshot.

    5. Done.

    Feel free to post a reply if you need further assistance :slight_smile:
    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.