PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | inc/question/class-lp-question-multi-choice.php +4 -4 4.1.74.4.8 View file →
@@ -58,18 +58,18 @@
58 58
59 59 if ( $answers ) {
60 60 $correct = true;
61 61 foreach ( $answers as $key => $option ) {
62 - $selected = $this->is_selected_option( $option, $user_answer );
62 + $data = $option->get_data();
63 + $selected = $this->is_selected_option( $data, $user_answer );
63 64
64 - // If the option is FALSE but user selected => WRONG
65 65 if ( $selected && ! $option->is_true() ) {
66 66 $correct = false;
67 - } elseif ( ! $selected && $option->is_true() ) { // If option is TRUE but user did not select => WRONG
67 + } elseif ( ! $selected && $option->is_true() ) {
68 68 $correct = false;
69 69 }
70 70
71 - // Only one option is selected wrong
71 + // Only one option is selected wrong will wrong the answer.
72 72 if ( ! $correct ) {
73 73 break;
74 74 }
75 75 }