@@ -1,5 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// Exit if accessed directly |
|
| 3 | 6 | |
| 4 | 7 | /** |
| 5 | 8 | * Sensei Analysis Overview List Table Class |
@@ -306,8 +309,7 @@ discard block |
||
| 306 | 309 | // Output course data |
| 307 | 310 | if ( $this->csv_output ) { |
| 308 | 311 | $course_title = apply_filters( 'the_title', $item->post_title, $item->ID ); |
| 309 | - } |
|
| 310 | - else { |
|
| 312 | + } else { |
|
| 311 | 313 | $url = add_query_arg( array( 'page' => $this->page_slug, 'course_id' => $item->ID ), admin_url( 'admin.php' ) ); |
| 312 | 314 | |
| 313 | 315 | $course_title = '<strong><a class="row-title" href="' . esc_url( $url ) . '">' . apply_filters( 'the_title', $item->post_title, $item->ID ) . '</a></strong>'; |
@@ -363,16 +365,14 @@ discard block |
||
| 363 | 365 | // Output lesson data |
| 364 | 366 | if ( $this->csv_output ) { |
| 365 | 367 | $lesson_title = apply_filters( 'the_title', $item->post_title, $item->ID ); |
| 366 | - } |
|
| 367 | - else { |
|
| 368 | + } else { |
|
| 368 | 369 | $url = add_query_arg( array( 'page' => $this->page_slug, 'lesson_id' => $item->ID ), admin_url( 'admin.php' ) ); |
| 369 | 370 | $lesson_title = '<strong><a class="row-title" href="' . esc_url( $url ) . '">' . apply_filters( 'the_title', $item->post_title, $item->ID ) . '</a></strong>'; |
| 370 | 371 | |
| 371 | 372 | if ( $course_id ) { |
| 372 | 373 | $url = add_query_arg( array( 'page' => $this->page_slug, 'course_id' => $course_id ), admin_url( 'admin.php' ) ); |
| 373 | 374 | $course_title = '<a href="' . esc_url( $url ) . '">' . $course_title . '</a>'; |
| 374 | - } |
|
| 375 | - else { |
|
| 375 | + } else { |
|
| 376 | 376 | $course_title = __('n/a', 'woothemes-sensei'); |
| 377 | 377 | } |
| 378 | 378 | if ( is_numeric( $lesson_average_grade ) ) { |
@@ -423,8 +423,7 @@ discard block |
||
| 423 | 423 | // Output the users data |
| 424 | 424 | if ( $this->csv_output ) { |
| 425 | 425 | $user_name = Sensei()->learners->get_learner_full_name( $item->ID ); |
| 426 | - } |
|
| 427 | - else { |
|
| 426 | + } else { |
|
| 428 | 427 | $url = add_query_arg( array( 'page' => $this->page_slug, 'user_id' => $item->ID ), admin_url( 'admin.php' ) ); |
| 429 | 428 | $user_name = '<strong><a class="row-title" href="' . esc_url( $url ) . '">' . $item->display_name . '</a></strong>'; |
| 430 | 429 | $user_average_grade .= '%'; |
@@ -1,5 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// Exit if accessed directly |
|
| 3 | 6 | |
| 4 | 7 | /** |
| 5 | 8 | * Sensei Learners Class |
@@ -342,7 +345,7 @@ discard block |
||
| 342 | 345 | |
| 343 | 346 | $name = $full_name; |
| 344 | 347 | |
| 345 | - }else{ |
|
| 348 | + } else{ |
|
| 346 | 349 | |
| 347 | 350 | $name = $full_name . ' ['. $user->display_name .']'; |
| 348 | 351 | |
@@ -359,11 +362,17 @@ discard block |
||
| 359 | 362 | |
| 360 | 363 | $result = false; |
| 361 | 364 | |
| 362 | - if( ! isset( $_POST['add_learner_submit'] ) ) return $result; |
|
| 365 | + if( ! isset( $_POST['add_learner_submit'] ) ) { |
|
| 366 | + return $result; |
|
| 367 | + } |
|
| 363 | 368 | |
| 364 | - if ( ! isset( $_POST['add_learner_nonce'] ) || ! wp_verify_nonce( $_POST['add_learner_nonce'], 'add_learner_to_sensei' ) ) return $result; |
|
| 369 | + if ( ! isset( $_POST['add_learner_nonce'] ) || ! wp_verify_nonce( $_POST['add_learner_nonce'], 'add_learner_to_sensei' ) ) { |
|
| 370 | + return $result; |
|
| 371 | + } |
|
| 365 | 372 | |
| 366 | - if( ( ! isset( $_POST['add_user_id'] ) || '' == $_POST['add_user_id'] ) || ! isset( $_POST['add_post_type'] ) || ! isset( $_POST['add_course_id'] ) || ! isset( $_POST['add_lesson_id'] ) ) return $result; |
|
| 373 | + if( ( ! isset( $_POST['add_user_id'] ) || '' == $_POST['add_user_id'] ) || ! isset( $_POST['add_post_type'] ) || ! isset( $_POST['add_course_id'] ) || ! isset( $_POST['add_lesson_id'] ) ) { |
|
| 374 | + return $result; |
|
| 375 | + } |
|
| 367 | 376 | |
| 368 | 377 | $post_type = $_POST['add_post_type']; |
| 369 | 378 | $user_id = absint( $_POST['add_user_id'] ); |
@@ -479,7 +488,7 @@ discard block |
||
| 479 | 488 | |
| 480 | 489 | $full_name = trim( $user->first_name ) . ' ' . trim( $user->last_name ); |
| 481 | 490 | |
| 482 | - }else{ |
|
| 491 | + } else{ |
|
| 483 | 492 | |
| 484 | 493 | $full_name = $user->display_name; |
| 485 | 494 | |
@@ -1,5 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// Exit if accessed directly |
|
| 3 | 6 | |
| 4 | 7 | /** |
| 5 | 8 | * Sensei Teacher class |
@@ -414,7 +417,7 @@ discard block |
||
| 414 | 417 | $existing_term = get_term_by( 'slug', $new_author_term_slug, 'module'); |
| 415 | 418 | $term_id = $existing_term->term_id; |
| 416 | 419 | |
| 417 | - }else{ |
|
| 420 | + } else{ |
|
| 418 | 421 | |
| 419 | 422 | // for a new term simply get the term from the returned value |
| 420 | 423 | $term_id = $new_term['term_id']; |
@@ -495,7 +498,7 @@ discard block |
||
| 495 | 498 | 'post_author' => $new_author |
| 496 | 499 | ) ); |
| 497 | 500 | } |
| 498 | - }else{ |
|
| 501 | + } else{ |
|
| 499 | 502 | wp_update_post( array( |
| 500 | 503 | 'ID' => $lesson_quizzes, |
| 501 | 504 | 'post_author' => $new_author |
@@ -789,7 +792,7 @@ discard block |
||
| 789 | 792 | // merge the post types instead of overwriting it |
| 790 | 793 | $new_post_types = array_merge( $current_post_types, array( 'course' ) ); |
| 791 | 794 | |
| 792 | - }else{ |
|
| 795 | + } else{ |
|
| 793 | 796 | |
| 794 | 797 | // in this instance it is probably just one post type in string format |
| 795 | 798 | $new_post_types = array( $current_post_types , 'course'); |
@@ -979,7 +982,7 @@ discard block |
||
| 979 | 982 | $course_learner_ids[] = $user->ID; |
| 980 | 983 | } |
| 981 | 984 | |
| 982 | - }else{ |
|
| 985 | + } else{ |
|
| 983 | 986 | |
| 984 | 987 | $user = get_userdata( $activity_comments->user_id ); |
| 985 | 988 | $course_learner_ids[] = $user->ID; |
@@ -996,7 +999,7 @@ discard block |
||
| 996 | 999 | |
| 997 | 1000 | $args[ 'include'] = array( 0 ); |
| 998 | 1001 | |
| 999 | - }else{ |
|
| 1002 | + } else{ |
|
| 1000 | 1003 | |
| 1001 | 1004 | $args[ 'include'] = $learner_ids_for_teacher_courses; |
| 1002 | 1005 | |
@@ -1164,7 +1167,7 @@ discard block |
||
| 1164 | 1167 | |
| 1165 | 1168 | $teachers_courses[] = $course->ID; |
| 1166 | 1169 | |
| 1167 | - }else{ |
|
| 1170 | + } else{ |
|
| 1168 | 1171 | |
| 1169 | 1172 | $teachers_courses[] = $course; |
| 1170 | 1173 | |
@@ -1534,7 +1537,7 @@ discard block |
||
| 1534 | 1537 | |
| 1535 | 1538 | return true; |
| 1536 | 1539 | |
| 1537 | - }else{ |
|
| 1540 | + } else{ |
|
| 1538 | 1541 | |
| 1539 | 1542 | return false; |
| 1540 | 1543 | |
@@ -1,5 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// Exit if accessed directly |
|
| 3 | 6 | |
| 4 | 7 | /** |
| 5 | 8 | * Sensei Grading User Quiz Class |
@@ -172,8 +175,7 @@ discard block |
||
| 172 | 175 | ++$correct_answers; |
| 173 | 176 | ++$graded_count; |
| 174 | 177 | $user_question_grade = 0; |
| 175 | - } |
|
| 176 | - elseif( intval( $user_question_grade ) > 0 ) { |
|
| 178 | + } elseif( intval( $user_question_grade ) > 0 ) { |
|
| 177 | 179 | $graded_class = 'user_right'; |
| 178 | 180 | ++$correct_answers; |
| 179 | 181 | $user_quiz_grade_total += $user_question_grade; |
@@ -1,5 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// Exit if accessed directly |
|
| 3 | 6 | |
| 4 | 7 | /** |
| 5 | 8 | * Sensei Grading Overview List Table Class |
@@ -155,8 +158,7 @@ discard block |
||
| 155 | 158 | |
| 156 | 159 | if( $this->lesson_id ) { |
| 157 | 160 | $activity_args['post_id'] = $this->lesson_id; |
| 158 | - } |
|
| 159 | - elseif( $this->course_id ) { |
|
| 161 | + } elseif( $this->course_id ) { |
|
| 160 | 162 | // Currently not possible to restrict to a single Course, as that requires WP_Comment to support multiple |
| 161 | 163 | // post_ids (i.e. every lesson within the Course), WP 4.1 ( https://core.trac.wordpress.org/changeset/29808 ) |
| 162 | 164 | if ( version_compare($wp_version, '4.1', '>=') ) { |
@@ -231,24 +233,19 @@ discard block |
||
| 231 | 233 | if( 'complete' == $item->comment_approved ) { |
| 232 | 234 | $status_html = '<span class="graded">' . __( 'Completed', 'woothemes-sensei' ) . '</span>'; |
| 233 | 235 | $grade = __( 'No Grade', 'woothemes-sensei' ); |
| 234 | - } |
|
| 235 | - elseif( 'graded' == $item->comment_approved ) { |
|
| 236 | + } elseif( 'graded' == $item->comment_approved ) { |
|
| 236 | 237 | $status_html = '<span class="graded">' . __( 'Graded', 'woothemes-sensei' ) . '</span>'; |
| 237 | 238 | $grade = get_comment_meta( $item->comment_ID, 'grade', true) . '%'; |
| 238 | - } |
|
| 239 | - elseif( 'passed' == $item->comment_approved ) { |
|
| 239 | + } elseif( 'passed' == $item->comment_approved ) { |
|
| 240 | 240 | $status_html = '<span class="passed">' . __( 'Passed', 'woothemes-sensei' ) . '</span>'; |
| 241 | 241 | $grade = get_comment_meta( $item->comment_ID, 'grade', true) . '%'; |
| 242 | - } |
|
| 243 | - elseif( 'failed' == $item->comment_approved ) { |
|
| 242 | + } elseif( 'failed' == $item->comment_approved ) { |
|
| 244 | 243 | $status_html = '<span class="failed">' . __( 'Failed', 'woothemes-sensei' ) . '</span>'; |
| 245 | 244 | $grade = get_comment_meta( $item->comment_ID, 'grade', true) . '%'; |
| 246 | - } |
|
| 247 | - elseif( 'ungraded' == $item->comment_approved ) { |
|
| 245 | + } elseif( 'ungraded' == $item->comment_approved ) { |
|
| 248 | 246 | $status_html = '<span class="ungraded">' . __( 'Ungraded', 'woothemes-sensei' ) . '</span>'; |
| 249 | 247 | $grade = __( 'N/A', 'woothemes-sensei' ); |
| 250 | - } |
|
| 251 | - else { |
|
| 248 | + } else { |
|
| 252 | 249 | $status_html = '<span class="in-progress">' . __( 'In Progress', 'woothemes-sensei' ) . '</span>'; |
| 253 | 250 | $grade = __( 'N/A', 'woothemes-sensei' ); |
| 254 | 251 | } |
@@ -276,8 +273,7 @@ discard block |
||
| 276 | 273 | $course_title = ''; |
| 277 | 274 | if ( !empty($course_id) && version_compare($wp_version, '4.1', '>=') ) { |
| 278 | 275 | $course_title = '<a href="' . esc_url( add_query_arg( array( 'page' => $this->page_slug, 'course_id' => $course_id ), admin_url( 'admin.php' ) ) ) . '">' . get_the_title( $course_id ) . '</a>'; |
| 279 | - } |
|
| 280 | - else if ( !empty($course_id) ) { |
|
| 276 | + } else if ( !empty($course_id) ) { |
|
| 281 | 277 | $course_title = get_the_title( $course_id ); |
| 282 | 278 | } |
| 283 | 279 | $lesson_title = '<a href="' . add_query_arg( array( 'page' => $this->page_slug, 'lesson_id' => $item->comment_post_ID ), admin_url( 'admin.php' ) ) . '">' . get_the_title( $item->comment_post_ID ) . '</a>'; |
@@ -1,5 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // security check, don't load file outside WP |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// security check, don't load file outside WP |
|
| 3 | 6 | /** |
| 4 | 7 | * Sensei Autoloader Class |
| 5 | 8 | * |
@@ -210,7 +210,9 @@ |
||
| 210 | 210 | function load_template( $template = '' ) { |
| 211 | 211 | global $email_template; |
| 212 | 212 | |
| 213 | - if( ! $template ) return; |
|
| 213 | + if( ! $template ) { |
|
| 214 | + return; |
|
| 215 | + } |
|
| 214 | 216 | |
| 215 | 217 | $email_template = $template . '.php'; |
| 216 | 218 | $template = Sensei_Templates::template_loader( '' ); |
@@ -1,5 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// Exit if accessed directly |
|
| 3 | 6 | |
| 4 | 7 | /** |
| 5 | 8 | * Sensei Post Types Class |
@@ -146,7 +149,7 @@ discard block |
||
| 146 | 149 | |
| 147 | 150 | return get_page_uri( $settings_course_page->ID ); |
| 148 | 151 | |
| 149 | - }else{ |
|
| 152 | + } else{ |
|
| 150 | 153 | |
| 151 | 154 | return 'courses'; |
| 152 | 155 | |
@@ -1,5 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 2 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 3 | + exit; |
|
| 4 | +} |
|
| 5 | +// Exit if accessed directly |
|
| 3 | 6 | |
| 4 | 7 | /** |
| 5 | 8 | * Sensei Grading Class |
@@ -130,8 +133,7 @@ discard block |
||
| 130 | 133 | $object_name = 'WooThemes_Sensei_Grading_' . $name; |
| 131 | 134 | if ( is_null($optional_data) ) { |
| 132 | 135 | $sensei_grading_object = new $object_name( $data ); |
| 133 | - } |
|
| 134 | - else { |
|
| 136 | + } else { |
|
| 135 | 137 | $sensei_grading_object = new $object_name( $data, $optional_data ); |
| 136 | 138 | } // End If Statement |
| 137 | 139 | if ( 'Main' == $name ) { |
@@ -150,8 +152,7 @@ discard block |
||
| 150 | 152 | |
| 151 | 153 | if ( isset( $_GET['quiz_id'] ) && 0 < intval( $_GET['quiz_id'] ) && isset( $_GET['user'] ) && 0 < intval( $_GET['user'] ) ) { |
| 152 | 154 | $this->grading_user_quiz_view(); |
| 153 | - } |
|
| 154 | - else { |
|
| 155 | + } else { |
|
| 155 | 156 | $this->grading_default_view(); |
| 156 | 157 | } // End If Statement |
| 157 | 158 | } // End grading_page() |
@@ -273,8 +274,7 @@ discard block |
||
| 273 | 274 | if ( version_compare($wp_version, '4.1', '>=') ) { |
| 274 | 275 | $url = add_query_arg( array( 'page' => $this->page_slug, 'course_id' => $course_id ), admin_url( 'admin.php' ) ); |
| 275 | 276 | $title .= sprintf( ' <span class="course-title">> <a href="%s">%s</a></span>', esc_url( $url ), get_the_title( $course_id ) ); |
| 276 | - } |
|
| 277 | - else { |
|
| 277 | + } else { |
|
| 278 | 278 | $title .= sprintf( ' <span class="course-title">> %s</span>', get_the_title( $course_id ) ); |
| 279 | 279 | } |
| 280 | 280 | } |
@@ -309,8 +309,7 @@ discard block |
||
| 309 | 309 | if ( version_compare($wp_version, '4.1', '>=') ) { |
| 310 | 310 | $url = add_query_arg( array( 'page' => $this->page_slug, 'course_id' => $course_id ), admin_url( 'admin.php' ) ); |
| 311 | 311 | $title .= sprintf( ' <span class="course-title">> <a href="%s">%s</a></span>', esc_url( $url ), get_the_title( $course_id ) ); |
| 312 | - } |
|
| 313 | - else { |
|
| 312 | + } else { |
|
| 314 | 313 | $title .= sprintf( ' <span class="course-title">> %s</span>', get_the_title( $course_id ) ); |
| 315 | 314 | } |
| 316 | 315 | $url = add_query_arg( array( 'page' => $this->page_slug, 'lesson_id' => $lesson_id ), admin_url( 'admin.php' ) ); |
@@ -379,8 +378,7 @@ discard block |
||
| 379 | 378 | |
| 380 | 379 | if ( 'course' == $args['type'] ) { |
| 381 | 380 | $type = 'sensei_course_status'; |
| 382 | - } |
|
| 383 | - else { |
|
| 381 | + } else { |
|
| 384 | 382 | $type = 'sensei_lesson_status'; |
| 385 | 383 | } |
| 386 | 384 | $cache_key = 'sensei-' . $args['type'] . '-statuses'; |
@@ -390,15 +388,13 @@ discard block |
||
| 390 | 388 | // Restrict to specific posts |
| 391 | 389 | if ( isset( $args['post__in'] ) && !empty( $args['post__in'] ) && is_array( $args['post__in'] ) ) { |
| 392 | 390 | $query .= ' AND comment_post_ID IN (' . implode( ',', array_map( 'absint', $args['post__in'] ) ) . ')'; |
| 393 | - } |
|
| 394 | - elseif ( !empty( $args['post_id'] ) ) { |
|
| 391 | + } elseif ( !empty( $args['post_id'] ) ) { |
|
| 395 | 392 | $query .= $wpdb->prepare( ' AND comment_post_ID = %d', $args['post_id'] ); |
| 396 | 393 | } |
| 397 | 394 | // Restrict to specific users |
| 398 | 395 | if ( isset( $args['user_id'] ) && is_array( $args['user_id'] ) ) { |
| 399 | 396 | $query .= ' AND user_id IN (' . implode( ',', array_map( 'absint', $args['user_id'] ) ) . ')'; |
| 400 | - } |
|
| 401 | - elseif ( !empty( $args['user_id'] ) ) { |
|
| 397 | + } elseif ( !empty( $args['user_id'] ) ) { |
|
| 402 | 398 | $query .= $wpdb->prepare( ' AND user_id = %d', $args['user_id'] ); |
| 403 | 399 | } |
| 404 | 400 | $query .= ' GROUP BY comment_approved'; |
@@ -601,8 +597,7 @@ discard block |
||
| 601 | 597 | // set the users total quiz grade |
| 602 | 598 | if ( 0 < intval( $quiz_grade_total ) ) { |
| 603 | 599 | $grade = abs( round( ( doubleval( $quiz_grade ) * 100 ) / ( $quiz_grade_total ), 2 ) ); |
| 604 | - } |
|
| 605 | - else { |
|
| 600 | + } else { |
|
| 606 | 601 | $grade = 0; |
| 607 | 602 | } |
| 608 | 603 | WooThemes_Sensei_Utils::sensei_grade_quiz( $quiz_id, $grade, $user_id ); |
@@ -615,8 +610,7 @@ discard block |
||
| 615 | 610 | // Student has reached the pass mark and lesson is complete |
| 616 | 611 | if ( $quiz_passmark <= $grade ) { |
| 617 | 612 | $lesson_status = 'passed'; |
| 618 | - } |
|
| 619 | - else { |
|
| 613 | + } else { |
|
| 620 | 614 | $lesson_status = 'failed'; |
| 621 | 615 | } // End If Statement |
| 622 | 616 | } |
@@ -761,8 +755,7 @@ discard block |
||
| 761 | 755 | // Question has a zero grade, so skip grading |
| 762 | 756 | if ( 0 == $achievable_grade ) { |
| 763 | 757 | $all_question_grades[ $question_id ] = $achievable_grade; |
| 764 | - } |
|
| 765 | - elseif ( in_array( $question_type, $autogradable_question_types ) ) { |
|
| 758 | + } elseif ( in_array( $question_type, $autogradable_question_types ) ) { |
|
| 766 | 759 | // Get user question grade |
| 767 | 760 | $question_grade = WooThemes_Sensei_Utils::sensei_grade_question_auto( $question_id, $question_type, $answer, $user_id ); |
| 768 | 761 | $all_question_grades[ $question_id ] = $question_grade; |
@@ -784,8 +777,7 @@ discard block |
||
| 784 | 777 | // Check for zero total from grades |
| 785 | 778 | if ( 0 < $quiz_total ) { |
| 786 | 779 | $grade = abs( round( ( doubleval( $grade_total ) * 100 ) / ( $quiz_total ), 2 ) ); |
| 787 | - } |
|
| 788 | - else { |
|
| 780 | + } else { |
|
| 789 | 781 | $grade = 0; |
| 790 | 782 | } |
| 791 | 783 | WooThemes_Sensei_Utils::sensei_grade_quiz( $quiz_id, $grade, $user_id, $quiz_grade_type ); |
@@ -945,19 +937,19 @@ discard block |
||
| 945 | 937 | |
| 946 | 938 | return Sensei()->question->get_question_grade($question_id); |
| 947 | 939 | |
| 948 | - }else{ |
|
| 940 | + } else{ |
|
| 949 | 941 | |
| 950 | 942 | return false; |
| 951 | 943 | |
| 952 | 944 | } |
| 953 | 945 | |
| 954 | - }else{ |
|
| 946 | + } else{ |
|
| 955 | 947 | |
| 956 | 948 | return false; |
| 957 | 949 | |
| 958 | 950 | } |
| 959 | 951 | |
| 960 | - }else{ |
|
| 952 | + } else{ |
|
| 961 | 953 | |
| 962 | 954 | // Case Sensitive Check that the 'gap' is "exactly" equal to the given answer |
| 963 | 955 | if ( trim(strtolower($gapfill_array[1])) == trim(strtolower( $user_answer )) ) { |
@@ -970,13 +962,13 @@ discard block |
||
| 970 | 962 | |
| 971 | 963 | return Sensei()->question->get_question_grade( $question_id ); |
| 972 | 964 | |
| 973 | - }else{ |
|
| 965 | + } else{ |
|
| 974 | 966 | |
| 975 | 967 | return false; |
| 976 | 968 | |
| 977 | 969 | } |
| 978 | 970 | |
| 979 | - }else{ |
|
| 971 | + } else{ |
|
| 980 | 972 | |
| 981 | 973 | return false; |
| 982 | 974 | |