@@ 62-69 (lines=8) @@ | ||
59 | ||
60 | $lesson_grade = 'n/a'; |
|
61 | $has_questions = get_post_meta( $lesson->ID, '_quiz_has_questions', true ); |
|
62 | if ( $has_questions ) { |
|
63 | $lesson_status = Sensei_Utils::user_lesson_status( $lesson->ID, get_current_user_id() ); |
|
64 | // Get user quiz grade |
|
65 | $lesson_grade = get_comment_meta( $lesson_status->comment_ID, 'grade', true ); |
|
66 | if ( $lesson_grade ) { |
|
67 | $lesson_grade .= '%'; |
|
68 | } |
|
69 | } |
|
70 | ?> |
|
71 | <h2> |
|
72 | ||
@@ 116-126 (lines=11) @@ | ||
113 | <?php |
|
114 | $lesson_grade = 'n/a'; |
|
115 | $has_questions = get_post_meta( $lesson->ID, '_quiz_has_questions', true ); |
|
116 | if ( $has_questions ) { |
|
117 | $lesson_status = Sensei_Utils::user_lesson_status( $lesson->ID, get_current_user_id()); |
|
118 | // Get user quiz grade |
|
119 | $lesson_grade = ''; |
|
120 | if( ! empty( $lesson_status ) ) { |
|
121 | $lesson_grade = get_comment_meta( $lesson_status->comment_ID, 'grade', true ); |
|
122 | if ( $lesson_grade ) { |
|
123 | $lesson_grade .= '%'; |
|
124 | } |
|
125 | } |
|
126 | } |
|
127 | ?> |
|
128 | ||
129 | <h2> |