mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Added missing "quiz_" prefixes to table names
This commit is contained in:
parent
4c64486f0c
commit
38393aad2d
@ -9,8 +9,8 @@ function migrate2utf8_question_name($recordid){
|
||||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}question_categories qc,
|
||||
{$CFG->prefix}question qq
|
||||
FROM {$CFG->prefix}quiz_question_categories qc,
|
||||
{$CFG->prefix}quiz_question qq
|
||||
WHERE qc.id = qq.category
|
||||
AND qq.id = $recordid";
|
||||
|
||||
@ -19,7 +19,7 @@ function migrate2utf8_question_name($recordid){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$quizquestions = get_record('question','id',$recordid)) {
|
||||
if (!$quizquestions = get_record('quiz_question','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
@ -42,7 +42,7 @@ function migrate2utf8_question_name($recordid){
|
||||
$newquizquestion = new object;
|
||||
$newquizquestion->id = $recordid;
|
||||
$newquizquestion->name = $result;
|
||||
update_record('question',$newquizquestion);
|
||||
update_record('quiz_question',$newquizquestion);
|
||||
}
|
||||
/// And finally, just return the converted field
|
||||
return $result;
|
||||
@ -58,8 +58,8 @@ function migrate2utf8_question_questiontext($recordid){
|
||||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}question_categories qc,
|
||||
{$CFG->prefix}question qq
|
||||
FROM {$CFG->prefix}quiz_question_categories qc,
|
||||
{$CFG->prefix}quiz_question qq
|
||||
WHERE qc.id = qq.category
|
||||
AND qq.id = $recordid";
|
||||
|
||||
@ -68,7 +68,7 @@ function migrate2utf8_question_questiontext($recordid){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$quizquestions = get_record('question','id',$recordid)) {
|
||||
if (!$quizquestions = get_record('quiz_question','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
@ -92,7 +92,7 @@ function migrate2utf8_question_questiontext($recordid){
|
||||
$newquizquestion = new object;
|
||||
$newquizquestion->id = $recordid;
|
||||
$newquizquestion->questiontext = $result;
|
||||
update_record('question',$newquizquestion);
|
||||
update_record('quiz_question',$newquizquestion);
|
||||
}
|
||||
/// And finally, just return the converted field
|
||||
return $result;
|
||||
@ -109,8 +109,8 @@ function migrate2utf8_quiz_numerical_units_unit($recordid){
|
||||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}question_categories qc,
|
||||
{$CFG->prefix}question qq,
|
||||
FROM {$CFG->prefix}quiz_question_categories qc,
|
||||
{$CFG->prefix}quiz_question qq,
|
||||
{$CFG->prefix}quiz_numerical_units qnu
|
||||
WHERE qc.id = qq.category
|
||||
AND qq.id = qnu.question
|
||||
@ -161,8 +161,8 @@ function migrate2utf8_quiz_match_sub_questiontext($recordid){
|
||||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}question_categories qc,
|
||||
{$CFG->prefix}question qq,
|
||||
FROM {$CFG->prefix}quiz_question_categories qc,
|
||||
{$CFG->prefix}quiz_question qq,
|
||||
{$CFG->prefix}quiz_match_sub qms
|
||||
WHERE qc.id = qq.category
|
||||
AND qq.id = qms.question
|
||||
@ -213,8 +213,8 @@ function migrate2utf8_quiz_match_sub_answertext($recordid){
|
||||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}question_categories qc,
|
||||
{$CFG->prefix}question qq,
|
||||
FROM {$CFG->prefix}quiz_question_categories qc,
|
||||
{$CFG->prefix}quiz_question qq,
|
||||
{$CFG->prefix}quiz_match_sub qms
|
||||
WHERE qc.id = qq.category
|
||||
AND qq.id = qms.question
|
||||
@ -265,9 +265,9 @@ function migrate2utf8_question_answers_answer($recordid){
|
||||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}question_categories qc,
|
||||
{$CFG->prefix}question qq,
|
||||
{$CFG->prefix}question_answers qa
|
||||
FROM {$CFG->prefix}quiz_question_categories qc,
|
||||
{$CFG->prefix}quiz_question qq,
|
||||
{$CFG->prefix}quiz_question_answers qa
|
||||
WHERE qc.id = qq.category
|
||||
AND qq.id = qa.question
|
||||
AND qa.id = $recordid";
|
||||
@ -277,7 +277,7 @@ function migrate2utf8_question_answers_answer($recordid){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$quizanswer= get_record('question_answers','id',$recordid)) {
|
||||
if (!$quizanswer= get_record('quiz_question_answers','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
@ -301,7 +301,7 @@ function migrate2utf8_question_answers_answer($recordid){
|
||||
$newquizanswer = new object;
|
||||
$newquizanswer->id = $recordid;
|
||||
$newquizanswer->answer = $result;
|
||||
update_record('question_answers',$newquizanswer);
|
||||
update_record('quiz_question_answers',$newquizanswer);
|
||||
}
|
||||
/// And finally, just return the converted field
|
||||
return $result;
|
||||
@ -317,9 +317,9 @@ function migrate2utf8_question_answers_feedback($recordid){
|
||||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}question_categories qc,
|
||||
{$CFG->prefix}question qq,
|
||||
{$CFG->prefix}question_answers qa
|
||||
FROM {$CFG->prefix}quiz_question_categories qc,
|
||||
{$CFG->prefix}quiz_question qq,
|
||||
{$CFG->prefix}quiz_question_answers qa
|
||||
WHERE qc.id = qq.category
|
||||
AND qq.id = qa.question
|
||||
AND qa.id = $recordid";
|
||||
@ -329,7 +329,7 @@ function migrate2utf8_question_answers_feedback($recordid){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$quizanswer= get_record('question_answers','id',$recordid)) {
|
||||
if (!$quizanswer= get_record('quiz_question_answers','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
@ -353,7 +353,7 @@ function migrate2utf8_question_answers_feedback($recordid){
|
||||
$newquizanswer = new object;
|
||||
$newquizanswer->id = $recordid;
|
||||
$newquizanswer->feedback = $result;
|
||||
update_record('question_answers',$newquizanswer);
|
||||
update_record('quiz_question_answers',$newquizanswer);
|
||||
}
|
||||
/// And finally, just return the converted field
|
||||
return $result;
|
||||
@ -373,7 +373,7 @@ function migrate2utf8_quiz_dataset_definitions_name($recordid){
|
||||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}question_categories qc,
|
||||
FROM {$CFG->prefix}quiz_question_categories qc,
|
||||
{$CFG->prefix}quiz_dataset_definitions qdd
|
||||
WHERE qc.id = qdd.category
|
||||
AND qdd.id = $recordid";
|
||||
@ -423,7 +423,7 @@ function migrate2utf8_question_categories_name($recordid){
|
||||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}question_categories qc
|
||||
FROM {$CFG->prefix}quiz_question_categories qc
|
||||
WHERE qc.id = $recordid";
|
||||
|
||||
if (!$quiz = get_record_sql($SQL)) {
|
||||
@ -431,7 +431,7 @@ function migrate2utf8_question_categories_name($recordid){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$quizcategory = get_record('question_categories','id',$recordid)) {
|
||||
if (!$quizcategory = get_record('quiz_question_categories','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
@ -455,7 +455,7 @@ function migrate2utf8_question_categories_name($recordid){
|
||||
$newquizcategory = new object;
|
||||
$newquizcategory->id = $recordid;
|
||||
$newquizcategory->name = $result;
|
||||
update_record('question_categories',$newquizcategory);
|
||||
update_record('quiz_question_categories',$newquizcategory);
|
||||
}
|
||||
/// And finally, just return the converted field
|
||||
return $result;
|
||||
@ -471,7 +471,7 @@ function migrate2utf8_question_categories_info($recordid){
|
||||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}question_categories qc
|
||||
FROM {$CFG->prefix}quiz_question_categories qc
|
||||
WHERE qc.id = $recordid";
|
||||
|
||||
if (!$quiz = get_record_sql($SQL)) {
|
||||
@ -479,7 +479,7 @@ function migrate2utf8_question_categories_info($recordid){
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$quizcategory = get_record('question_categories','id',$recordid)) {
|
||||
if (!$quizcategory = get_record('quiz_question_categories','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
@ -503,7 +503,7 @@ function migrate2utf8_question_categories_info($recordid){
|
||||
$newquizcategory = new object;
|
||||
$newquizcategory->id = $recordid;
|
||||
$newquizcategory->info = $result;
|
||||
update_record('question_categories',$newquizcategory);
|
||||
update_record('quiz_question_categories',$newquizcategory);
|
||||
}
|
||||
/// And finally, just return the converted field
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
<FIELD name="tolerance" method="NO_CONV" type="varchar" length="255" default="0.0" />
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="question_sessions" />
|
||||
<TABLE name="quiz_question_sessions" />
|
||||
<TABLE name="quiz_multichoice">
|
||||
<FIELDS>
|
||||
<FIELD name="answers" method="NO_CONV" type="varchar" length="255" />
|
||||
@ -75,12 +75,12 @@
|
||||
<FIELD name="layout" method="NO_CONV" type="text" length="0" />
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="question_states">
|
||||
<TABLE name="quiz_question_states">
|
||||
<FIELDS>
|
||||
<FIELD name="answer" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||
<SQL_DETECT_USER>
|
||||
SELECT qa.userid
|
||||
FROM {$CFG->prefix}question_states qs,
|
||||
FROM {$CFG->prefix}quiz_question_states qs,
|
||||
{$CFG->prefix}quiz_attempts qa
|
||||
WHERE qa.id = qs.attempt
|
||||
AND qs.id=RECORDID
|
||||
@ -88,7 +88,7 @@
|
||||
<SQL_DETECT_COURSE>
|
||||
SELECT q.course
|
||||
FROM {$CFG->prefix}quiz q,
|
||||
{$CFG->prefix}question_states qs,
|
||||
{$CFG->prefix}quiz_question_states qs,
|
||||
{$CFG->prefix}quiz_attempts qa
|
||||
WHERE q.id = qa.quiz
|
||||
AND qa.id = qs.attempt
|
||||
@ -97,7 +97,7 @@
|
||||
</FIELD>
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="question">
|
||||
<TABLE name="quiz_question">
|
||||
<FIELDS>
|
||||
<FIELD name="name" method="PHP_FUNCTION" type="varchar" length="255">
|
||||
<PHP_FUNCTION>
|
||||
@ -136,7 +136,7 @@
|
||||
</FIELD>
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="question_answers">
|
||||
<TABLE name="quiz_question_answers">
|
||||
<FIELDS>
|
||||
<FIELD name="answer" method="PHP_FUNCTION" type="text" length="0">
|
||||
<PHP_FUNCTION>
|
||||
@ -165,8 +165,8 @@
|
||||
<FIELD name="response" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||
<SQL_DETECT_USER>
|
||||
SELECT qa.userid
|
||||
FROM {$CFG->prefix}question_states qs,
|
||||
{$CFG->prefix}quiz_attempts qa,
|
||||
FROM {$CFG->prefix}quiz_question_states qs,
|
||||
{$CFG->prefix}quiz_quiz_attempts qa,
|
||||
{$CFG->prefix}quiz_essay_states qes
|
||||
WHERE qa.id = qs.attempt
|
||||
AND qs.id = qes.stateid
|
||||
@ -176,7 +176,7 @@
|
||||
SELECT q.course
|
||||
FROM {$CFG->prefix}quiz q,
|
||||
{$CFG->prefix}quiz_attempts qa,
|
||||
{$CFG->prefix}question_states qs,
|
||||
{$CFG->prefix}quiz_question_states qs,
|
||||
{$CFG->prefix}quiz_essay_states qes
|
||||
WHERE q.id = qa.quiz
|
||||
AND qa.id = qs.attempt
|
||||
@ -186,7 +186,7 @@
|
||||
</FIELD>
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="question_categories">
|
||||
<TABLE name="quiz_question_categories">
|
||||
<FIELDS>
|
||||
<FIELD name="name" method="PHP_FUNCTION" type="varchar" length="255">
|
||||
<PHP_FUNCTION>
|
||||
|
Loading…
x
Reference in New Issue
Block a user