Code Duplication    Length = 13-13 lines in 2 locations

includes/class-sensei-updates.php 2 locations

@@ 604-616 (lines=13) @@
601
	 * @access public
602
	 * @return void
603
	 */
604
	public function set_default_quiz_grade_type() {
605
		$args = array(	'post_type' 		=> 'quiz',
606
						'posts_per_page' 		=> -1,
607
						'post_status'		=> 'publish',
608
						'suppress_filters' 	=> 0
609
						);
610
		$quizzes = get_posts( $args );
611
612
		foreach( $quizzes as $quiz ) {
613
			update_post_meta( $quiz->ID, '_quiz_grade_type', 'auto' );
614
			update_post_meta( $quiz->ID, '_quiz_grade_type_disabled', '' );
615
		}
616
	} // End set_default_quiz_grade_type
617
618
	/**
619
	 * Set default question type
@@ 751-763 (lines=13) @@
748
	 * @since  1.4.0
749
	 * @return boolean
750
	 */
751
	public function update_question_grade_points() {
752
		$args = array(	'post_type' 		=> 'question',
753
						'posts_per_page' 		=> -1,
754
						'post_status'		=> 'publish',
755
						'suppress_filters' 	=> 0
756
						);
757
		$questions = get_posts( $args );
758
759
		foreach( $questions as $question ) {
760
			update_post_meta( $question->ID, '_question_grade', '1' );
761
		}
762
		return true;
763
	} // End update_question_grade_points
764
765
	/**
766
	 * Convert all essay paste questions into multi-line for v1.5.0