I want the fold icon to show for both the admin and student

In the course description page in course structure I show the fold option for admin but not for the student.

This is for admin:

https://cdn.livechat-static.com/api/file/v2/lc/att-old/8801096/eb2873ddc7ac5e111f18ee39a11b3a89/have%20look%20to%20his.png

The is for the student:

https://cdn.livechat-static.com/api/file/v2/lc/att-old/8801096/c78429eb067b4745265dae58eb3ca021/have%20look%20to%20his_(1).png

How can I show it for the student too?

  • Dimitris
    • Support Star

    Hello there atlantis,

    hope you're doing well and thanks for reaching us! :slight_smile:

    As far as I understand the auto-collapse for students is happening based on the actual progress that current student has. I've already forwarded this to our Second Level Support team for further investigation though. Me or another colleague of mine will keep you posted here as soon as there's any development on this. Your patience is highly appreciated!

    Thank you,
    Dimitris

  • Panos
    • SLS

    Hi there atlantis !

    The fold icon should show if user is admin or if the unit is available and has modules. It won't show only if it is empty. I don't have access to your site so I'm not sure about the course set up, here is a simple snippet you can use to force the fold icon to show:

    add_action( 'wp_footer', function(){
    
    	if ( ! CoursePress_Data_Course::is_course( get_the_ID() ) ) {
            return;
        }
    	?>
    	<script type="text/javascript">
    		($ => {
    			$( document ).ready(function(){
    				var fold = $( '<span />', { 'class' : 'fold' } );
    				$( '.units-archive-list li .course-progress-disc-container' ).after( fold );
    			});
    		})(jQuery);
    	</script>
    	<?php
    
    } );

    You can add this in a mu-plugin or in your child theme's functions.php file. If it doesn't work I would need to have a look at your site so I would need admin and ftp access. You can send admin and fto credentials privately through our contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    Send in:Subject: "Attn: Panos Lyrakis"

    - Admin login:
    Admin username
    Admin password
    Login url

    - FTP credentials
    host
    username
    password
    (and port if required)

    - link back to this thread for reference

    Kind regards!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.