| @@ -282,14 +282,10 @@ | ||
| 282 | 282 | if ( ! $id || ! in_array( learn_press_get_post_type( $id ), array( 'revision', LP_QUESTION_CPT ) ) ) { |
| 283 | 283 | throw new Exception( sprintf( __( 'Invalid question with ID "%d".', 'learnpress' ), $id ) ); |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | - $question->set_data_via_methods( | |
| 287 | - array( | |
| 288 | - 'explanation' => get_post_meta( $id, '_lp_explanation', true ), | |
| 289 | - 'hint' => get_post_meta( $id, '_lp_hint', true ), | |
| 290 | - ) | |
| 291 | - ); | |
| 286 | + $question->set_explanation( get_post_meta( $id, '_lp_explanation', true ) ); | |
| 287 | + $question->set_hint( get_post_meta( $id, '_lp_hint', true ) ); | |
| 292 | 288 | // $this->_load_answer_options( $question ); |
| 293 | 289 | $this->_load_meta( $question ); |
| 294 | 290 | |
| 295 | 291 | return true; |
| @@ -305,13 +301,9 @@ | ||
| 305 | 301 | } |
| 306 | 302 | // $question->set_type( $type ); |
| 307 | 303 | |
| 308 | 304 | $mark = $this->_get_question_mark( $question->get_id() ); |
| 309 | - $question->set_data_via_methods( | |
| 310 | - array( | |
| 311 | - 'mark' => $mark, | |
| 312 | - ) | |
| 313 | - ); | |
| 305 | + $question->set_mark( $mark ); | |
| 314 | 306 | } |
| 315 | 307 | |
| 316 | 308 | public function _get_question_mark( $question_id ) { |
| 317 | 309 | |