http://atutor.ca/atutor/mantis/view.php?id=4580
authorHarris Wong <hwong@ocad.ca>
Thu, 14 Oct 2010 17:25:22 +0000 (17:25 -0000)
committerHarris Wong <hwong@ocad.ca>
Thu, 14 Oct 2010 17:25:22 +0000 (17:25 -0000)
- modified the dicussionTools and weblinks xsd to validate.
- added cc_profile specific metadata into test templates

17 files changed:
docs/home/ims/domainProfile_5/imswl_v1p0_localised.xsd
docs/home/ims/domainProfile_6/imsdt_v1p0_localised.xsd
docs/home/ims/imsdt_v1p0_localised.xsd [deleted file]
docs/home/ims/imswl_v1p0_localised.xsd [deleted file]
docs/home/ims/main.xsd
docs/home/imscc/include/ims_template.inc.php
docs/include/classes/QTI/QTIParser.class.php
docs/include/classes/Weblinks/Weblinks.tmpl.php
docs/include/classes/testQuestions.class.php
docs/themes/default/tests/test_questions/likert_qti_1p2.tmpl.php
docs/themes/default/tests/test_questions/long_qti_1p2.tmpl.php
docs/themes/default/tests/test_questions/matching_qti_1p2.tmpl.php
docs/themes/default/tests/test_questions/multianswer_qti_1p2.tmpl.php
docs/themes/default/tests/test_questions/multichoice_qti_1p2.tmpl.php
docs/themes/default/tests/test_questions/ordering_qti_1p2.tmpl.php
docs/themes/default/tests/test_questions/truefalse_qti_1p2.tmpl.php
docs/themes/default/tests/test_questions/wrapper.tmpl.php

