Permalink
Browse files

Fixed a upgrade bug with field timelimitaction

  • Loading branch information...
1 parent f046c91 commit b7119d1440d503ca957ec8e47cbcaa834c800d30 bobopinna committed Jun 28, 2005
Showing with 2 additions and 4 deletions.
  1. +2 −4 mod/scorm/db/mysql.php
View
@@ -44,13 +44,11 @@ function scorm_upgrade($oldversion) {
if ($oldversion < 2005031300) {
table_column("scorm_scoes", "", "prerequisites", "VARCHAR", "200", "", "", "NOT NULL", "title");
table_column("scorm_scoes", "", "maxtimeallowed", "VARCHAR", "13", "", "", "NOT NULL", "prerequisites");
- modify_database('',"ALTER TABLE prefix_scorm_scoes ADD timelimitaction ".
- "SET('exit,message','exit,no message','continue,message','continue,no message') ".
- "DEFAULT '' AFTER 'maxtimeallowed'");
+ table_column("scorm_scoes", "", "timelimitaction", "VARCHAR", "19", "", "", "NOT NULL", "maxtimeallowed");
table_column("scorm_scoes", "", "masteryscore", "VARCHAR", "200", "", "", "NOT NULL", "datafromlms");
$oldscoes = get_records_select("scorm_scoes","1","id ASC");
- modify_database('',"ALTER TABLE prefix_scorm_scoes CHANGE type scormtype SET('sco','asset') DEFAULT '' NOT NULL");
+ table_column("scorm_scoes", "type", "scormtype", "VARCHAR", "5", "", "", "NOT NULL");
if(!empty($oldscoes)) {
foreach ($oldscoes as $sco) {
$sco->scormtype = $sco->type;

0 comments on commit b7119d1

Please sign in to comment.