Adding securetoolurl and secureicon fields
authorChris Scribner <scriby@gmail.com>
Tue, 18 Oct 2011 17:10:58 +0000 (13:10 -0400)
committerChris Scribner <scriby@gmail.com>
Mon, 7 Nov 2011 01:42:02 +0000 (20:42 -0500)
mod/lti/db/install.xml
mod/lti/db/upgrade.php
mod/lti/version.php

index 7410fd4..269645c 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="mod/lti/db" VERSION="20111007" COMMENT="XMLDB file for Moodle mod/lti"
+<XMLDB PATH="mod/lti/db" VERSION="20111018" COMMENT="XMLDB file for Moodle mod/lti"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
 >
@@ -14,8 +14,9 @@
         <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="introformat" NEXT="timemodified"/>
         <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="timecreated" NEXT="typeid"/>
         <FIELD NAME="typeid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="Basic LTI type" PREVIOUS="timemodified" NEXT="toolurl"/>
-        <FIELD NAME="toolurl" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" COMMENT="Remote tool url" PREVIOUS="typeid" NEXT="instructorchoicesendname"/>
-        <FIELD NAME="instructorchoicesendname" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="Send user's name" PREVIOUS="toolurl" NEXT="instructorchoicesendemailaddr"/>
+        <FIELD NAME="toolurl" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" COMMENT="Remote tool url" PREVIOUS="typeid" NEXT="securetoolurl"/>
+        <FIELD NAME="securetoolurl" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" PREVIOUS="toolurl" NEXT="instructorchoicesendname"/>
+        <FIELD NAME="instructorchoicesendname" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="Send user's name" PREVIOUS="securetoolurl" NEXT="instructorchoicesendemailaddr"/>
         <FIELD NAME="instructorchoicesendemailaddr" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="Send user's email" PREVIOUS="instructorchoicesendname" NEXT="instructorchoiceallowroster"/>
         <FIELD NAME="instructorchoiceallowroster" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="Allow the roster to be retrieved" PREVIOUS="instructorchoicesendemailaddr" NEXT="instructorchoiceallowsetting"/>
         <FIELD NAME="instructorchoiceallowsetting" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="Allow a tool to store a setting" PREVIOUS="instructorchoiceallowroster" NEXT="instructorcustomparameters"/>
@@ -29,7 +30,8 @@
         <FIELD NAME="showtitle" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="debuglaunch" NEXT="showdescription"/>
         <FIELD NAME="showdescription" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="showtitle" NEXT="servicesalt"/>
         <FIELD NAME="servicesalt" TYPE="char" LENGTH="40" NOTNULL="false" SEQUENCE="false" PREVIOUS="showdescription" NEXT="icon"/>
-        <FIELD NAME="icon" TYPE="text" LENGTH="medium" NOTNULL="false" SEQUENCE="false" PREVIOUS="servicesalt"/>
+        <FIELD NAME="icon" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" PREVIOUS="servicesalt" NEXT="secureicon"/>
+        <FIELD NAME="secureicon" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" PREVIOUS="icon"/>
       </FIELDS>
       <KEYS>
         <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
index 199e99a..d115d27 100644 (file)
@@ -65,7 +65,7 @@ function xmldb_lti_upgrade($oldversion=0) {
     
     if ($oldversion < 2011100701) {
         $table = new xmldb_table('lti');
-        $field = new xmldb_field('icon', XMLDB_TYPE_TEXT, 'medium', null, null, null, null, 'servicesalt');
+        $field = new xmldb_field('icon', XMLDB_TYPE_TEXT, 'small', null, null, null, null, 'servicesalt');
 
         if (!$dbman->field_exists($table, $field)) {
             $dbman->add_field($table, $field);
@@ -74,6 +74,23 @@ function xmldb_lti_upgrade($oldversion=0) {
         upgrade_mod_savepoint(true, 2011100701, 'lti');
     }   
     
+    if ($oldversion < 2011101801) {
+        $table = new xmldb_table('lti');
+        $field = new xmldb_field('securetoolurl', XMLDB_TYPE_TEXT, 'small', null, null, null, null, 'toolurl');
+        
+        if (!$dbman->field_exists($table, $field)) {
+            $dbman->add_field($table, $field);
+        }
+        
+        $field = new xmldb_field('secureicon', XMLDB_TYPE_TEXT, 'small', null, null, null, null, 'icon');
+      
+        if (!$dbman->field_exists($table, $field)) {
+            $dbman->add_field($table, $field);
+        }        
+        
+        upgrade_mod_savepoint(true, 2011101801, 'lti');
+    }
+    
     $result = true;
 
     
index 32d70ec..0d98a9e 100644 (file)
@@ -46,5 +46,5 @@
  * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-$module->version  = 2011101400;  // The current module version (Date: YYYYMMDDXX)
+$module->version  = 2011101801;  // The current module version (Date: YYYYMMDDXX)
 $module->cron     = 0;           // Period for cron to check this module (secs)