-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from oat-sa/release-1.7.1
Release 1.7.1
- Loading branch information
Showing
9 changed files
with
206 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
/** | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; under version 2 | ||
* of the License (non-upgradable). | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2016 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); | ||
* | ||
*/ | ||
|
||
namespace oat\taoLti\actions\traits; | ||
|
||
use \tao_helpers_Request; | ||
use \common_exception_IsAjaxAction; | ||
|
||
trait LtiModuleTrait | ||
{ | ||
/** | ||
* Returns an error page | ||
* | ||
* Ignore the parameter returnLink as LTI session always | ||
* require a way for the consumer to return to his platform | ||
* | ||
* @param string $description error to show | ||
* @param boolean $returnLink | ||
* @see tao_actions_CommonModule::returnError() | ||
* @throws \common_exception_IsAjaxAction | ||
*/ | ||
protected function returnError($description, $returnLink = true) { | ||
if (tao_helpers_Request::isAjax()) { | ||
throw new common_exception_IsAjaxAction(__CLASS__.'::'.__FUNCTION__); | ||
} else { | ||
try { | ||
$launchData = \taoLti_models_classes_LtiService::singleton()->getLtiSession()->getLaunchData(); | ||
$returnUrl = $launchData->getCustomParameter(\taoLti_models_classes_LtiLaunchData::LAUNCH_PRESENTATION_RETURN_URL); | ||
|
||
// In regard of the IMS LTI standard, we have to show a back button that refer to the | ||
// launch_presentation_return_url url param. So we have to retrieve this parameter before trying to start | ||
// the session | ||
$consumerLabel = $launchData->getToolConsumerName(); | ||
if (!is_null($consumerLabel)) { | ||
$this->setData('consumerLabel', $consumerLabel); | ||
} | ||
|
||
if($launchData->hasVariable(\taoLti_models_classes_LtiLaunchData::LAUNCH_PRESENTATION_RETURN_URL)) { | ||
$this->setData('returnUrl', $launchData->getReturnUrl()); | ||
} | ||
} catch (\taoLti_models_classes_LtiException $exception) { | ||
// no Lti Session started | ||
} | ||
if (!empty($description)) { | ||
$this->setData('message', $description); | ||
} | ||
$this->setView('error.tpl', 'taoLti'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; under version 2 | ||
* of the License (non-upgradable). | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2016 (original work) Open Assessment Technologies SA | ||
* | ||
*/ | ||
|
||
namespace oat\taoLti\models\classes; | ||
|
||
use oat\oatbox\service\ConfigurableService; | ||
/** | ||
* Interface containing the Lti Role URIs | ||
*/ | ||
interface LtiRoles | ||
{ | ||
const CONTEXT_LEARNER = 'http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#Learner'; | ||
|
||
const CONTEXT_INSTRUCTOR = 'http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#Instructor'; | ||
|
||
const CONTEXT_TEACHING_ASSISTANT = 'http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#TeachingAssistant'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,53 @@ | ||
<?xml version="1.0"?> | ||
<rdf:RDF | ||
xml:base="http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | ||
xmlns:generis="http://www.tao.lu/Ontologies/generis.rdf#" | ||
xmlns:widget="http://www.tao.lu/datatypes/WidgetDefinitions.rdf#" | ||
xmlns:taolti="http://www.tao.lu/Ontologies/TAOLTI.rdf#" | ||
xml:base="http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | ||
xmlns:generis="http://www.tao.lu/Ontologies/generis.rdf#" | ||
xmlns:widget="http://www.tao.lu/datatypes/WidgetDefinitions.rdf#" | ||
xmlns:taolti="http://www.tao.lu/Ontologies/TAOLTI.rdf#" | ||
> | ||
|
||
<!-- Context roles --> | ||
<rdf:Description rdf:about="http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#Learner"> | ||
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LTIRole"/> | ||
<rdfs:label xml:lang="en-US"><![CDATA[LTI Learner]]></rdfs:label> | ||
<rdfs:comment xml:lang="en-US"><![CDATA[The LTI Context Learner Role]]></rdfs:comment> | ||
<taolti:RoleURN><![CDATA[urn:lti:role:ims/lis/Learner]]></taolti:RoleURN> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LtiBaseRole"/> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#DeliveryRole"/> | ||
<generis:isSystem rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#True"/> | ||
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LTIRole"/> | ||
<rdfs:label xml:lang="en-US"><![CDATA[LTI Learner]]></rdfs:label> | ||
<rdfs:comment xml:lang="en-US"><![CDATA[The LTI Context Learner Role]]></rdfs:comment> | ||
<taolti:RoleURN><![CDATA[urn:lti:role:ims/lis/Learner]]></taolti:RoleURN> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LtiBaseRole"/> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAO.rdf#DeliveryRole"/> | ||
<generis:isSystem rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#True"/> | ||
</rdf:Description> | ||
<rdf:Description rdf:about="http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#Instructor"> | ||
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LTIRole"/> | ||
<rdfs:label xml:lang="en-US"><![CDATA[LTI Instructor]]></rdfs:label> | ||
<rdfs:comment xml:lang="en-US"><![CDATA[The LTI Context Instructor Role]]></rdfs:comment> | ||
<taolti:RoleURN><![CDATA[urn:lti:role:ims/lis/Instructor]]></taolti:RoleURN> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LtiBaseRole"/> | ||
<generis:isSystem rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#True"/> | ||
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LTIRole"/> | ||
<rdfs:label xml:lang="en-US"><![CDATA[LTI Instructor]]></rdfs:label> | ||
<rdfs:comment xml:lang="en-US"><![CDATA[The LTI Context Instructor Role]]></rdfs:comment> | ||
<taolti:RoleURN><![CDATA[urn:lti:role:ims/lis/Instructor]]></taolti:RoleURN> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LtiBaseRole"/> | ||
<generis:isSystem rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#True"/> | ||
</rdf:Description> | ||
<rdf:Description rdf:about="http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#ContentDeveloper"> | ||
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LTIRole"/> | ||
<rdfs:label xml:lang="en-US"><![CDATA[LTI Content Developer]]></rdfs:label> | ||
<rdfs:comment xml:lang="en-US"><![CDATA[The LTI Context Content Developer Role]]></rdfs:comment> | ||
<taolti:RoleURN><![CDATA[urn:lti:role:ims/lis/ContentDeveloper]]></taolti:RoleURN> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LtiBaseRole"/> | ||
<generis:isSystem rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#True"/> | ||
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LTIRole"/> | ||
<rdfs:label xml:lang="en-US"><![CDATA[LTI Content Developer]]></rdfs:label> | ||
<rdfs:comment xml:lang="en-US"><![CDATA[The LTI Context Content Developer Role]]></rdfs:comment> | ||
<taolti:RoleURN><![CDATA[urn:lti:role:ims/lis/ContentDeveloper]]></taolti:RoleURN> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LtiBaseRole"/> | ||
<generis:isSystem rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#True"/> | ||
</rdf:Description> | ||
<rdf:Description rdf:about="http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#Administrator"> | ||
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LTIRole"/> | ||
<rdfs:label xml:lang="en-US"><![CDATA[LTI Administrator]]></rdfs:label> | ||
<rdfs:comment xml:lang="en-US"><![CDATA[The LTI Context Administrator Role]]></rdfs:comment> | ||
<taolti:RoleURN><![CDATA[urn:lti:role:ims/lis/Administrator]]></taolti:RoleURN> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LtiBaseRole"/> | ||
<generis:isSystem rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#True"/> | ||
<rdf:Description rdf:about="http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#TeachingAssistant"> | ||
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LTIRole"/> | ||
<rdfs:label xml:lang="en-US"><![CDATA[LTI Teaching Assistant]]></rdfs:label> | ||
<rdfs:comment xml:lang="en-US"><![CDATA[The LTI Context Teaching Assistant Role]]></rdfs:comment> | ||
<taolti:RoleURN><![CDATA[urn:lti:role:ims/lis/TeachingAssistant]]></taolti:RoleURN> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LtiBaseRole"/> | ||
<generis:isSystem rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#True"/> | ||
</rdf:Description> | ||
<rdf:Description rdf:about="http://www.imsglobal.org/imspurl/lis/v1/vocab/membership#Administrator"> | ||
<rdf:type rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LTIRole"/> | ||
<rdfs:label xml:lang="en-US"><![CDATA[LTI Administrator]]></rdfs:label> | ||
<rdfs:comment xml:lang="en-US"><![CDATA[The LTI Context Administrator Role]]></rdfs:comment> | ||
<taolti:RoleURN><![CDATA[urn:lti:role:ims/lis/Administrator]]></taolti:RoleURN> | ||
<generis:includesRole rdf:resource="http://www.tao.lu/Ontologies/TAOLTI.rdf#LtiBaseRole"/> | ||
<generis:isSystem rdf:resource="http://www.tao.lu/Ontologies/generis.rdf#True"/> | ||
</rdf:Description> | ||
</rdf:RDF> |
Oops, something went wrong.