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
ea003cd5
Commit
ea003cd5
authored
Mar 17, 2011
by
Tim Hunt
Browse files
MDL-26848 get rid of stupid unsigned columns in the quiz statistics report.
parent
56babbcb
Changes
3
Hide whitespace changes
Inline
Side-by-side
mod/quiz/report/statistics/db/install.xml
View file @
ea003cd5
...
...
@@ -13,15 +13,15 @@
<FIELD
NAME=
"timemodified"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
UNSIGNED=
"true"
SEQUENCE=
"false"
PREVIOUS=
"allattempts"
NEXT=
"firstattemptscount"
/>
<FIELD
NAME=
"firstattemptscount"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
UNSIGNED=
"true"
SEQUENCE=
"false"
PREVIOUS=
"timemodified"
NEXT=
"allattemptscount"
/>
<FIELD
NAME=
"allattemptscount"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
UNSIGNED=
"true"
SEQUENCE=
"false"
PREVIOUS=
"firstattemptscount"
NEXT=
"firstattemptsavg"
/>
<FIELD
NAME=
"firstattemptsavg"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"allattemptscount"
NEXT=
"allattemptsavg"
/>
<FIELD
NAME=
"allattemptsavg"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"firstattemptsavg"
NEXT=
"median"
/>
<FIELD
NAME=
"median"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"allattemptsavg"
NEXT=
"standarddeviation"
/>
<FIELD
NAME=
"standarddeviation"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"median"
NEXT=
"skewness"
/>
<FIELD
NAME=
"firstattemptsavg"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"allattemptscount"
NEXT=
"allattemptsavg"
/>
<FIELD
NAME=
"allattemptsavg"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"firstattemptsavg"
NEXT=
"median"
/>
<FIELD
NAME=
"median"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"allattemptsavg"
NEXT=
"standarddeviation"
/>
<FIELD
NAME=
"standarddeviation"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"median"
NEXT=
"skewness"
/>
<FIELD
NAME=
"skewness"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"false"
SEQUENCE=
"false"
DECIMALS=
"10"
PREVIOUS=
"standarddeviation"
NEXT=
"kurtosis"
/>
<FIELD
NAME=
"kurtosis"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"false"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"skewness"
NEXT=
"cic"
/>
<FIELD
NAME=
"cic"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"false"
SEQUENCE=
"false"
DECIMALS=
"10"
PREVIOUS=
"kurtosis"
NEXT=
"errorratio"
/>
<FIELD
NAME=
"errorratio"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"10"
PREVIOUS=
"cic"
NEXT=
"standarderror"
/>
<FIELD
NAME=
"standarderror"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"10"
PREVIOUS=
"errorratio"
/>
<FIELD
NAME=
"errorratio"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"10"
PREVIOUS=
"cic"
NEXT=
"standarderror"
/>
<FIELD
NAME=
"standarderror"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"10"
PREVIOUS=
"errorratio"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
...
...
@@ -34,14 +34,14 @@
<FIELD
NAME=
"questionid"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
UNSIGNED=
"true"
SEQUENCE=
"false"
PREVIOUS=
"quizstatisticsid"
NEXT=
"subquestion"
/>
<FIELD
NAME=
"subquestion"
TYPE=
"int"
LENGTH=
"4"
NOTNULL=
"true"
UNSIGNED=
"true"
SEQUENCE=
"false"
PREVIOUS=
"questionid"
NEXT=
"s"
/>
<FIELD
NAME=
"s"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
UNSIGNED=
"true"
DEFAULT=
"0"
SEQUENCE=
"false"
PREVIOUS=
"subquestion"
NEXT=
"effectiveweight"
/>
<FIELD
NAME=
"effectiveweight"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"s"
NEXT=
"negcovar"
/>
<FIELD
NAME=
"effectiveweight"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"s"
NEXT=
"negcovar"
/>
<FIELD
NAME=
"negcovar"
TYPE=
"int"
LENGTH=
"2"
NOTNULL=
"true"
UNSIGNED=
"true"
DEFAULT=
"0"
SEQUENCE=
"false"
PREVIOUS=
"effectiveweight"
NEXT=
"discriminationindex"
/>
<FIELD
NAME=
"discriminationindex"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"false"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"negcovar"
NEXT=
"discriminativeefficiency"
/>
<FIELD
NAME=
"discriminativeefficiency"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"false"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"discriminationindex"
NEXT=
"sd"
/>
<FIELD
NAME=
"sd"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"10"
PREVIOUS=
"discriminativeefficiency"
NEXT=
"facility"
/>
<FIELD
NAME=
"facility"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"10"
PREVIOUS=
"sd"
NEXT=
"subquestions"
/>
<FIELD
NAME=
"sd"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"10"
PREVIOUS=
"discriminativeefficiency"
NEXT=
"facility"
/>
<FIELD
NAME=
"facility"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"false"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"10"
PREVIOUS=
"sd"
NEXT=
"subquestions"
/>
<FIELD
NAME=
"subquestions"
TYPE=
"text"
LENGTH=
"medium"
NOTNULL=
"false"
SEQUENCE=
"false"
PREVIOUS=
"facility"
NEXT=
"maxgrade"
/>
<FIELD
NAME=
"maxgrade"
TYPE=
"number"
LENGTH=
"12"
NOTNULL=
"false"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"7"
PREVIOUS=
"subquestions"
NEXT=
"positions"
/>
<FIELD
NAME=
"maxgrade"
TYPE=
"number"
LENGTH=
"12"
NOTNULL=
"false"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"7"
PREVIOUS=
"subquestions"
NEXT=
"positions"
/>
<FIELD
NAME=
"positions"
TYPE=
"text"
LENGTH=
"medium"
NOTNULL=
"false"
SEQUENCE=
"false"
COMMENT=
"positions in which this item appears. Only used for random questions."
PREVIOUS=
"maxgrade"
/>
</FIELDS>
<KEYS>
...
...
@@ -57,7 +57,7 @@
<FIELD
NAME=
"aid"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"true"
UNSIGNED=
"true"
SEQUENCE=
"false"
PREVIOUS=
"subqid"
NEXT=
"response"
/>
<FIELD
NAME=
"response"
TYPE=
"text"
LENGTH=
"big"
NOTNULL=
"false"
SEQUENCE=
"false"
PREVIOUS=
"aid"
NEXT=
"rcount"
/>
<FIELD
NAME=
"rcount"
TYPE=
"int"
LENGTH=
"10"
NOTNULL=
"false"
UNSIGNED=
"true"
SEQUENCE=
"false"
PREVIOUS=
"response"
NEXT=
"credit"
/>
<FIELD
NAME=
"credit"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"true"
UNSIGNED=
"
tru
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"rcount"
/>
<FIELD
NAME=
"credit"
TYPE=
"number"
LENGTH=
"15"
NOTNULL=
"true"
UNSIGNED=
"
fals
e"
SEQUENCE=
"false"
DECIMALS=
"5"
PREVIOUS=
"rcount"
/>
</FIELDS>
<KEYS>
<KEY
NAME=
"primary"
TYPE=
"primary"
FIELDS=
"id"
/>
...
...
mod/quiz/report/statistics/db/upgrade.php
View file @
ea003cd5
...
...
@@ -160,6 +160,74 @@ function xmldb_quiz_statistics_upgrade($oldversion) {
upgrade_plugin_savepoint
(
true
,
2008112100
,
'quizreport'
,
'statistics'
);
}
if
(
$oldversion
<
2008112101
)
{
// Removed stupid UNSIGNED from all NUMBER columns in the quiz_statistics table.
$table
=
new
xmldb_table
(
'quiz_statistics'
);
// Change of sign for field firstattemptsavg
$field
=
new
xmldb_field
(
'firstattemptsavg'
,
XMLDB_TYPE_NUMBER
,
'15, 5'
,
null
,
null
,
null
,
null
,
'allattemptscount'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// Change of sign for field allattemptsavg
$field
=
new
xmldb_field
(
'allattemptsavg'
,
XMLDB_TYPE_NUMBER
,
'15, 5'
,
null
,
null
,
null
,
null
,
'firstattemptsavg'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// Change of sign for field median
$field
=
new
xmldb_field
(
'median'
,
XMLDB_TYPE_NUMBER
,
'15, 5'
,
null
,
null
,
null
,
null
,
'allattemptsavg'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// Change of sign for field standarddeviation
$field
=
new
xmldb_field
(
'standarddeviation'
,
XMLDB_TYPE_NUMBER
,
'15, 5'
,
null
,
null
,
null
,
null
,
'median'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// Change of sign for field errorratio
$field
=
new
xmldb_field
(
'errorratio'
,
XMLDB_TYPE_NUMBER
,
'15, 10'
,
null
,
null
,
null
,
null
,
'cic'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// Change of sign for field standarderror
$field
=
new
xmldb_field
(
'standarderror'
,
XMLDB_TYPE_NUMBER
,
'15, 10'
,
null
,
null
,
null
,
null
,
'errorratio'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// statistics savepoint reached
upgrade_plugin_savepoint
(
true
,
2008112101
,
'quiz'
,
'statistics'
);
}
if
(
$oldversion
<
2008112102
)
{
// Removed stupid UNSIGNED from all NUMBER columns in the quiz_question_statistics table.
$table
=
new
xmldb_table
(
'quiz_question_statistics'
);
// Change of sign for field effectiveweight
$field
=
new
xmldb_field
(
'effectiveweight'
,
XMLDB_TYPE_NUMBER
,
'15, 5'
,
null
,
null
,
null
,
null
,
's'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// Change of sign for field sd
$field
=
new
xmldb_field
(
'sd'
,
XMLDB_TYPE_NUMBER
,
'15, 10'
,
null
,
null
,
null
,
null
,
'discriminativeefficiency'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// Change of sign for field facility
$field
=
new
xmldb_field
(
'facility'
,
XMLDB_TYPE_NUMBER
,
'15, 10'
,
null
,
null
,
null
,
null
,
'sd'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// Change of sign for field maxgrade
$field
=
new
xmldb_field
(
'maxgrade'
,
XMLDB_TYPE_NUMBER
,
'12, 7'
,
null
,
null
,
null
,
null
,
'subquestions'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// statistics savepoint reached
upgrade_plugin_savepoint
(
true
,
2008112102
,
'quiz'
,
'statistics'
);
}
if
(
$oldversion
<
2008112103
)
{
// Removed stupid UNSIGNED from all NUMBER columns in the quiz_question_response_stats table.
$table
=
new
xmldb_table
(
'quiz_question_response_stats'
);
// Change of sign for field credit
$field
=
new
xmldb_field
(
'credit'
,
XMLDB_TYPE_NUMBER
,
'15, 5'
,
null
,
null
,
null
,
null
,
'rcount'
);
$dbman
->
change_field_unsigned
(
$table
,
$field
);
// statistics savepoint reached
upgrade_plugin_savepoint
(
true
,
2008112103
,
'quiz'
,
'statistics'
);
}
return
true
;
}
mod/quiz/report/statistics/version.php
View file @
ea003cd5
<?php
$plugin
->
version
=
200811210
0
;
// The (date) version of this module
$plugin
->
version
=
200811210
3
;
// The (date) version of this module
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