Adding db changes for the new lp dates (modified_on, publicated_on, created_on, expired_on) see BT#1618

skala
Julio Montoya 15 years ago
parent 157101fe3a
commit f8c1943308
  1. 12
      main/inc/lib/add_course.lib.inc.php
  2. 6
      main/install/migrate-db-1.8.7-1.8.8-pre.sql

@ -1197,10 +1197,16 @@ function update_Db_course($course_db_name) {
"theme varchar(255) not null default '', " . // stores the theme of the LP
"preview_image varchar(255) not null default '', " . // stores the theme of the LP
"author varchar(255) not null default '', " . // stores the theme of the LP
"session_id int unsigned not null default 0, " . // the session_id
"prerequisite int unsigned not null default 0, " . // pre requisite for next lp
"session_id int unsigned not null default 0, " . // the session_id
"prerequisite int unsigned not null default 0, " . // pre requisite for next lp
"use_max_score int unsigned not null default 1, " . // max scores for scorm packages
"autolunch int unsigned not null default 0 " . // max scores for scorm packages
"autolunch int unsigned not null default 0, " . // auto lunch LP
"created_on DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', " . // auto lunch LP
"modified_on DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', " . // auto lunch LP
"publicated_on DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', " . // auto lunch LP
"expired_on DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' " . // auto lunch LP
")" . $charset_clause;
if (!Database::query($sql)) {

@ -112,6 +112,12 @@ ALTER TABLE tool MODIFY COLUMN category varchar(20) not null default 'authoring'
ALTER TABLE lp ADD COLUMN autolunch INT DEFAULT 0;
ALTER TABLE lp ADD COLUMN created_on DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE lp ADD COLUMN modified_on DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE lp ADD COLUMN expired_on DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE lp ADD COLUMN publicated_on DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
INSERT INTO course_setting(variable,value,category) VALUES ('enable_lp_auto_launch',0,'learning_path');
INSERT INTO course_setting(variable,value,category) VALUES ('pdf_export_watermark_text','','course');

Loading…
Cancel
Save