mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
some bug fixes
This commit is contained in:
parent
dc1acc9bcb
commit
7c5406967d
14 changed files with 141 additions and 47 deletions
|
@ -1,5 +1,13 @@
|
|||
<DBMIGRATION type="mod/chat" VERSION="2005120100">
|
||||
<TABLES>
|
||||
<TABLE name="chat_users">
|
||||
<FIELDS>
|
||||
<FIELD name="version" method="NO_CONV" type="varchar" length="16" />
|
||||
<FIELD name="ip" method="NO_CONV" type="varchar" length="15" />
|
||||
<FIELD name="sid" method="NO_CONV" type="varchar" length="32" />
|
||||
<FIELD name="lang" method="NO_CONV" type="varchar" length="10" />
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="chat_messages">
|
||||
<FIELDS>
|
||||
<FIELD name="message" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||
|
|
|
@ -23,5 +23,6 @@
|
|||
</FIELD>
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="choice_answers" />
|
||||
</TABLES>
|
||||
</DBMIGRATION>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<DBMIGRATION type="mod/data" VERSION="2005120100">
|
||||
<TABLES>
|
||||
<TABLE name="data_ratings" />
|
||||
<TABLE name="data_records" />
|
||||
<TABLE name="data_comments">
|
||||
<FIELDS>
|
||||
<FIELD name="content" method="NO_CONV" type="text" length="0" />
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<DBMIGRATION type="mod/forum" VERSION="2005120100">
|
||||
<TABLES>
|
||||
<TABLE name="forum_queue" />
|
||||
<TABLE name="forum_ratings" />
|
||||
<TABLE name="forum_read" />
|
||||
<TABLE name="forum_subscriptions" />
|
||||
<TABLE name="forum_track_prefs" />
|
||||
<TABLE name="forum_discussions">
|
||||
<FIELDS>
|
||||
<FIELD name="name" method="PLAIN_SQL_UPDATE" type="varchar" length="255">
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<DBMIGRATION type="mod/glossary" VERSION="2005120100">
|
||||
<TABLES>
|
||||
<TABLE name="glossary_entries_categories" />
|
||||
<TABLE name="glossary_ratings" />
|
||||
<TABLE name="glossary_entries">
|
||||
<FIELDS>
|
||||
<FIELD name="concept" method="PLAIN_SQL_UPDATE" type="varchar" length="255" dropindex="concept" addindex="concept (concept(255))">
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
<DBMIGRATION type="mod/hotpot" VERSION="2005120100">
|
||||
<TABLES>
|
||||
<TABLE name="hotpot_attempts" />
|
||||
<TABLE name="hotpot_strings">
|
||||
<FIELDS>
|
||||
<FIELD name="string" method="NO_CONV" type="TEXT" length="0">
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="hotpot_responses">
|
||||
<FIELDS>
|
||||
<FIELD name="correct" method="NO_CONV" type="varchar" length="255">
|
||||
<FIELD name="wrong" method="NO_CONV" type="varchar" length="255">
|
||||
<FIELD name="ignored" method="NO_CONV" type="varchar" length="255">
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="hotpot_details">
|
||||
<FIELDS>
|
||||
<FIELD name="details" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<DBMIGRATION type="mod/lesson" VERSION="2005120100">
|
||||
<TABLES>
|
||||
<TABLE name="lesson_branch" />
|
||||
<TABLE name="lesson_grades" />
|
||||
<TABLE name="lesson_timer" />
|
||||
<TABLE name="lesson_attempts">
|
||||
<FIELDS>
|
||||
<FIELD name="useranswer" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||
|
@ -63,7 +66,7 @@
|
|||
</TABLE>
|
||||
<TABLE name="lesson">
|
||||
<FIELDS>
|
||||
<FIELD name="name" method="PLAIN_SQL_UPDATE" type="varchar" length="255">
|
||||
<FIELD name="name" method="PHP_FUNCTION" type="varchar" length="255">
|
||||
<PHP_FUNCTION>
|
||||
migrate2utf8_lesson_name(RECORDID)
|
||||
</PHP_FUNCTION>
|
||||
|
|
|
@ -376,7 +376,7 @@ function migrate2utf8_quiz_categories_name($recordid){
|
|||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}quiz_categories qc,
|
||||
FROM {$CFG->prefix}quiz_categories qc
|
||||
WHERE qc.id = $recordid";
|
||||
|
||||
if (!$quiz = get_record_sql($SQL)) {
|
||||
|
@ -418,7 +418,7 @@ function migrate2utf8_quiz_categories_info($recordid){
|
|||
}
|
||||
|
||||
$SQL = "SELECT qc.course
|
||||
FROM {$CFG->prefix}quiz_categories qc,
|
||||
FROM {$CFG->prefix}quiz_categories qc
|
||||
WHERE qc.id = $recordid";
|
||||
|
||||
if (!$quiz = get_record_sql($SQL)) {
|
||||
|
|
|
@ -1,5 +1,34 @@
|
|||
<DBMIGRATION type="mod/quiz" VERSION="2005120100">
|
||||
<TABLES>
|
||||
<TABLE name="quiz_attemptonlast_datasets" />
|
||||
<TABLE name="quiz_grades" />
|
||||
<TABLE name="quiz_question_datasets" />
|
||||
<TABLE name="quiz_question_instances" />
|
||||
<TABLE name="quiz_question_versions" />
|
||||
<TABLE name="quiz_randomsamatch" />
|
||||
<TABLE name="quiz_truefalse" />
|
||||
<TABLE name="quiz_rqp">
|
||||
<FIELDS>
|
||||
<FIELD name="format" method="NO_CONV" type="varchar" length="255" />
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="quiz_rqp_servers">
|
||||
<FIELDS>
|
||||
<FIELD name="url" method="NO_CONV" type="varchar" length="255" />
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="quiz_rqp_states">
|
||||
<FIELDS>
|
||||
<FIELD name="responses" method="NO_CONV" type="text" length="0" />
|
||||
<FIELD name="persistent_data" method="NO_CONV" type="text" length="0" />
|
||||
<FIELD name="template_vars" method="NO_CONV" type="text" length="0" />
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="quiz_rqp_types">
|
||||
<FIELDS>
|
||||
<FIELD name="name" method="NO_CONV" type="varchar" length="255" dropindex="name" adduniqueindex="name (name(255))"/>
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="quiz_shortanswer">
|
||||
<FIELDS>
|
||||
<FIELD name="answers" method="NO_CONV" type="text" length="0" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?
|
||||
function migrate2utf_workshop_stockcomments_comments($recordid){
|
||||
function migrate2utf8_workshop_stockcomments_comments($recordid){
|
||||
global $CFG;
|
||||
|
||||
/// Some trivial checks
|
||||
|
@ -14,12 +14,12 @@ function migrate2utf_workshop_stockcomments_comments($recordid){
|
|||
WHERE w.id = ws.workshopid
|
||||
AND ws.id = $recordid";
|
||||
|
||||
if (!$workshop = get_record_sql($SQL) {
|
||||
if (!$workshop = get_record_sql($SQL)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$workshopstockcomments = get_record('workshop_stockcomments','id',$recordid) {
|
||||
if (!$workshopstockcomments = get_record('workshop_stockcomments','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ function migrate2utf_workshop_stockcomments_comments($recordid){
|
|||
return $result;
|
||||
}
|
||||
|
||||
function migrate2utf_workshop_rubrics_description($recordid){
|
||||
function migrate2utf8_workshop_rubrics_description($recordid){
|
||||
global $CFG;
|
||||
|
||||
/// Some trivial checks
|
||||
|
@ -58,12 +58,12 @@ function migrate2utf_workshop_rubrics_description($recordid){
|
|||
WHERE w.id = ws.workshopid
|
||||
AND ws.id = $recordid";
|
||||
|
||||
if (!$workshop = get_record_sql($SQL) {
|
||||
if (!$workshop = get_record_sql($SQL)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$workshoprubrics = get_record('workshop_stockcomments','id',$recordid) {
|
||||
if (!$workshoprubrics = get_record('workshop_stockcomments','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ function migrate2utf_workshop_rubrics_description($recordid){
|
|||
return $result;
|
||||
}
|
||||
|
||||
function migrate2utf_workshop_grades_feedback($recordid){
|
||||
function migrate2utf8_workshop_grades_feedback($recordid){
|
||||
global $CFG;
|
||||
|
||||
/// Some trivial checks
|
||||
|
@ -102,12 +102,12 @@ function migrate2utf_workshop_grades_feedback($recordid){
|
|||
WHERE w.id = wg.workshopid
|
||||
AND wg.id = $recordid";
|
||||
|
||||
if (!$workshop = get_record_sql($SQL) {
|
||||
if (!$workshop = get_record_sql($SQL)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$workshopgrades = get_record('workshop_grades','id',$recordid) {
|
||||
if (!$workshopgrades = get_record('workshop_grades','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ function migrate2utf_workshop_grades_feedback($recordid){
|
|||
return $result;
|
||||
}
|
||||
|
||||
function migrate2utf_workshop_elements_description($recordid){
|
||||
function migrate2utf8_workshop_elements_description($recordid){
|
||||
global $CFG;
|
||||
|
||||
/// Some trivial checks
|
||||
|
@ -146,12 +146,12 @@ function migrate2utf_workshop_elements_description($recordid){
|
|||
WHERE w.id = we.workshopid
|
||||
AND we.id = $recordid";
|
||||
|
||||
if (!$workshop = get_record_sql($SQL) {
|
||||
if (!$workshop = get_record_sql($SQL)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$workshopelements = get_record('workshop_elements','id',$recordid) {
|
||||
if (!$workshopelements = get_record('workshop_elements','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ function migrate2utf_workshop_elements_description($recordid){
|
|||
return $result;
|
||||
}
|
||||
|
||||
function migrate2utf_workshop_name($recordid){
|
||||
function migrate2utf8_workshop_name($recordid){
|
||||
global $CFG;
|
||||
|
||||
/// Some trivial checks
|
||||
|
@ -184,7 +184,7 @@ function migrate2utf_workshop_name($recordid){
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!$workshop = get_record('workshop','id',$recordid) {
|
||||
if (!$workshop = get_record('workshop','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ function migrate2utf_workshop_name($recordid){
|
|||
return $result;
|
||||
}
|
||||
|
||||
function migrate2utf_workshop_description($recordid){
|
||||
function migrate2utf8_workshop_description($recordid){
|
||||
global $CFG;
|
||||
|
||||
/// Some trivial checks
|
||||
|
@ -217,7 +217,7 @@ function migrate2utf_workshop_description($recordid){
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!$workshop = get_record('workshop','id',$recordid) {
|
||||
if (!$workshop = get_record('workshop','id',$recordid)) {
|
||||
log_the_problem_somewhere();
|
||||
return false;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ function migrate2utf_workshop_description($recordid){
|
|||
return $result;
|
||||
}
|
||||
|
||||
function migrate2utf_workshop_password($recordid){
|
||||
function migrate2utf8_workshop_password($recordid){
|
||||
global $CFG;
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
<TABLE name="workshop_rubrics">
|
||||
<FIELDS>
|
||||
<FIELD name="description" method="PHP_FUNCTION" type="text" length="0">
|
||||
<SQL_DETECT_COURSE>
|
||||
<PHP_FUNCTION>
|
||||
migrate2utf8_workshop_rubrics_description(RECORDID)
|
||||
</PHP_FUNCTION>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue