Fix get_course_table() and course_code issues - refs #7212

1.9.x
Imanol Losada 10 years ago
parent 635bdc0961
commit a242d7e1e9
  1. 9
      main/exercice/calculated_answer.class.php

@ -180,9 +180,7 @@ class CalculatedAnswer extends Question
function processAnswersCreation($form)
{
if (!self::isAnswered()) {
// Can't use TABLE_QUIZ_ANSWER because it returns "quiz_answer"
// instead of "c_quiz_answer"
$table = Database::get_main_table("c_quiz_answer");
$table = Database::get_course_table(TABLE_QUIZ_ANSWER);
Database::delete(
$table,
array(
@ -268,8 +266,9 @@ class CalculatedAnswer extends Question
$table,
array(
'where' => array(
'question_id = ?' => array(
$this->id
'question_id = ? AND course_code = ?' => array(
$this->id,
$this->course['id']
)
)
)

Loading…
Cancel
Save