Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-28684 fix failing unit test - which means fix the acutal code.

Sorry for the noise.
  • Loading branch information...
commit e9f707d38a9bc5b43a9beb63b905e423223b5246 1 parent 80fc30b
@timhunt timhunt authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 question/type/multichoice/db/upgradelib.php
View
4 question/type/multichoice/db/upgradelib.php
@@ -41,9 +41,7 @@ class qtype_multichoice_qe2_attempt_updater extends question_qtype_attempt_updat
public function is_blank_answer($state) {
// blank multichoice answers are not empty strings, they rather end in a colon
- $a = $state->answer;
- $empty = (substr($a, strlen($a) - 1) == ':');
- return $empty;
+ return empty($state->answer) || substr($a, -1) == ':';
}
public function right_answer() {
Please sign in to comment.
Something went wrong with that request. Please try again.