public/wordpress/wp-content/plugins/wp-courseware/includes/models/quiz.php
/**
	 * Disconnect Quiz.
	 *
	 * This will make the quiz disconnected from any unit.
	 *
	 * @since 4.4.0
	 *
	 * @return bool True if it is successfully unassociated.
	 */
Disconnect Quiz.
This will make the quiz disconnected from any unit.



@return bool True if it is successfully unassociated.
Disconnect Quiz . This will make the quiz disconnected from any unit . @return bool True if it is successfully unassociated .
public function disconnect() {
		global $wpdb, $wpcwdb;
		$this->set_prop( 'parent_unit_id', 0 );
		$this->set_prop( 'parent_course_id', 0 );
		$wpdb->query( $wpdb->prepare( "DELETE FROM $wpcwdb->user_progress_quiz WHERE quiz_id = %d", $this->get_id() ) );
		$this->save();
	}
public function disconnect ( ) { global $ wpdb , $ wpcwdb ; $ this -> set_prop ( 'parent_unit_id' , 0 ) ; $ this -> set_prop ( 'parent_course_id' , 0 ) ; $ wpdb -> query ( $ wpdb -> prepare ( " DELETE FROM  $ wpcwdb -> user_progress_quiz  WHERE quiz_id = %d " , $ this -> get_id ( ) ) ) ; $ this -> save ( ) ; }
Disconnect Quiz.
Disconnect Quiz .
// Set Properties. // Delete User Progress // Save Unit.