|
@@ 222-225 (lines=4) @@
|
| 219 |
|
|
| 220 |
|
$answers = false; |
| 221 |
|
|
| 222 |
|
if ( ! intval( $lesson_id ) > 0 || 'lesson' != get_post_type( $lesson_id ) |
| 223 |
|
|| ! intval( $user_id ) > 0 || !get_userdata( $user_id ) ) { |
| 224 |
|
return false; |
| 225 |
|
} |
| 226 |
|
|
| 227 |
|
// save some time and get the transient cached data |
| 228 |
|
$transient_key = 'sensei_answers_'.$user_id.'_'.$lesson_id; |
|
@@ 770-773 (lines=4) @@
|
| 767 |
|
$user_id = get_current_user_id(); |
| 768 |
|
} |
| 769 |
|
|
| 770 |
|
if ( ! intval( $lesson_id ) > 0 || 'lesson' != get_post_type( $lesson_id ) |
| 771 |
|
|| ! intval( $user_id ) > 0 || !get_userdata( $user_id ) ) { |
| 772 |
|
return false; |
| 773 |
|
} |
| 774 |
|
|
| 775 |
|
// save some time and get the transient cached data |
| 776 |
|
$transient_key = 'quiz_grades_'. $user_id . '_' . $lesson_id; |
|
@@ 934-937 (lines=4) @@
|
| 931 |
|
$user_id = get_current_user_id(); |
| 932 |
|
} |
| 933 |
|
|
| 934 |
|
if ( ! intval( $lesson_id ) > 0 || 'lesson' != get_post_type( $lesson_id ) |
| 935 |
|
|| ! intval( $user_id ) > 0 || !get_userdata( $user_id ) ) { |
| 936 |
|
return false; |
| 937 |
|
} |
| 938 |
|
|
| 939 |
|
// first check the transient to save a few split seconds |
| 940 |
|
$transient_key = 'sensei_answers_feedback_'.$user_id.'_'.$lesson_id; |