Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
a0628c68
Commit
a0628c68
authored
Jun 26, 2011
by
Eloy Lafuente
Browse files
MDL-28032 database - fix some sign inconsistencies
parent
d466e23c
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib/db/upgrade.php
View file @
a0628c68
...
...
@@ -6558,6 +6558,20 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
upgrade_main_savepoint
(
true
,
2011062000.01
);
}
// Signed fixes - MDL-28032
if
(
$oldversion
<
2011062400.01
)
{
// Changing sign of field defaultmark on table question to unsigned
$table
=
new
xmldb_table
(
'question'
);
$field
=
new
xmldb_field
(
'defaultmark'
,
XMLDB_TYPE_NUMBER
,
'12, 7'
,
XMLDB_UNSIGNED
,
XMLDB_NOTNULL
,
null
,
'1'
,
'generalfeedbackformat'
);
// Launch change of sign for field defaultmark
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// Main savepoint reached
upgrade_main_savepoint
(
true
,
2011062400.01
);
}
return
true
;
}
...
...
mod/quiz/report/statistics/db/upgrade.php
View file @
a0628c68
...
...
@@ -380,6 +380,20 @@ function xmldb_quiz_statistics_upgrade($oldversion) {
upgrade_plugin_savepoint
(
true
,
2011021500
,
'quiz'
,
'statistics'
);
}
// Signed fixes - MDL-28032
if
(
$oldversion
<
2011062600
)
{
// Changing sign of field maxmark on table quiz_question_statistics to signed
$table
=
new
xmldb_table
(
'quiz_question_statistics'
);
$field
=
new
xmldb_field
(
'maxmark'
,
XMLDB_TYPE_NUMBER
,
'12, 7'
,
null
,
null
,
null
,
null
,
'subquestions'
);
// Launch change of sign for field maxmark
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// statistics savepoint reached
upgrade_plugin_savepoint
(
true
,
2011062600
,
'quiz'
,
'statistics'
);
}
return
true
;
}
mod/quiz/report/statistics/version.php
View file @
a0628c68
...
...
@@ -25,5 +25,5 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
version
=
20110
512
00
;
$plugin
->
version
=
20110
626
00
;
$plugin
->
requires
=
2011060313
;
version.php
View file @
a0628c68
...
...
@@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die();
$version
=
2011062400.0
0
;
// YYYYMMDD = weekly release date of this DEV branch
$version
=
2011062400.0
1
;
// YYYYMMDD = weekly release date of this DEV branch
// RR = release increments - 00 in DEV branches
// .XX = incremental changes
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment