From 32cfa4dbf8e071372c7c0bd35189812fe0571f1b Mon Sep 17 00:00:00 2001 From: bobopinna Date: Tue, 26 Sep 2006 14:25:59 +0000 Subject: [PATCH] Added skip view page feature --- mod/scorm/db/access.php | 14 ++++++++++++++ mod/scorm/db/mysql.php | 4 ++++ mod/scorm/db/mysql.sql | 1 + 3 files changed, 19 insertions(+) diff --git a/mod/scorm/db/access.php b/mod/scorm/db/access.php index fb908ad025..f8234932b1 100644 --- a/mod/scorm/db/access.php +++ b/mod/scorm/db/access.php @@ -47,6 +47,20 @@ $mod_scorm_capabilities = array( ) ), + 'mod/scorm:skipview' => array( + + 'captype' => 'write', + 'contextlevel' => CONTEXT_MODULE, + 'legacy' => array( + 'guest' => CAP_PREVENT, + 'student' => CAP_ALLOW, + 'teacher' => CAP_PREVENT, + 'editingteacher' => CAP_PREVENT, + 'coursecreator' => CAP_PREVENT, + 'admin' => CAP_PREVENT + ) + ), + 'mod/scorm:savetrack' => array( 'captype' => 'write', diff --git a/mod/scorm/db/mysql.php b/mod/scorm/db/mysql.php index e5e9c5ff75..6537bbae53 100755 --- a/mod/scorm/db/mysql.php +++ b/mod/scorm/db/mysql.php @@ -217,6 +217,10 @@ function scorm_upgrade($oldversion) { execute_sql("ALTER TABLE {$CFG->prefix}scorm_scoes_track ADD INDEX element(element(255));",false); } + if ($oldversion < 2006102600) { + table_column("scorm", "", "skipview", "TINYINT", "1", "UNSIGNED", "1", "NOT NULL", "launch"); + } + return true; } ?> diff --git a/mod/scorm/db/mysql.sql b/mod/scorm/db/mysql.sql index b4b6cacd6d..cfb27c9a66 100755 --- a/mod/scorm/db/mysql.sql +++ b/mod/scorm/db/mysql.sql @@ -12,6 +12,7 @@ CREATE TABLE prefix_scorm ( grademethod tinyint(2) NOT NULL default '0', maxattempt int(10) NOT NULL default '1', launch int(10) unsigned NOT NULL default '0', + skipview tinyint(1) unsigned NOT NULL default '1', summary text NOT NULL default '', hidebrowse tinyint(1) NOT NULL default '0', hidetoc tinyint(1) NOT NULL default '0', -- 2.39.5