Skip to content

Commit

Permalink
Merge branch 'MDL-28686' of git://github.com/bostelm/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 26, 2011
2 parents 87eca31 + 987e0e9 commit bde5c82
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions question/engine/upgrade/upgradelib.php
Expand Up @@ -342,6 +342,15 @@ public function get_question_states($attempt, $question, moodle_recordset $quest
}

protected function get_converter_class_name($question, $quiz, $qsessionid) {
global $DB;
if ($question->qtype == 'deleted') {
$where = '(question = :questionid OR '.$DB->sql_like('answer', ':randomid').') AND event = 7';
$params = array('questionid'=>$question->id, 'randomid'=>"random{$question->id}-%");
if ($DB->record_exists_select('question_states', $where, $params)) {
$this->logger->log_assumption("Assuming that deleted question {$question->id} was manually graded.");
return 'qbehaviour_manualgraded_converter';
}
}
if ($question->qtype == 'essay') {
return 'qbehaviour_manualgraded_converter';
} else if ($question->qtype == 'description') {
Expand Down

0 comments on commit bde5c82

Please sign in to comment.