public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/classes/courseprogress.php
/**
		 * Method that renders the course progress.
		 */
Method that renders the course progress.
Method that renders the course progress .
public function widget( $args, $instance ) {
			extract( $args );
			$args = array(
				'show_title'            => ( $instance['option_show_course_title'] == 'on' ? 'true' : 'false' ),
				'show_desc'             => ( $instance['option_show_course_desc'] == 'on' ? 'true' : 'false' ),
				'module_desc'           => ( $instance['option_show_module_desc'] == 'on' ? 'true' : 'false' ),
				'only_on_units'         => ( $instance['option_show_only_on_units'] == 'on' ? 'true' : 'false' ),
				'show_modules_next'     => trim( $instance['option_show_modules_next'] ),
				'show_modules_previous' => trim( $instance['option_show_modules_previous'] ),
				'toggle_modules'        => trim( $instance['option_toggle_modules'] ),
				'show_toggle_col'       => true,
				'widget_mode'           => true,
			);
			global $post;
			if ( $args['only_on_units'] == 'true' ) {
				if ( 'course_unit' != get_post_type( $post->ID ) ) {
					return;
				}
			}
			$title = apply_filters( 'widget_title', $instance['title'] );
			echo $before_widget;
			if ( $title ) {
				echo $before_title . $title . $after_title;
			}
			$courseID = absint( $instance['option_course'] );
			echo '<div class="wpcw_widget_progress">';
			echo WPCW_courses_renderCourseList( $courseID, $args );
			echo '</div>';
			echo $after_widget;
		}
public function widget ( $ args , $ instance ) { extract ( $ args ) ; $ args = array ( 'show_title' => ( $ instance [ 'option_show_course_title' ] == 'on' ? 'true' : 'false' ) , 'show_desc' => ( $ instance [ 'option_show_course_desc' ] == 'on' ? 'true' : 'false' ) , 'module_desc' => ( $ instance [ 'option_show_module_desc' ] == 'on' ? 'true' : 'false' ) , 'only_on_units' => ( $ instance [ 'option_show_only_on_units' ] == 'on' ? 'true' : 'false' ) , 'show_modules_next' => trim ( $ instance [ 'option_show_modules_next' ] ) , 'show_modules_previous' => trim ( $ instance [ 'option_show_modules_previous' ] ) , 'toggle_modules' => trim ( $ instance [ 'option_toggle_modules' ] ) , 'show_toggle_col' => true , 'widget_mode' => true , ) ; global $ post ; if ( $ args [ 'only_on_units' ] == 'true' ) { if ( 'course_unit' != get_post_type ( $ post -> ID ) ) { return ; } } $ title = apply_filters ( 'widget_title' , $ instance [ 'title' ] ) ; echo $ before_widget ; if ( $ title ) { echo $ before_title . $ title . $ after_title ; } $ courseID = absint ( $ instance [ 'option_course' ] ) ; echo '<div class="wpcw_widget_progress">' ; echo WPCW_courses_renderCourseList ( $ courseID , $ args ) ; echo '</div>' ; echo $ after_widget ; }
Method that renders the course progress.
Method that renders the course progress .
// Turn options from widget into options for getting course details. //	'module' 		=> trim($instance['option_module']), // Handle widget showing/hiding capability. // This enables the toggle mode for the widget // Widget mode - helps us work out what to do when rendering the page. // Don't do anything if we're not on a unit page