Code Duplication    Length = 6-6 lines in 2 locations

includes/class-sensei-quiz.php 2 locations

@@ 129-134 (lines=6) @@
126
     */
127
    public function user_save_quiz_answers_listener(){
128
129
        if( ! isset( $_POST[ 'quiz_save' ])
130
            || !isset( $_POST[ 'sensei_question' ] )
131
            || empty( $_POST[ 'sensei_question' ] )
132
            ||  ! wp_verify_nonce( $_POST['woothemes_sensei_save_quiz_nonce'], 'woothemes_sensei_save_quiz_nonce'  ) > 1 ) {
133
            return;
134
        }
135
136
        global $post;
137
        $lesson_id = $this->get_lesson_id( $post->ID );
@@ 304-309 (lines=6) @@
301
	public function user_quiz_submit_listener() {
302
303
        // only respond to valid quiz completion submissions
304
        if( ! isset( $_POST[ 'quiz_complete' ])
305
            || !isset( $_POST[ 'sensei_question' ] )
306
            || empty( $_POST[ 'sensei_question' ] )
307
            ||  ! wp_verify_nonce( $_POST['woothemes_sensei_complete_quiz_nonce'], 'woothemes_sensei_complete_quiz_nonce'  ) > 1 ) {
308
            return;
309
        }
310
311
        global $post, $current_user;
312
        $lesson_id = $this->get_lesson_id( $post->ID );