index 5f97a95..7485215 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--*************************************************************************-->\r
-<!--** This schema has been modified from the original base schema named - **-->\r
-<!--** imswl_v1p0.xsd                                                      **-->\r
-<!--** using the IMS SchemaProf tool. This tool is based on software from  **-->\r
-<!--** the TELCERT Project which was funded in part by the European        **-->\r
-<!--** Commission under contract IST-507128                                **-->\r
-<!--*************************************************************************-->\r
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.imsglobal.org/xsd/imswl_v1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.imsglobal.org/xsd/imswl_v1p0" elementFormDefault="unqualified">\r
-  <xs:element name="webLink" type="webLinkType" />\r
-  <xs:complexType name="webLinkType">\r
-    <xs:sequence>\r
-      <xs:element name="title" type="xs:string" />\r
-      <xs:element name="url">\r
-        <xs:complexType>\r
-          <xs:attribute name="href" type="xs:string" use="required" />\r
-          <xs:attribute name="target" type="xs:string" />\r
-          <xs:attribute name="windowFeatures" type="xs:string" />\r
-        </xs:complexType>\r
-      </xs:element>\r
-    </xs:sequence>\r
-  </xs:complexType>\r
-</xs:schema>\r
+<?xml version = "1.0" encoding = "UTF-8"?>
+<xs:schema xmlns="http://www.imsglobal.org/xsd/imswl_v1p0"
+    targetNamespace="http://www.imsglobal.org/xsd/imswl_v1p0"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    version="IMS CC WBLNK 1.0"
+    elementFormDefault="qualified"
+    attributeFormDefault="unqualified">
+    <xs:annotation>
+        <xs:documentation>
+            XSD Data File Information
+            -------------------------
+            Author:         Colin Smythe
+            Date:           31st August, 2010
+            Version:        1.0
+            Status:         Final
+            Description:    This is the IMS GLC Web Links Data Model for the Common Cartridge.
+
+            History:        Version 1.0 - the first release of this data model.
+
+            License:        IPR, License and Distribution Notices
+
+                            This machine readable file is derived from IMS Global Learning Consortium (GLC) specification IMS [spec name] Version [x.x]
+                            found at http://www.imsglobal.org/[xxx] and the original IMS GLC schema binding or code base
+                            http://www.imsglobal.org/[binding document].
+
+                            Recipients of this document are requested to submit, with their comments, notification of any
+                            relevant patent claims or other intellectual property rights of which they may be aware that might be
+                            infringed by the schema binding contained in this document.
+
+                            IMS GLC takes no position regarding the validity or scope of any intellectual property or other
+                            rights that might be claimed to pertain to the implementation or use of the technology described in this
+                            document or the extent to which any license under such rights might or might not be available; neither
+                            does it represent that it has made any effort to identify any such rights. Information on IMS GLCs
+                            procedures with respect to rights in IMS GLC specifications can be found at the IMS GLC Intellectual Property
+                            Rights web page: http://www.imsglobal.org/ipr/imsipr_policyFinal.pdf.
+
+                            Copyright © IMS Global Learning Consortium 1999-2010. All Rights Reserved.
+
+                            License Notice for Users
+
+                            Users of products or services that include this document are hereby granted a worldwide, royalty-free, 
+                            non-exclusive license to use this document. 
+
+                            Distribution Notice for Developers
+
+                            Developers of products or services that are not original incorporators of this document and 
+                            have not changed this document, that is, are distributing a software product that incorporates this 
+                            document as is from a third-party source other than IMS, are hereby granted permission to copy,
+                            display and distribute the contents of this document in any medium for any purpose without fee or 
+                            royalty provided that you include this IPR, License and Distribution notice in its entirety on ALL
+                            copies, or portions thereof.
+
+                            Developers of products or services that are original incorporators of this document and wish 
+                            to provide distribution of this document as is or with modifications and developers of products and 
+                            services that are not original incorporators of this document and have changed this document, are
+                            required to register with the IMS GLC community on the IMS GLC website as described in the following two
+                            paragraphs:-
+
+                            *  If you wish to distribute this document as is, with no modifications, you are hereby granted 
+                               permission to copy, display and distribute the contents of this document in any medium for any 
+                               purpose without fee or royalty provided that you include this IPR, License and Distribution notice in
+                               its entirety on ALL copies, or portions thereof, that you make and you complete a valid license 
+                               registration with IMS and receive an email from IMS granting the license. To register, follow the 
+                               instructions on the IMS website: http://www.imsglobal.org/specificationdownload.cfm. Once 
+                               registered you are granted permission to transfer unlimited distribution rights of this document for the 
+                               purposes of third-party or other distribution of your product or service that incorporates this 
+                               document as long as this IPR, License and Distribution notice remains in place in its entirety; 
+
+                            *  If you wish to create and distribute a derived work from this document, you are hereby 
+                               granted permission to copy, display and distribute the contents of the derived work in any medium for 
+                               any purpose without fee or royalty provided that you include this IPR, License and Distribution 
+                               notice in its entirety on ALL copies, or portions thereof, that you make and you complete a valid 
+                               profile registration with IMS GLC and receive an email from IMS GLC granting the license. To register, follow
+                               the instructions on the IMS GLC website: http://www.imsglobal.org/profile/. Once registered you are 
+                               granted permission to transfer unlimited distribution rights of the derived work for the purposes of 
+                               third-party or other distribution of your product or service that incorporates the derived work as long 
+                               as this IPR, License and Distribution notice remains in place in its entirety. 
+
+                            The limited permissions granted above are perpetual and will not be revoked by IMS GLC or its 
+                            successors or assigns.
+
+                            THIS SPECIFICATION IS BEING OFFERED WITHOUT ANY WARRANTY WHATSOEVER, AND IN PARTICULAR, ANY WARRANTY OF NONINFRINGEMENT IS
+                            EXPRESSLY DISCLAIMED. ANY USE OF THIS SPECIFICATION SHALL BE MADE ENTIRELY AT THE IMPLEMENTERS OWN RISK, AND NEITHER THE CONSORTIUM
+                            NOR ANY OF ITS MEMBERS OR SUBMITTERS, SHALL HAVE ANY LIABILITY WHATSOEVER TO ANY IMPLEMENTER OR THIRD PARTY FOR ANY DAMAGES OF
+                            ANY NATURE WHATSOEVER, DIRECTLY OR INDIRECTLY, ARISING FROM THE USE OF THIS SPECIFICATION.
+
+            Source UML File Information
+            ---------------------------
+            The source file information must be supplied as an XMI file (without diagram layout information).
+            The supported UML authoring tools are:
+            (a) Poseidon – v6 (and later)
+
+            Source XSLT File Information
+            ----------------------------
+            XSL Generator:    UMLtoXSDTransformv0p9.xsl
+            XSLT Processor:   Xalan
+            Release:          1.0 Beta 3
+            Date:             31st May, 2009
+
+            IMS GLC Auto-generation Binding Tool-kit (I-BAT)
+            ------------------------------------------------
+            This file was auto-generated using the IMS GLC Binding Auto-generation Tool-kit (I-BAT).  While every
+            attempt has been made to ensure that this tool auto-generates the files correctly, users should be aware
+            that this is an experimental tool.  Permission is given to make use of this tool.  IMS GLC makes no
+            claim on the materials created by third party users of this tool.  Details on how to use this tool
+            are contained in the IMS GLC "I-BAT" Documentation available at the IMS GLC web-site.
+
+            Tool Copyright:  2005-2010 (c) IMS Global Learning Consortium Inc.  All Rights Reserved.
+        </xs:documentation>
+    </xs:annotation>
+
+    <!-- Generate Global Attributes *********************************************************************** -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate Namespaced extension Group  ************************************************************* -->
+
+    <xs:group name="grpStrict.any">
+        <xs:annotation>
+            <xs:documentation>
+                Any namespaced element from any namespace may be included within an "any" element.
+                The namespace for the imported element must be defined in the instance, and the schema must be imported.
+                The extension has a definition of "strict" i.e. they must have their own namespace.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:any namespace = "##other" processContents = "strict" minOccurs = "0" maxOccurs = "unbounded"/>
+        </xs:sequence>
+    </xs:group>
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate Special DataTypes  ********************************************************************** -->
+
+    <xs:complexType name="EmptyPrimitiveType.Type">
+        <xs:complexContent>
+            <xs:restriction base="xs:anyType"/>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate the enumerated simpleType declarations ************************************************** -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate the simpleType elements based IMS data-types  ******************************************* -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate the derived data-type elements based upon simpleType ************************************ -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate the derived data-type elements based upon derived simpleType **************************** -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate the data-type ComplexTypes ************************************************************** -->
+
+    <xs:complexType name="WebLink.Type">
+        <xs:annotation>
+            <xs:documentation source="umldocumentation">
+                The WebLink complexType for the associated object.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="title" type="xs:normalizedString" minOccurs = "1" maxOccurs = "1"/>
+            <xs:element name="url" type="URL.Type" minOccurs = "1" maxOccurs = "1"/>
+            <xs:group ref="grpStrict.any"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="URL.Type">
+        <xs:annotation>
+            <xs:documentation source="umldocumentation">
+                The URL for the web link.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="EmptyPrimitiveType.Type">
+                <xs:attribute name="href" use="required" type="xs:normalizedString"/>
+                <xs:attribute name="target" use="optional" type="xs:normalizedString"/>
+                <xs:attribute name="windowFeatures" use="optional" type="xs:normalizedString"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <!-- ================================================================================================== -->
+
+    <!-- Declaration of the elements ********************************************************************** -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Declaration of the root element(s) *************************************************************** -->
+
+    <xs:element name="webLink" type="WebLink.Type"/>
+
+    <!-- ================================================================================================== -->
+
+</xs:schema>
index 5364cef..991e5da 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--*************************************************************************-->\r
-<!--** This schema has been modified from the original base schema named - **-->\r
-<!--** imsdt_v1p0.xsd                                                      **-->\r
-<!--** using the IMS SchemaProf tool. This tool is based on software from  **-->\r
-<!--** the TELCERT Project which was funded in part by the European        **-->\r
-<!--** Commission under contract IST-507128                                **-->\r
-<!--*************************************************************************-->\r
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.imsglobal.org/xsd/imsdt_v1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.imsglobal.org/xsd/imsdt_v1p0" elementFormDefault="unqualified">\r
-\r
-  <xs:element name="topic" type="topicType" />\r
-  <xs:complexType name="topicType">\r
-    <xs:sequence>\r
-      <xs:element name="title" type="xs:string" />\r
-      <xs:element name="text">\r
-        <xs:complexType>\r
-          <xs:simpleContent>\r
-            <xs:extension base="xs:string">\r
-              <xs:attribute name="texttype" type="textTypeType" default="text/plain" />\r
-            </xs:extension>\r
-          </xs:simpleContent>\r
-        </xs:complexType>\r
-      </xs:element>\r
-      <xs:element name="attachments" minOccurs="0">\r
-        <xs:complexType>\r
-          <xs:sequence>\r
-            <xs:element name="attachment" minOccurs="1" maxOccurs="unbounded">\r
-              <xs:complexType>\r
-                <xs:attribute name="href" type="xs:string" use="required" />\r
-              </xs:complexType>\r
-            </xs:element>\r
-          </xs:sequence>\r
-        </xs:complexType>\r
-      </xs:element>\r
-    </xs:sequence>\r
-  </xs:complexType>\r
-  <xs:simpleType name="textTypeType">\r
-    <xs:restriction base="xs:string">\r
-      <xs:enumeration value="text/html" />\r
-      <xs:enumeration value="text/plain" />\r
-    </xs:restriction>\r
-  </xs:simpleType>\r
-</xs:schema>\r
+<?xml version = "1.0" encoding = "UTF-8"?>
+<xs:schema xmlns="http://www.imsglobal.org/xsd/imsdt_v1p0"
+    targetNamespace="http://www.imsglobal.org/xsd/imsdt_v1p0"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    version="IMS CC DTPC 1.0"
+    elementFormDefault="qualified"
+    attributeFormDefault="unqualified">
+    <xs:annotation>
+        <xs:documentation>
+            XSD Data File Information
+            -------------------------
+            Author:         Colin Smythe
+            Date:           31st August, 2010
+            Version:        1.0
+            Status:         Final
+            Description:    This is the IMS GLC Discussion Topics Data Model for the Common Cartridge.
+
+            History:        Version 1.0 - the first release of this data model.
+
+            License:        IPR, License and Distribution Notices
+
+                            This machine readable file is derived from IMS Global Learning Consortium (GLC) specification IMS [spec name] Version [x.x]
+                            found at http://www.imsglobal.org/[xxx] and the original IMS GLC schema binding or code base
+                            http://www.imsglobal.org/[binding document].
+
+                            Recipients of this document are requested to submit, with their comments, notification of any
+                            relevant patent claims or other intellectual property rights of which they may be aware that might be
+                            infringed by the schema binding contained in this document.
+
+                            IMS GLC takes no position regarding the validity or scope of any intellectual property or other
+                            rights that might be claimed to pertain to the implementation or use of the technology described in this
+                            document or the extent to which any license under such rights might or might not be available; neither
+                            does it represent that it has made any effort to identify any such rights. Information on IMS GLCs
+                            procedures with respect to rights in IMS GLC specifications can be found at the IMS GLC Intellectual Property
+                            Rights web page: http://www.imsglobal.org/ipr/imsipr_policyFinal.pdf.
+
+                            Copyright © IMS Global Learning Consortium 1999-2010. All Rights Reserved.
+
+                            License Notice for Users
+
+                            Users of products or services that include this document are hereby granted a worldwide, royalty-free, 
+                            non-exclusive license to use this document. 
+
+                            Distribution Notice for Developers
+
+                            Developers of products or services that are not original incorporators of this document and 
+                            have not changed this document, that is, are distributing a software product that incorporates this 
+                            document as is from a third-party source other than IMS, are hereby granted permission to copy,
+                            display and distribute the contents of this document in any medium for any purpose without fee or 
+                            royalty provided that you include this IPR, License and Distribution notice in its entirety on ALL
+                            copies, or portions thereof.
+
+                            Developers of products or services that are original incorporators of this document and wish 
+                            to provide distribution of this document as is or with modifications and developers of products and 
+                            services that are not original incorporators of this document and have changed this document, are
+                            required to register with the IMS GLC community on the IMS GLC website as described in the following two
+                            paragraphs:-
+
+                            *  If you wish to distribute this document as is, with no modifications, you are hereby granted 
+                               permission to copy, display and distribute the contents of this document in any medium for any 
+                               purpose without fee or royalty provided that you include this IPR, License and Distribution notice in
+                               its entirety on ALL copies, or portions thereof, that you make and you complete a valid license 
+                               registration with IMS and receive an email from IMS granting the license. To register, follow the 
+                               instructions on the IMS website: http://www.imsglobal.org/specificationdownload.cfm. Once 
+                               registered you are granted permission to transfer unlimited distribution rights of this document for the 
+                               purposes of third-party or other distribution of your product or service that incorporates this 
+                               document as long as this IPR, License and Distribution notice remains in place in its entirety; 
+
+                            *  If you wish to create and distribute a derived work from this document, you are hereby 
+                               granted permission to copy, display and distribute the contents of the derived work in any medium for 
+                               any purpose without fee or royalty provided that you include this IPR, License and Distribution 
+                               notice in its entirety on ALL copies, or portions thereof, that you make and you complete a valid 
+                               profile registration with IMS GLC and receive an email from IMS GLC granting the license. To register, follow
+                               the instructions on the IMS GLC website: http://www.imsglobal.org/profile/. Once registered you are 
+                               granted permission to transfer unlimited distribution rights of the derived work for the purposes of 
+                               third-party or other distribution of your product or service that incorporates the derived work as long 
+                               as this IPR, License and Distribution notice remains in place in its entirety. 
+
+                            The limited permissions granted above are perpetual and will not be revoked by IMS GLC or its 
+                            successors or assigns.
+
+                            THIS SPECIFICATION IS BEING OFFERED WITHOUT ANY WARRANTY WHATSOEVER, AND IN PARTICULAR, ANY WARRANTY OF NONINFRINGEMENT IS
+                            EXPRESSLY DISCLAIMED. ANY USE OF THIS SPECIFICATION SHALL BE MADE ENTIRELY AT THE IMPLEMENTERS OWN RISK, AND NEITHER THE CONSORTIUM
+                            NOR ANY OF ITS MEMBERS OR SUBMITTERS, SHALL HAVE ANY LIABILITY WHATSOEVER TO ANY IMPLEMENTER OR THIRD PARTY FOR ANY DAMAGES OF
+                            ANY NATURE WHATSOEVER, DIRECTLY OR INDIRECTLY, ARISING FROM THE USE OF THIS SPECIFICATION.
+
+            Source UML File Information
+            ---------------------------
+            The source file information must be supplied as an XMI file (without diagram layout information).
+            The supported UML authoring tools are:
+            (a) Poseidon – v6 (and later)
+
+            Source XSLT File Information
+            ----------------------------
+            XSL Generator:    UMLtoXSDTransformv0p9.xsl
+            XSLT Processor:   Xalan
+            Release:          1.0 Beta 3
+            Date:             31st May, 2009
+
+            IMS GLC Auto-generation Binding Tool-kit (I-BAT)
+            ------------------------------------------------
+            This file was auto-generated using the IMS GLC Binding Auto-generation Tool-kit (I-BAT).  While every
+            attempt has been made to ensure that this tool auto-generates the files correctly, users should be aware
+            that this is an experimental tool.  Permission is given to make use of this tool.  IMS GLC makes no
+            claim on the materials created by third party users of this tool.  Details on how to use this tool
+            are contained in the IMS GLC "I-BAT" Documentation available at the IMS GLC web-site.
+
+            Tool Copyright:  2005-2010 (c) IMS Global Learning Consortium Inc.  All Rights Reserved.
+        </xs:documentation>
+    </xs:annotation>
+
+    <!-- Generate Global Attributes *********************************************************************** -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate Namespaced extension Group  ************************************************************* -->
+
+    <xs:group name="grpStrict.any">
+        <xs:annotation>
+            <xs:documentation>
+                Any namespaced element from any namespace may be included within an "any" element.
+                The namespace for the imported element must be defined in the instance, and the schema must be imported.
+                The extension has a definition of "strict" i.e. they must have their own namespace.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:any namespace = "##other" processContents = "strict" minOccurs = "0" maxOccurs = "unbounded"/>
+        </xs:sequence>
+    </xs:group>
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate Special DataTypes  ********************************************************************** -->
+
+    <xs:complexType name="EmptyPrimitiveType.Type">
+        <xs:complexContent>
+            <xs:restriction base="xs:anyType"/>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate the enumerated simpleType declarations ************************************************** -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate the simpleType elements based IMS data-types  ******************************************* -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate the derived data-type elements based upon simpleType ************************************ -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate the derived data-type elements based upon derived simpleType **************************** -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Generate the data-type ComplexTypes ************************************************************** -->
+
+    <xs:complexType name="Topic.Type">
+        <xs:annotation>
+            <xs:documentation source="umldocumentation">
+                The Topic complexType for the discussion topic object.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="title" type="xs:normalizedString" minOccurs = "1" maxOccurs = "1"/>
+            <xs:element name="text" type="Text.Type" minOccurs = "1" maxOccurs = "1"/>
+            <xs:element name="attachments" type="Attachments.Type" minOccurs = "0" maxOccurs = "1"/>
+            <xs:group ref="grpStrict.any"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="Attachments.Type">
+        <xs:sequence>
+            <xs:element name="attachment" type="Attachment.Type" minOccurs = "1" maxOccurs = "unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="Text.Type">
+        <xs:annotation>
+            <xs:documentation source="umldocumentation">
+                The Text for the discussion topic.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="texttype" use="required">
+                    <xs:simpleType>
+                        <xs:restriction base="xs:string">
+                            <xs:enumeration value="text/plain"/>
+                            <xs:enumeration value="text/html"/>
+                        </xs:restriction>
+                    </xs:simpleType>
+                </xs:attribute>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+
+    <xs:complexType name="Attachment.Type">
+        <xs:complexContent>
+            <xs:extension base="EmptyPrimitiveType.Type">
+                <xs:attribute name="href" use="required" type="xs:normalizedString"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <!-- ================================================================================================== -->
+
+    <!-- Declaration of the elements ********************************************************************** -->
+
+    <!-- ================================================================================================== -->
+
+    <!-- Declaration of the root element(s) *************************************************************** -->
+
+    <xs:element name="topic" type="Topic.Type"/>
+
+    <!-- ================================================================================================== -->
+
+</xs:schema>
diff --git a/docs/home/ims/imsdt_v1p0_localised.xsd b/docs/home/ims/imsdt_v1p0_localised.xsd
deleted file mode 100644 (file)
index 4fd9bfd..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  IPR, License and Distribution Notices\r
-  This machine readable file is derived from IMS specification IMS Common Cartridge Version 1.0 found at http://www.imsglobal.org/cc/index.html and the original IMS schema binding or code base       http://www.imsglobal.org/cc/.\r
-  \r
-  Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by the schema binding contained in this document.\r
-  \r
-  IMS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on IMS�s procedures with respect to rights in IMS specifications can be found at the IMS Intellectual Property Rights web page: http://www.imsglobal.org/ipr/imsipr_policyFinal.pdf.\r
-  \r
-  Copyright © IMS Global Learning Consortium 1999-2008. All Rights Reserved.\r
-  \r
-  License Notice for Users\r
-  Users of products or services that include this document are hereby granted a worldwide, royalty-free, non-exclusive license to use this document.\r
-  \r
-  Distribution Notice for Developers\r
-  Developers of products or services that are not original incorporators of this document and have not changed this document, that is, are distributing a software product that incorporates this document as is from a third-party source other than IMS, are hereby granted permission to copy, display and distribute the contents of this document in any medium for any purpose without fee or royalty provided that you include this IPR, License and Distribution notice in its entirety on ALL copies, or portions thereof.\r
-  \r
-  Developers of products or services that are original incorporators of this document and wish to provide distribution of this document as is or with modifications and developers of products and services that are not original incorporators of this document and have changed this document, are required to register with the IMS community on the IMS website as described in the following two paragraphs:\r
-  \r
-  - If you wish to distribute this document as is, with no modifications, you are hereby granted permission to copy, display and distribute the contents of this document in any medium for any purpose without fee or royalty provided that you include this IPR, License and Distribution notice in its entirety on ALL copies, or portions thereof, that you make and you complete a valid license registration with IMS and receive an email from IMS granting the license. To register, follow the instructions on the IMS website: http://www.imsglobal.org/specificationdownload.cfm. Once registered you are granted permission to transfer unlimited distribution rights of this document for the purposes of third-party or other distribution of your product or service that incorporates this document as long as this IPR, License and Distribution notice remains in place in its entirety.\r
-  \r
-  - If you wish to create and distribute a derived work from this document, you are hereby granted permission to copy, display and distribute the contents of the derived work in any medium for any purpose without fee or royalty provided that you include this IPR, License and Distribution notice in its entirety on ALL copies, or portions thereof, that you make and you complete a valid profile registration with IMS and receive an email from IMS granting the license. To register, follow the instructions on the IMS website: http://www.imsglobal.org/profile/. Once registered you are granted permission to transfer unlimited distribution rights of the derived work for the purposes of third-party or other distribution of your product or service that incorporates the derived work as long as this IPR, License and Distribution notice remains in place in its entirety.\r
-  \r
-  The limited permissions granted above are perpetual and will not be revoked by IMS or its successors or assigns.\r
-  \r
-  THIS SPECIFICATION IS BEING OFFERED WITHOUT ANY WARRANTY WHATSOEVER, AND IN PARTICULAR, \r
-  ANY WARRANTY OF NONINFRINGEMENT IS EXPRESSLY DISCLAIMED. ANY USE OF THIS SPECIFICATION \r
-  SHALL BE MADE ENTIRELY AT THE IMPLEMENTER�S OWN RISK, AND NEITHER THE CONSORTIUM, NOR \r
-  ANY OF ITS MEMBERS OR SUBMITTERS, SHALL HAVE ANY LIABILITY WHATSOEVER TO ANY IMPLEMENTER \r
-  OR THIRD PARTY FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, DIRECTLY OR INDIRECTLY, ARISING \r
-  FROM THE USE OF THIS SPECIFICATION.\r
--->\r
-<!--*************************************************************************-->\r
-<!--** This schema has been modified from the original base schema named - **-->\r
-<!--** imsdt_v1p0.xsd                                                      **-->\r
-<!--** using the IMS SchemaProf tool. This tool is based on software from  **-->\r
-<!--** the TELCERT Project which was funded in part by the European        **-->\r
-<!--** Commission under contract IST-507128                                **-->\r
-<!--*************************************************************************-->\r
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.imsglobal.org/xsd/imsdt_v1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.imsglobal.org/xsd/imsdt_v1p0" elementFormDefault="unqualified">\r
-\r
-  <xs:element name="topic" type="topicType" />\r
-  <xs:complexType name="topicType">\r
-    <xs:sequence>\r
-      <xs:element name="title" type="xs:string" />\r
-      <xs:element name="text">\r
-        <xs:complexType>\r
-          <xs:simpleContent>\r
-            <xs:extension base="xs:string">\r
-              <xs:attribute name="texttype" type="textTypeType" default="text/plain" />\r
-            </xs:extension>\r
-          </xs:simpleContent>\r
-        </xs:complexType>\r
-      </xs:element>\r
-      <xs:element name="attachments" minOccurs="0">\r
-        <xs:complexType>\r
-          <xs:sequence>\r
-            <xs:element name="attachment" minOccurs="1" maxOccurs="unbounded">\r
-              <xs:complexType>\r
-                <xs:attribute name="href" type="xs:string" use="required" />\r
-              </xs:complexType>\r
-            </xs:element>\r
-          </xs:sequence>\r
-        </xs:complexType>\r
-      </xs:element>\r
-    </xs:sequence>\r
-  </xs:complexType>\r
-  <xs:simpleType name="textTypeType">\r
-    <xs:restriction base="xs:string">\r
-      <xs:enumeration value="text/html" />\r
-      <xs:enumeration value="text/plain" />\r
-    </xs:restriction>\r
-  </xs:simpleType>\r
-</xs:schema>\r
diff --git a/docs/home/ims/imswl_v1p0_localised.xsd b/docs/home/ims/imswl_v1p0_localised.xsd
deleted file mode 100644 (file)
index 88f14ba..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--*************************************************************************-->\r
-<!--** This schema has been modified from the original base schema named - **-->\r
-<!--** imswl_v1p0.xsd                                                      **-->\r
-<!--** using the IMS SchemaProf tool. This tool is based on software from  **-->\r
-<!--** the TELCERT Project which was funded in part by the European        **-->\r
-<!--** Commission under contract IST-507128                                **-->\r
-<!--*************************************************************************-->\r
-<!--\r
-  IPR, License and Distribution Notices\r
-  This machine readable file is derived from IMS specification IMS Common Cartridge Version 1.0 found at http://www.imsglobal.org/cc/index.html and the original IMS schema binding or code base       http://www.imsglobal.org/cc/.\r
-  \r
-  Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by the schema binding contained in this document.\r
-  \r
-  IMS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on IMS�s procedures with respect to rights in IMS specifications can be found at the IMS Intellectual Property Rights web page: http://www.imsglobal.org/ipr/imsipr_policyFinal.pdf.\r
-  \r
-  Copyright © IMS Global Learning Consortium 1999-2008. All Rights Reserved.\r
-  \r
-  License Notice for Users\r
-  Users of products or services that include this document are hereby granted a worldwide, royalty-free, non-exclusive license to use this document.\r
-  \r
-  Distribution Notice for Developers\r
-  Developers of products or services that are not original incorporators of this document and have not changed this document, that is, are distributing a software product that incorporates this document as is from a third-party source other than IMS, are hereby granted permission to copy, display and distribute the contents of this document in any medium for any purpose without fee or royalty provided that you include this IPR, License and Distribution notice in its entirety on ALL copies, or portions thereof.\r
-  \r
-  Developers of products or services that are original incorporators of this document and wish to provide distribution of this document as is or with modifications and developers of products and services that are not original incorporators of this document and have changed this document, are required to register with the IMS community on the IMS website as described in the following two paragraphs:\r
-  \r
-  - If you wish to distribute this document as is, with no modifications, you are hereby granted permission to copy, display and distribute the contents of this document in any medium for any purpose without fee or royalty provided that you include this IPR, License and Distribution notice in its entirety on ALL copies, or portions thereof, that you make and you complete a valid license registration with IMS and receive an email from IMS granting the license. To register, follow the instructions on the IMS website: http://www.imsglobal.org/specificationdownload.cfm. Once registered you are granted permission to transfer unlimited distribution rights of this document for the purposes of third-party or other distribution of your product or service that incorporates this document as long as this IPR, License and Distribution notice remains in place in its entirety.\r
-  \r
-  - If you wish to create and distribute a derived work from this document, you are hereby granted permission to copy, display and distribute the contents of the derived work in any medium for any purpose without fee or royalty provided that you include this IPR, License and Distribution notice in its entirety on ALL copies, or portions thereof, that you make and you complete a valid profile registration with IMS and receive an email from IMS granting the license. To register, follow the instructions on the IMS website: http://www.imsglobal.org/profile/. Once registered you are granted permission to transfer unlimited distribution rights of the derived work for the purposes of third-party or other distribution of your product or service that incorporates the derived work as long as this IPR, License and Distribution notice remains in place in its entirety.\r
-  \r
-  The limited permissions granted above are perpetual and will not be revoked by IMS or its successors or assigns.\r
-  \r
-  THIS SPECIFICATION IS BEING OFFERED WITHOUT ANY WARRANTY WHATSOEVER, AND IN PARTICULAR, \r
-  ANY WARRANTY OF NONINFRINGEMENT IS EXPRESSLY DISCLAIMED. ANY USE OF THIS SPECIFICATION \r
-  SHALL BE MADE ENTIRELY AT THE IMPLEMENTER�S OWN RISK, AND NEITHER THE CONSORTIUM, NOR \r
-  ANY OF ITS MEMBERS OR SUBMITTERS, SHALL HAVE ANY LIABILITY WHATSOEVER TO ANY IMPLEMENTER \r
-  OR THIRD PARTY FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, DIRECTLY OR INDIRECTLY, ARISING \r
-  FROM THE USE OF THIS SPECIFICATION.\r
--->\r
-<!--*************************************************************************-->\r
-<!--** This schema has been modified from the original base schema named - **-->\r
-<!--** imswl_v1p0.xsd                                                      **-->\r
-<!--** using the IMS SchemaProf tool. This tool is based on software from  **-->\r
-<!--** the TELCERT Project which was funded in part by the European        **-->\r
-<!--** Commission under contract IST-507128                                **-->\r
-<!--*************************************************************************-->\r
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.imsglobal.org/xsd/imswl_v1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.imsglobal.org/xsd/imswl_v1p0" elementFormDefault="unqualified">\r
-  <xs:element name="webLink" type="webLinkType"/>\r
-  <xs:complexType name="webLinkType">\r
-    <xs:sequence>\r
-      <xs:element name="title" type="xs:string"/>\r
-      <xs:element name="url">\r
-        <xs:complexType>\r
-          <xs:attribute name="href" type="xs:string" use="required"/>\r
-          <xs:attribute name="target" type="xs:string"/>\r
-          <xs:attribute name="windowFeatures" type="xs:string"/>\r
-        </xs:complexType>\r
-      </xs:element>\r
-    </xs:sequence>\r
-  </xs:complexType>\r
-</xs:schema>
\ No newline at end of file
index bf8511c..e74cbc9 100644 (file)
@@ -21,7 +21,7 @@
     <xs:import namespace ="http://ltsc.ieee.org/xsd/LOM"                  schemaLocation = "domainProfile_2/lomLoose_localised.xsd"       />
     <xs:import namespace ="http://www.imsglobal.org/xsd/imsccauth_v1p0"   schemaLocation = "domainProfile_0/imsccauth_v1p0_localised.xsd" />
     <xs:import namespace ="http://www.imsglobal.org/xsd/ims_qtiasiv1p2"   schemaLocation = "domainProfile_4/ims_qtiasiv1p2_localised.xsd" />
