dvadf
File manager - Edit - /home/theblueo/tv/wp-includes/pomo/lib/quiz.tar
Back
partials/attempt.php 0000666 00000007151 15214157375 0010574 0 ustar 00 <?php /** * DEPRECATED * @var [type] */ $certificateLink = null; /** * Identify the quiz status and certification * */ if ( isset( $quiz_attempt['has_graded'] ) && true === (bool) $quiz_attempt['has_graded'] && true === (bool) LD_QuizPro::quiz_attempt_has_ungraded_question( $quiz_attempt ) ) : $status = 'pending'; else : $certificateLink = @$quiz_attempt['certificate']['certificateLink']; $status = empty( $quiz_attempt['pass'] ) ? 'failed' : 'passed'; endif; /** * Set the quiz title and link * */ $quiz_title = ! empty( $quiz_attempt['post']->post_title ) ? $quiz_attempt['post']->post_title : @$quiz_attempt['quiz_title']; $quiz_link = ! empty( $quiz_attempt['post']->ID ) ? learndash_get_step_permalink( intval( $quiz_attempt['post']->ID ), $course_id ) : '#'; /** * Only display the quiz if we've found a title * * @var [string] $quiz_title */ if ( ! empty( $quiz_title ) ) : ?> <div class="<?php echo esc_attr( $status ); ?>"> <?php echo esc_html( $status ); ?> <a href="<?php echo esc_attr( $quiz_link ); ?>"><?php echo esc_html( $quiz_title ); ?></a> <?php if ( ! empty( $certificateLink ) ) : ?> <a href="<?php echo esc_attr( $certificateLink ); ?>&time=<?php echo esc_attr( $quiz_attempt['time'] ); ?>" target="_blank"> <?php esc_html_e( 'Certificate', 'learndash' ); ?> </a> <?php else : echo '-'; endif; ?> <div class="scores"> <?php if ( isset( $quiz_attempt['has_graded'] ) && true === (bool) $quiz_attempt['has_graded'] && true === (bool) LD_QuizPro::quiz_attempt_has_ungraded_question( $quiz_attempt ) ) : echo esc_html_x( 'Pending', 'Pending Certificate Status Label', 'learndash' ); else : echo esc_html( round( $quiz_attempt['percentage'], 2 ) . '%' ); endif; ?> </div> <div class="statistics"> <?php if ( get_current_user_id() === absint( $user_id ) || learndash_is_admin_user() || learndash_is_group_leader_user() ) : if ( ! isset( $quiz_attempt['statistic_ref_id'] ) || empty( $quiz_attempt['statistic_ref_id'] ) ) : $quiz_attempt['statistic_ref_id'] = learndash_get_quiz_statistics_ref_for_quiz_attempt( $user_id, $quiz_attempt ); endif; if ( isset( $quiz_attempt['statistic_ref_id'] ) && ! empty( $quiz_attempt['statistic_ref_id'] ) ) : /** * @since 2.3 * See snippet on use of this filter https://bitbucket.org/snippets/learndash/5o78q */ if ( apply_filters( 'show_user_profile_quiz_statistics', get_post_meta( $quiz_attempt['post']->ID, '_viewProfileStatistics', true ), $user_id, $quiz_attempt, basename( __FILE__ ) ) ) : ?> <a class="user_statistic" data-statistic-nonce="<?php echo esc_attr( wp_create_nonce( 'statistic_nonce_' . $quiz_attempt['statistic_ref_id'] . '_' . get_current_user_id() . '_' . $user_id ) ); ?>" data-user-id="<?php echo esc_attr( $user_id ); ?>" data-quiz-id="<?php echo esc_attr( $quiz_attempt['pro_quizid'] ); ?>" data-ref-id="<?php echo intval( $quiz_attempt['statistic_ref_id'] ); ?>" href="#"><div class="statistic_icon"></div></a> <?php endif; endif; endif; ?> </div> <div class="quiz_date"><?php echo esc_html( learndash_adjust_date_time_display( $quiz_attempt['time'] ) ); ?></div> <?php /** * TODO @37designs Need to query for essays related to this assignment */ $quiz_essays = function_for_related_essays( $quiz_attempt['post']->ID ); if ( ! empty( $quiz_essays ) ) : foreach ( $quiz_essays as $essay ) : SFWD_LMS::get_template( 'quiz/partials/essay-row.php', array( 'essay' => $essay, 'context' => $context, ) ); endforeach; endif; ?> </div> <?php endif; ?> partials/row.php 0000666 00000004310 15214157375 0007717 0 ustar 00 <?php /** * Displays a single quiz row * * Available Variables: * * $user_id : The current user ID * $course_id : The current course ID * $lesson : The current lesson * $topic : The current topic object * $quiz : The current quiz (array) * * @since 3.0 * * @package LearnDash\Course */ $quiz_classes = learndash_quiz_row_classes( $quiz, $context ); $is_sample = ( isset( $lesson['sample'] ) ? $lesson['sample'] : false ); $atts = apply_filters( 'learndash_quiz_row_atts', ( isset( $has_access ) && ! $has_access && ! $is_sample ? 'data-ld-tooltip="' . esc_html__( "You don't currently have access to this content", 'learndash' ) . '"' : '' ) ); /** * Action to add custom content before the quiz row listing * * @since 3.0 */ do_action( 'learndash-quiz-row-before', $quiz['post']->ID, $course_id, $user_id ); ?> <div id="<?php echo esc_attr( 'ld-table-list-item-' . $quiz['post']->ID ); ?>" class="<?php echo esc_attr( $quiz_classes['wrapper'] ); ?>" <?php echo wp_kses_post( $atts ); ?>> <div class="<?php echo esc_attr( $quiz_classes['preview'] ); ?>"> <a class="<?php echo esc_attr( $quiz_classes['anchor'] ); ?>" href="<?php echo esc_attr( learndash_get_step_permalink( $quiz['post']->ID, $course_id ) ); ?>"> <?php /** * Action to add custom content before quiz row status * * @since 3.0 */ do_action( 'learndash-quiz-row-status-before', $quiz['post']->ID, $course_id, $user_id ); learndash_status_icon( $quiz['status'], 'sfwd-quiz', null, true ); /** * Action to add custom content before quiz row title * * @since 3.0 */ do_action( 'learndash-quiz-row-title-before', $quiz['post']->ID, $course_id, $user_id ); ?> <div class="ld-item-title"><?php echo wp_kses_post( $quiz['post']->post_title ); ?></div> <?php /** * Action to add custom content before quiz row title * * @since 3.0 */ do_action( 'learndash-quiz-row-title-after', $quiz['post']->ID, $course_id, $user_id ); ?> </a> </div> <!--/.list-item-preview--> </div> <?php /** * Action to add custom content after the quiz row listing * * @since 3.0 */ do_action( 'learndash-quiz-row-after', $quiz['post']->ID, $course_id, $user_id ); listing.php 0000666 00000005650 15214157375 0006752 0 ustar 00 <?php // Extra sanity check that this lesson has quizzes if ( ! empty( $quizzes ) ) : /** * Action to add custom content before topic list * * @since 3.0 */ do_action( 'learndash-' . $context . '-quiz-list-before', get_the_ID(), $course_id, $user_id ); $is_sample = false; if ( ( isset( $lesson_id ) ) && ( ! empty( $lesson_id ) ) ) { $is_sample = learndash_get_setting( $lesson_id, 'sample_lesson' ); } $table_class = 'ld-table-list ld-topic-list ld-quiz-list' . ( isset( $is_sample ) && 'on' === $is_sample ? ' is_sample' : '' ) ?> <div class="<?php echo esc_attr( $table_class ); ?>"> <div class="ld-table-list-header ld-primary-background"> <?php /** * Action to add custom content before quiz listing header * * @since 3.0 */ do_action( 'learndash-' . $context . '-quiz-list-heading-before', get_the_ID(), $course_id, $user_id ); ?> <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Method escapes output?> <div class="ld-table-list-title"><?php echo LearnDash_Custom_Label::get_label( 'quizzes' ); ?></div> <?php /** * Action to add custom content before the lesson progress stats * * @since 3.0 */ do_action( 'learndash-' . $context . '-quiz-list-progress-before', get_the_ID(), $course_id, $user_id ); ?> <?php /** * TODO @37designs - need to create a function to count quizes complete / incomplete * <span><?php sprintf( '%s% Complete', $lesson_progress['percentage'] ); ?></span> <span><?php sprintf( '%s/%s Steps', $lesson_progress['complete'], $lesson_progress['total'] ); ?></span> */ ?> <div class="ld-table-list-lesson-details"></div> <?php /** * Action to add custom content after the lesson progress stats * * @since 3.0 */ do_action( 'learndash-' . $context . '-quiz-list-progress-after', get_the_ID(), $course_id, $user_id ); ?> <?php /** * Action to add custom content after topic listing header * * @since 3.0 */ do_action( 'learndash-' . $context . '-quiz-list-heading-after', get_the_ID(), $course_id, $user_id ); ?> </div> <!--/.ld-table-list-header--> <div class="ld-table-list-items"> <?php // TODO @37designs Need to check pagination to see if we should show these - think there is a setting here too to disable quizzes in listing? foreach ( $quizzes as $quiz ) : learndash_get_template_part( 'quiz/partials/row.php', array( 'quiz' => $quiz, 'course_id' => $course_id, 'user_id' => $user_id, 'context' => $context, ), true ); endforeach; ?> </div> <!--/.ld-table-list-items--> <div class="ld-table-list-footer"></div> </div> <?php /** * Action to add custom content after topic list * * @since 3.0 */ do_action( 'learndash-' . $context . '-quiz-list-after', get_the_ID(), $course_id, $user_id ); ?> <?php endif;
dvadf
dvadf
| ver. 1.4 |
Github
|
.
| PHP 7.0.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings