@@ 2048-2052 (lines=5) @@ | ||
2045 | ++$question_count; |
|
2046 | ||
2047 | $quizzes = get_post_meta( $question_id, '_quiz_id', false ); |
|
2048 | if( ! in_array( $quiz_id, $quizzes ) ) { |
|
2049 | add_post_meta( $question_id, '_quiz_id', $quiz_id, false ); |
|
2050 | $lesson_id = get_post_meta( $quiz_id, '_quiz_lesson', true ); |
|
2051 | update_post_meta( $lesson_id, '_quiz_has_questions', '1' ); |
|
2052 | } |
|
2053 | ||
2054 | add_post_meta( $question_id, '_quiz_question_order' . $quiz_id, $quiz_id . '000' . $question_count ); |
|
2055 | $question_type = Sensei()->question->get_question_type( $question_id ); |
|
@@ 2409-2413 (lines=5) @@ | ||
2406 | ++$question_count; |
|
2407 | ||
2408 | // Set post meta |
|
2409 | if( 'quiz' == $context ) { |
|
2410 | add_post_meta( $question_id, '_quiz_id', $quiz_id, false ); |
|
2411 | $lesson_id = get_post_meta( $quiz_id, '_quiz_lesson', true ); |
|
2412 | update_post_meta( $lesson_id, '_quiz_has_questions', '1' ); |
|
2413 | } |
|
2414 | ||
2415 | if( isset( $question_grade ) ) { |
|
2416 | add_post_meta( $question_id, '_question_grade', $question_grade ); |