-    <xs:import namespace ="http://www.imsglobal.org/xsd/imswl_v1p0"      schemaLocation = "imswl_v1p0_localised.xsd"                     />    
-    <xs:import namespace ="http://www.imsglobal.org/xsd/imsdt_v1p0"      schemaLocation = "imsdt_v1p0_localised.xsd"                     />    
+    <xs:import namespace ="http://www.imsglobal.org/xsd/imswl_v1p0"      schemaLocation = "domainProfile_5/imswl_v1p0_localised.xsd"     />    
+    <xs:import namespace ="http://www.imsglobal.org/xsd/imsdt_v1p0"      schemaLocation = "domainProfile_6/imsdt_v1p0_localised.xsd"     />    
     <xs:import namespace ="http://www.atutor.ca/xsd/glossary"            schemaLocation = "glossary.xsd"                                 />    
 </xs:schema>
index 8d7851c..24e5d38 100644 (file)
@@ -502,32 +502,28 @@ function print_resources_forum() {
                //file Descrittore con la descrzione del forum
                $fileDesDT_D = '<?xml version="1.0" encoding="UTF-8"?>
        
-                           <dt:topic
-       
-                               xmlns:dt="http://www.imsglobal.org/xsd/imsdt_v1p0"
-       
-                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+                           <topic
+                            xmlns="http://www.imsglobal.org/xsd/imsdt_v1p0"
+                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsdt_v1p0 http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_6/imsdt_v1p0_localised.xsd">
        
                                <title>{TitleDiscussionTopic}</title>
        
                                <text texttype="text/plain">{DescriptionDiscussionTopic}</text>
        
-                           </dt:topic>';
+                           </topic>';
        
                //file Descrittore senza la descrizione del forum
                $fileDesDT = '<?xml version="1.0" encoding="UTF-8"?>
        
-                           <dt:topic
-       
-                               xmlns:dt="http://www.imsglobal.org/xsd/imsdt_v1p0"
-       
-                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+                           <topic
+                            xmlns="http://www.imsglobal.org/xsd/imsdt_v1p0"
+                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsdt_v1p0 http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_6/imsdt_v1p0_localised.xsd">
        
                                <title>{TitleDiscussionTopic}</title>
        
                                <text/>
        
-                           </dt:topic>';
+                           </topic>';
        
                        $f['title'] = htmlspecialchars($f['title']);
                        $f['description'] = htmlspecialchars($f['description']);
index 2a09a37..9116b3f 100644 (file)
@@ -326,8 +326,15 @@ class QTIParser {
         * This function returns the question type of this XML.
         * @access      public 
         * @param       the item_num
-        * @return  1-8, in the order of m/c, t/f, open eneded, likert, s match, order, m/a, g match
-                               false for not found.
+        * @return  1: m/c
+     *          2: t/f
+     *          3: open ended question
+     *          4: likert
+     *          5: s match
+     *          6: order
+     *          7: m/a
+     *          8: g match
+     *          false for not found.
         */
        function getQuestionType($item_num){
                switch ($this->field_entry[$item_num]['qmd_questiontype']){
index b11dae3..b721d88 100644 (file)
@@ -1,7 +1,7 @@
 <?php echo '<?xml version="1.0" encoding="UTF-8"?>' ?>
-<wl:webLink
-  xmlns:wl="http://www.imsglobal.org/xsd/imswl_v1p0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<webLink
+   xmlns="http://www.imsglobal.org/xsd/imswl_v1p0"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imswl_v1p0 http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_5/imswl_v1p0_localised.xsd">
   <title><?php echo $this->title; ?></title>
   <url href="<?php echo $this->url_href; ?>" target="<?php echo $this->url_target; ?>"/>
-</wl:webLink>
+</webLink>
index 1c370b1..6d8a7ad 100644 (file)
@@ -367,6 +367,8 @@ function test_qti_export($tid, $test_title='', $zipfile = null){
        //TODO: wrap around xml now
        $savant->assign('xml_content', $xml);
        $savant->assign('title', htmlspecialchars($row['title'], ENT_QUOTES, 'UTF-8'));
+    $savant->assign('num_takes', $row['num_takes']);
+    $savant->assign('use_cc', $use_cc);
        $xml = $savant->fetch('tests/test_questions/wrapper.tmpl.php');
 
        $xml_filename = 'tests_'.$tid.'.xml';
@@ -554,6 +556,7 @@ function TestQuestionCounter($increment = FALSE) {
 
        /*final public */function exportQTI($row, $encoding, $version) {
                $this->savant->assign('encoding', $encoding);
+        $this->savant->assign('weight', $row['weight']);
                //Convert all row values to html entities
                foreach ($row as $k=>$v){
                        $row[$k] = htmlspecialchars($v, ENT_QUOTES, 'UTF-8');   //not using htmlentities cause it changes some languages falsely.
index 3b5ef7d..bb9d160 100644 (file)
@@ -6,12 +6,14 @@
                                                <fieldlabel>qmd_itemtype</fieldlabel>
                                                <fieldentry>Logical Identifier</fieldentry>
                                        </qtimetadatafield>
-                               </qtimetadata>
-                               <qtimetadata>
                                        <qtimetadatafield>
                                                <fieldlabel>qmd_questiontype</fieldlabel>
                                                <fieldentry>Multiple-choice</fieldentry>
                                        </qtimetadatafield>
+                    <qtimetadatafield>
+                        <fieldlabel>cc_profile</fieldlabel>
+                        <fieldentry>cc.mutliple_choice.v0p1</fieldentry>
+                    </qtimetadatafield>
                                </qtimetadata>
                        </itemmetadata>
                        <presentation>
index 8ce37cc..1e3a32a 100644 (file)
@@ -6,12 +6,18 @@
                                                <fieldlabel>qmd_itemtype</fieldlabel>
                                                <fieldentry>String</fieldentry>
                                        </qtimetadatafield>
-                               </qtimetadata>
-                               <qtimetadata>
                                        <qtimetadatafield>
                                                <fieldlabel>qmd_questiontype</fieldlabel>
                                                <fieldentry>FIB-string</fieldentry>
                                        </qtimetadatafield>
+                    <qtimetadatafield>
+                        <fieldlabel>cc_profile</fieldlabel>
+                        <fieldentry>cc.fib.v0p1</fieldentry>
+                    </qtimetadatafield>
+                    <qtimetadatafield>
+                        <fieldlabel>cc_weighting</fieldlabel>
+                        <fieldentry><?php echo $this->weight; ?></fieldentry>
+                    </qtimetadatafield>
                                </qtimetadata>
                        </itemmetadata>
                        <presentation>
index 7aad2c5..a8754d3 100644 (file)
@@ -1,21 +1,32 @@
 <!-- matching question with partial marks -->
                <item title="Mathcing question" ident="ITEM_<?php echo $this->row['question_id']; ?>">
                        <itemmetadata>
-                               <qmd_itemtype>Matching</qmd_itemtype>
                                <qtimetadata>
                                        <qtimetadatafield>
                                                <fieldlabel>qmd_itemtype</fieldlabel>
                                                <fieldentry>Logical Groups</fieldentry>
                                        </qtimetadatafield>
+                                       <qtimetadatafield>
+                                               <fieldlabel>qmd_questiontype</fieldlabel>
+                                               <fieldentry>Drag-and-drop</fieldentry>
+                                       </qtimetadatafield>
+                    <qtimetadatafield>
+                        <fieldlabel>cc_profile</fieldlabel>
+                        <fieldentry>cc.pattern_match.v0p1</fieldentry>
+                    </qtimetadatafield>
+                    <qtimetadatafield>
+                        <fieldlabel>cc_weighting</fieldlabel>
+                        <fieldentry><?php echo $this->weight; ?></fieldentry>
+                    </qtimetadatafield>
                                </qtimetadata>
                        </itemmetadata>
-                       <presentation>                          
+                       <presentation>
                                <flow>
                                        <material>
                                                <mattext texttype="text/html"><?php echo $this->row['question']; ?></mattext>
                                        </material>
                                        <?php for ($i=0; $i < $this->num_choices; $i++): ?>             
-                                       <response_grp ident="RESPONSE-<?php echo md5($this->row['question_id'].$i); ?>" rcardinality="Multiple">
+                                       <response_lid ident="RESPONSE-<?php echo md5($this->row['question_id'].$i); ?>" rcardinality="Multiple">
                                                <material>
                                                        <mattext texttype="text/html"><?php echo $this->row['choice_'.$i]; ?></mattext>
                                                </material>
                                                        </response_label>
                                                <?php endfor; ?>
                                                </render_choice>
-                                       </response_grp>
+                                       </response_lid>
                                        <?php endfor; ?>
                                </flow>
                        </presentation>
 
-
                        <resprocessing>
                                <outcomes>
-                                       <decvar/>
+                                       <decvar varname="SCORE" />
                                </outcomes>
                        <?php for ($i=0; $i < $this->num_choices; $i++): ?>
                                <?php if ($this->row['answer_'.$i] > -1): ?>
@@ -46,7 +56,7 @@
                                        <conditionvar>                                          
                                                <varequal respident="RESPONSE-<?php echo md5($this->row['question_id'].$i); ?>">Option<?php echo $this->row['answer_'.$i]; ?></varequal>
                                        </conditionvar>
-                                       <setvar varname="Respondus_Correct" action="Add"><?php echo (isset($this->row['weight']))?$this->row['weight']:1; ?></setvar>
+                                       <setvar varname="Respondus_Correct"><?php echo (isset($this->row['weight']))?$this->row['weight']:1; ?></setvar>
                                </respcondition>
                                <?php endif; ?>
                        <?php endfor; ?>
index 32c1a4f..fc0ddfa 100644 (file)
@@ -6,12 +6,18 @@
                                                <fieldlabel>qmd_itemtype</fieldlabel>
                                                <fieldentry>Logical Identifier</fieldentry>
                                        </qtimetadatafield>
-                               </qtimetadata>
-                               <qtimetadata>
-                                       <qtimetadatafield>
-                                               <fieldlabel>qmd_questiontype</fieldlabel>
-                                               <fieldentry>Multiple-response</fieldentry>
-                                       </qtimetadatafield>
+                       <qtimetadatafield>
+                        <fieldlabel>qmd_questiontype</fieldlabel>
+                        <fieldentry>Multiple-response</fieldentry>
+                    </qtimetadatafield>
+                    <qtimetadatafield>
+                        <fieldlabel>cc_profile</fieldlabel>
+                        <fieldentry>cc.mutliple_response.v0p1</fieldentry>
+                    </qtimetadatafield>
+                    <qtimetadatafield>
+                        <fieldlabel>cc_weighting</fieldlabel>
+                        <fieldentry><?php echo $this->weight; ?></fieldentry>
+                    </qtimetadatafield>
                                </qtimetadata>
                        </itemmetadata>
                        <presentation>
@@ -36,7 +42,7 @@
                        </presentation>
                        <resprocessing>
                                <outcomes>
-                                       <decvar/>
+                                       <decvar varname="SCORE" />
                                </outcomes>
                        <?php for ($i=0; $i < $this->num_choices; $i++): ?>
                                <?php if ($this->row['answer_'.$i]): ?>
@@ -44,7 +50,7 @@
                                        <conditionvar>                                          
                                                <varequal respident="RESPONSE<?php echo $this->row['question_id']; ?>">Choice<?php echo $i; ?></varequal>
                                        </conditionvar>
-                                       <setvar varname="Respondus_Correct" action="Add"><?php echo (isset($this->row['weight']))?$this->row['weight']:1; ?></setvar>
+                                       <setvar varname="Respondus_Correct"><?php echo (isset($this->row['weight']))?$this->row['weight']:1; ?></setvar>
                                </respcondition>
                                <?php endif; ?>
                        <?php endfor; ?>
index 4c4c473..dae99bd 100644 (file)
@@ -6,12 +6,18 @@
                                                <fieldlabel>qmd_itemtype</fieldlabel>
                                                <fieldentry>Logical Identifier</fieldentry>
                                        </qtimetadatafield>
-                               </qtimetadata>
-                               <qtimetadata>
                                        <qtimetadatafield>
                                                <fieldlabel>qmd_questiontype</fieldlabel>
                                                <fieldentry>Multiple-choice</fieldentry>
                                        </qtimetadatafield>
+                    <qtimetadatafield>
+                        <fieldlabel>cc_profile</fieldlabel>
+                        <fieldentry>cc.mutliple_choice.v0p1</fieldentry>
+                    </qtimetadatafield>
+                    <qtimetadatafield>
+                        <fieldlabel>cc_weighting</fieldlabel>
+                        <fieldentry><?php echo $this->weight; ?></fieldentry>
+                    </qtimetadatafield>
                                </qtimetadata>
                        </itemmetadata>
                        <presentation>
@@ -36,7 +42,7 @@
                        </presentation>
                        <resprocessing>
                                <outcomes>
-                                       <decvar/>
+                                       <decvar varname="SCORE" />
                                </outcomes>
                                <?php for ($i=0; $i < $this->num_choices; $i++): ?>
                                        <?php if ($this->row['answer_'.$i]): ?>
index 4eb43c8..5ec693e 100644 (file)
                        </presentation>
                        <resprocessing>
                                <outcomes>
-                                       <decvar/>
+                                       <decvar varname="SCORE" />
                                </outcomes>
                                <?php for ($i=0; $i < $this->num_choices; $i++): ?>
                                <respcondition title="CorrectResponse">
                                        <conditionvar>                                  
                                                <varequal respident="RESPONSE<?php echo $this->row['question_id']; ?>">Choice<?php echo $i; ?></varequal>
                                        </conditionvar>
-                                       <setvar varname="Respondus_Correct" action="Add"><?php echo (isset($this->row['weight']))?$this->row['weight']/$this->num_choices:1; ?></setvar>
+                                       <setvar varname="Respondus_Correct"><?php echo (isset($this->row['weight']))?$this->row['weight']/$this->num_choices:1; ?></setvar>
                                </respcondition>
                                <?php endfor; ?>
                        </resprocessing>
index 329f87b..a827210 100644 (file)
@@ -6,12 +6,18 @@
                                                <fieldlabel>qmd_itemtype</fieldlabel>
                                                <fieldentry>Logical Identifier</fieldentry>
                                        </qtimetadatafield>
-                               </qtimetadata>
-                               <qtimetadata>
-                                       <qtimetadatafield>
+                    <qtimetadatafield>
                                                <fieldlabel>qmd_questiontype</fieldlabel>
                                                <fieldentry>True/false</fieldentry>
                                        </qtimetadatafield>
+                    <qtimetadatafield>
+                                               <fieldlabel>cc_profile</fieldlabel>
+                                               <fieldentry>cc.true_false.v0p1</fieldentry>
+                                       </qtimetadatafield>
+                    <qtimetadatafield>
+                                               <fieldlabel>cc_weighting</fieldlabel>
+                                               <fieldentry><?php echo $this->weight; ?></fieldentry>
+                                       </qtimetadatafield>
                                </qtimetadata>
                        </itemmetadata>
                        <presentation>
@@ -41,7 +47,7 @@
                        </presentation>
                        <resprocessing>
                                <outcomes>
-                                       <decvar/>
+                                       <decvar varname="SCORE" />
                                </outcomes>
                                <respcondition title="CorrectResponse">
                                        <conditionvar>
index 50228b5..668875b 100644 (file)
@@ -1,15 +1,63 @@
 <<?php echo '?'; ?>xml version="1.0" encoding="<?php echo $this->encoding; ?>"<?php echo '?'; ?>>
 
-<questestinterop 
-       xmlns="http://www.imsglobal.org/xsd/ims_qtiasiv1p2"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<questestinterop  
+  xmlns="http://www.imsglobal.org/xsd/ims_qtiasiv1p2"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+  xsi:schemaLocation="http://www.imsglobal.org/xsd/ims_qtiasiv1p2 http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_4/ims_qtiasiv1p2_localised.xsd"
 >
        <assessment title="<?php echo $this->title; ?>" ident="<?php echo md5($this->tid); ?>">
+        <?php 
+            /* If this is Common Cartridge export, add these metadatas
+             * Based on the IMSCC 1.0 specification
+             * http://www.imsglobal.org/cc/ccv1p0/imscc_profilev1p0.html
+             * Check Section 4.9 QTI
+             */
+        if ($this->use_cc):
+            $this->num_takes = intval($this->num_takes);
+            $this->num_takes = ($this->num_takes==0)?'unlimited':$this->num_takes;
+        ?>
+        <qtimetadata>
+                <qtimetadatafield>
+                    <fieldlabel>cc_profile</fieldlabel>
+                    <fieldentry>cc.exam.v0p1</fieldentry>
+                </qtimetadatafield>
+                <qtimetadatafield>
+                    <fieldlabel>qmd_assessmenttype</fieldlabel>
+                    <fieldentry>Examination</fieldentry>
+                </qtimetadatafield>
+                <qtimetadatafield>
+                    <fieldlabel>qmd_scoretype</fieldlabel>
+                    <fieldentry>Percentage</fieldentry>
+                </qtimetadatafield>
+                <qtimetadatafield>
+                    <fieldlabel>qmd_feedbackpermitted</fieldlabel>
+                    <fieldentry>No</fieldentry>
+                </qtimetadatafield>
+                <qtimetadatafield>
+                    <fieldlabel>qmd_hintspermitted</fieldlabel>
+                    <fieldentry>Yes</fieldentry>
+                </qtimetadatafield>
+                <qtimetadatafield>
+                    <fieldlabel>qmd_solutionspermitted</fieldlabel>
+                    <fieldentry>Yes</fieldentry>
+                </qtimetadatafield>
+                <qtimetadatafield>
+                    <fieldlabel>qmd_timelimit</fieldlabel>
+                    <fieldentry>120</fieldentry>
+                </qtimetadatafield>
+                <qtimetadatafield>
+                    <fieldlabel>cc_allow_late_submission</fieldlabel>
+                    <fieldentry>No</fieldentry>
+                </qtimetadatafield>
+                <qtimetadatafield>
+                    <fieldlabel>cc_maxattempts</fieldlabel>
+                    <fieldentry><?php echo $this->num_takes; ?></fieldentry>
+                </qtimetadatafield>
+        </qtimetadata>
+        <?php endif; ?>
+        
                <section ident="ATUTOR-<?php echo $this->row['question_id']; ?>" title="<?php echo $this->title; ?>">
-
                <?php echo $this->xml_content; ?>
-
                </section>
        </assessment>
-
 </questestinterop>