Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renamed plugin from basiclti to blti

  • Loading branch information...
commit a64b29cf9d6d3bf77028497f8828998bebb40f32 1 parent b7e436b
@scriby scriby authored
Showing with 524 additions and 703 deletions.
  1. +0 −241 mod/basiclti/db/upgrade.php
  2. +0 −29 mod/basiclti/styles.css
  3. 0  mod/{basiclti → blti}/OAuth.php
  4. 0  mod/{basiclti → blti}/TODO.txt
  5. +1 −1  mod/{basiclti → blti}/TrivialStore.php
  6. +10 −10 ...le2/backup_basiclti_activity_task.class.php → blti/backup/moodle2/backup_blti_activity_task.class.php}
  7. +7 −7 mod/{basiclti/backup/moodle2/backup_basiclti_stepslib.php → blti/backup/moodle2/backup_blti_stepslib.php}
  8. +11 −11 ...2/restore_basiclti_activity_task.class.php → blti/backup/moodle2/restore_blti_activity_task.class.php}
  9. +9 −9 ...basiclti/backup/moodle2/restore_basiclti_stepslib.php → blti/backup/moodle2/restore_blti_stepslib.php}
  10. +1 −1  mod/{basiclti → blti}/basiclti.js
  11. +5 −5 mod/{basiclti → blti}/db/access.php
  12. +4 −15 mod/{basiclti → blti}/db/install.xml
  13. 0  mod/{basiclti → blti}/db/log.php
  14. +72 −0 mod/blti/db/upgrade.php
  15. +59 −59 mod/{basiclti → blti}/edit_form.php
  16. +7 −7 mod/{basiclti → blti}/index.php
  17. +2 −1  mod/{basiclti/lang/en/basiclti.php → blti/lang/en/blti.php}
  18. 0  mod/{basiclti → blti}/lang/en/help/basiclti/index.html
  19. 0  mod/{basiclti → blti}/lang/en/help/basiclti/mods.html
  20. +8 −8 mod/{basiclti → blti}/launch.php
  21. +77 −77 mod/{basiclti → blti}/lib.php
  22. +4 −4 mod/{basiclti → blti}/localadminlib.php
  23. +60 −60 mod/{basiclti → blti}/locallib.php
  24. +72 −72 mod/{basiclti → blti}/mod_form.php
  25. 0  mod/{basiclti → blti}/pix/icon.gif
  26. +15 −15 mod/{basiclti → blti}/service.php
  27. +12 −12 mod/{basiclti → blti}/settings.php
  28. +4 −4 mod/{basiclti → blti}/simpletest/testlocallib.php
  29. +29 −0 mod/blti/styles.css
  30. +12 −12 mod/{basiclti → blti}/submissions.php
  31. +30 −30 mod/{basiclti → blti}/typessettings.php
  32. +1 −1  mod/{basiclti → blti}/version.php
  33. +12 −12 mod/{basiclti → blti}/view.php
View
241 mod/basiclti/db/upgrade.php
@@ -1,241 +0,0 @@
-<?php
-// This file is part of BasicLTI4Moodle
-//
-// BasicLTI4Moodle is an IMS BasicLTI (Basic Learning Tools for Interoperability)
-// consumer for Moodle 1.9 and Moodle 2.0. BasicLTI is a IMS Standard that allows web
-// based learning tools to be easily integrated in LMS as native ones. The IMS BasicLTI
-// specification is part of the IMS standard Common Cartridge 1.1 Sakai and other main LMS
-// are already supporting or going to support BasicLTI. This project Implements the consumer
-// for Moodle. Moodle is a Free Open source Learning Management System by Martin Dougiamas.
-// BasicLTI4Moodle is a project iniciated and leaded by Ludo(Marc Alier) and Jordi Piguillem
-// at the GESSI research group at UPC.
-// SimpleLTI consumer for Moodle is an implementation of the early specification of LTI
-// by Charles Severance (Dr Chuck) htp://dr-chuck.com , developed by Jordi Piguillem in a
-// Google Summer of Code 2008 project co-mentored by Charles Severance and Marc Alier.
-//
-// BasicLTI4Moodle is copyright 2009 by Marc Alier Forment, Jordi Piguillem and Nikolas Galanis
-// of the Universitat Politecnica de Catalunya http://www.upc.edu
-// Contact info: Marc Alier Forment granludo @ gmail.com or marc.alier @ upc.edu
-//
-// Moodle 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, either version 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle 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 Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * This file keeps track of upgrades to the basiclti module
- *
- * @package basiclti
- * @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
- * marc.alier@upc.edu
- * @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
- *
- * @author Marc Alier
- * @author Jordi Piguillem
- * @author Nikolas Galanis
- *
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-
-/**
- * xmldb_basiclti_upgrade is the function that upgrades Moodle's
- * database when is needed
- *
- * This function is automaticly called when version number in
- * version.php changes.
- *
- * @param int $oldversion New old version number.
- *
- * @return boolean
- */
-
-function xmldb_basiclti_upgrade($oldversion=0) {
-
- global $DB;
-
- $dbman = $DB->get_manager();
- $result = true;
-
- if ($result && $oldversion < 2008090201) {
-
- $table = new xmldb_table('basiclti_types');
- $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null, null);
- $table->add_field('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null);
-
- $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
-
- upgrade_mod_savepoint($result, 2008090201, 'basiclti_types');
-
- $table = new xmldb_table('basiclti_types_config');
- $table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null, null);
- $table->add_field('typeid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null);
- $table->add_field('name', XMLDB_TYPE_CHAR, '100', XMLDB_NOTNULL, null, null, null, null);
- $table->add_field('value', XMLDB_TYPE_CHAR, '255', XMLDB_NOTNULL, null, null, null, null);
-
- $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
-
- upgrade_mod_savepoint($result, 2008090201, 'basiclti_types_config');
-
- $table = new xmldb_table('basiclti');
- $field = new xmldb_field('typeid');
-
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, null);
- $dbman->add_field($table, $field);
- }
- upgrade_mod_savepoint($result, 2008090201, 'basiclti');
- }
-
- if ($result && $oldversion < 2008091201) {
- $table = new xmldb_table('basiclti_types');
- $field = new xmldb_field('rawname');
-
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_CHAR, '100', null, null, null, null, null);
- $dbman->add_field($table, $field);
- }
-
- upgrade_mod_savepoint($result, 2008091202, 'basiclti_types');
- }
-
- if ($result && $oldversion < 2011011200) {
- $table = new xmldb_table('basiclti');
-
- $field = new xmldb_field('acceptgrades');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', null);
- $result = $result && $dbman->add_field($table, $field);
- }
- $field = new xmldb_field('instructorchoiceacceptgrades');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', null);
- $result = $result && $dbman->add_field($table, $field);
- }
- $field = new xmldb_field('allowroster');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', null);
- $result = $result && $dbman->add_field($table, $field);
- }
- $field = new xmldb_field('instructorchoiceallowroster');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', null);
- $result = $result && $dbman->add_field($table, $field);
- }
- $field = new xmldb_field('allowsetting');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', null);
- $result = $result && $dbman->add_field($table, $field);
- }
- $field = new xmldb_field('instructorchoiceallowsetting');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', null);
- $result = $result && $dbman->add_field($table, $field);
- }
- $field = new xmldb_field('setting');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_CHAR, '8192', null, null, null, '', null);
- $result = $result && $dbman->add_field($table, $field);
- }
-
- $field = new xmldb_field('placementsecret');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_CHAR, '1024', null, null, null, '', null);
- $result = $result && $dbman->add_field($table, $field);
- }
-
- $field = new xmldb_field('timeplacementsecret');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', null);
- $result = $result && $dbman->add_field($table, $field);
- }
-
- $field = new xmldb_field('oldplacementsecret');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_CHAR, '1024', null, null, null, '', null);
- $result = $result && $dbman->add_field($table, $field);
- }
-
- upgrade_mod_savepoint(true, 2011011200, 'basiclti');
- }
-
- if ($result && $oldversion < 2011011304) {
- $table = new xmldb_table('basiclti');
- $field = new xmldb_field('grade');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '100', null);
- $result = $result && $dbman->add_field($table, $field);
- }
-
- upgrade_mod_savepoint(true, 2011011304, 'basiclti');
- }
-
- if ($result && $oldversion < 2011052600) {
- $table = new xmldb_table('basiclti');
-
- $field = new xmldb_field('resourcekey');
- if ($dbman->field_exists($table, $field)) {
- $dbman->drop_field($table, $field);
- }
-
- $field = new xmldb_field('password');
- if ($dbman->field_exists($table, $field)) {
- $dbman->drop_field($table, $field);
- }
-
- $field = new xmldb_field('sendname');
- if ($dbman->field_exists($table, $field)) {
- $dbman->drop_field($table, $field);
- }
-
- $field = new xmldb_field('sendemailaddr');
- if ($dbman->field_exists($table, $field)) {
- $dbman->drop_field($table, $field);
- }
-
- $field = new xmldb_field('allowroster');
- if ($dbman->field_exists($table, $field)) {
- $dbman->drop_field($table, $field);
- }
-
- $field = new xmldb_field('allowsetting');
- if ($dbman->field_exists($table, $field)) {
- $dbman->drop_field($table, $field);
- }
-
- $field = new xmldb_field('acceptgrades');
- if ($dbman->field_exists($table, $field)) {
- $dbman->drop_field($table, $field);
- }
-
- $field = new xmldb_field('customparameters');
- if ($dbman->field_exists($table, $field)) {
- $dbman->drop_field($table, $field);
- }
-
- upgrade_mod_savepoint(true, 2011052600, 'basiclti');
- }
-
- if($result && $oldversion < 2011070100) {
- $table = new xmldb_table('basiclti');
-
- $field = new xmldb_field('instructorcustomparameters');
- if (!$dbman->field_exists($table, $field)) {
- $field->set_attributes(XMLDB_TYPE_CHAR, '255', null, null, null, '', null);
- $result = $result && $dbman->add_field($table, $field);
- }
-
- upgrade_mod_savepoint(true, 2011070100, 'basiclti');
- }
-
- return $result;
-}
-
View
29 mod/basiclti/styles.css
@@ -1,29 +0,0 @@
-.path-mod-basiclti .basicltiframe {position: relative;width: 100%;height: 100%;}
-
-/** General Styles **/
-.path-mod-basiclti .userpicture,
-.path-mod-basiclti .picture.user,
-.path-mod-basiclti .picture.teacher {width:35px;height: 35px;vertical-align:top;}
-.path-mod-basiclti .feedback .files,
-.path-mod-basiclti .feedback .grade,
-.path-mod-basiclti .feedback .outcome,
-.path-mod-basiclti .feedback .finalgrade {float: right;}
-.path-mod-basiclti .feedback .disabledfeedback {width: 500px;height: 250px;}
-.path-mod-basiclti .feedback .from {float: left;}
-.path-mod-basiclti .files img {margin-right: 4px;}
-.path-mod-basiclti .files a {white-space:nowrap;}
-.path-mod-basiclti .late {color: red;}
-.path-mod-basiclti .message {text-align: center;}
-
-/** Styles for submissions.php **/
-#page-mod-basiclti-submissions fieldset.felement {margin-left: 16%;}
-#page-mod-basiclti-submissions form#options div {text-align:right;margin-left:auto;margin-right:20px;}
-#page-mod-basiclti-submissions .header .commands {display: inline;}
-#page-mod-basiclti-submissions .picture {width: 35px;}
-#page-mod-basiclti-submissions .fullname,
-#page-mod-basiclti-submissions .timemodified,
-#page-mod-basiclti-submissions .timemarked {text-align: left;}
-#page-mod-basiclti-submissions .submissions .grade,
-#page-mod-basiclti-submissions .submissions .outcome,
-#page-mod-basiclti-submissions .submissions .finalgrade {text-align: right;}
-#page-mod-basiclti-submissions .qgprefs #optiontable {text-align:right;margin-left:auto;}
View
0  mod/basiclti/OAuth.php → mod/blti/OAuth.php
File renamed without changes
View
0  mod/basiclti/TODO.txt → mod/blti/TODO.txt
File renamed without changes
View
2  mod/basiclti/TrivialStore.php → mod/blti/TrivialStore.php
@@ -50,7 +50,7 @@
/**
* This file contains a Trivial memory-based store - no support for tokens
*
- * @package basiclti
+ * @package blti
* @copyright IMS Global Learning Consortium
*
* @author Charles Severance csev@umich.edu
View
20 ...2/backup_basiclti_activity_task.class.php → ...odle2/backup_blti_activity_task.class.php
@@ -32,9 +32,9 @@
/**
- * This file contains the basiclti module backup class
+ * This file contains the blti module backup class
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -46,13 +46,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once($CFG->dirroot . '/mod/basiclti/backup/moodle2/backup_basiclti_stepslib.php');
+require_once($CFG->dirroot . '/mod/blti/backup/moodle2/backup_blti_stepslib.php');
/**
- * basiclti backup task that provides all the settings and steps to perform one
+ * blti backup task that provides all the settings and steps to perform one
* complete backup of the module
*/
-class backup_basiclti_activity_task extends backup_activity_task {
+class backup_blti_activity_task extends backup_activity_task {
/**
* Define (add) particular settings this activity can have
@@ -66,7 +66,7 @@ protected function define_my_settings() {
*/
protected function define_my_steps() {
// Choice only has one structure step
- $this->add_step(new backup_basiclti_activity_structure_step('basiclti_structure', 'basiclti.xml'));
+ $this->add_step(new backup_blti_activity_structure_step('blti_structure', 'blti.xml'));
}
/**
@@ -79,12 +79,12 @@ static public function encode_content_links($content) {
$base = preg_quote($CFG->wwwroot, "/");
// Link to the list of basiclti tools
- $search="/(".$base."\/mod\/basiclti\/index.php\?id\=)([0-9]+)/";
- $content= preg_replace($search, '$@BASICLTIINDEX*$2@$', $content);
+ $search="/(".$base."\/mod\/blti\/index.php\?id\=)([0-9]+)/";
+ $content= preg_replace($search, '$@BLTIINDEX*$2@$', $content);
// Link to basiclti view by moduleid
- $search="/(".$base."\/mod\/basiclti\/view.php\?id\=)([0-9]+)/";
- $content= preg_replace($search, '$@BASICLTIVIEWBYID*$2@$', $content);
+ $search="/(".$base."\/mod\/blti\/view.php\?id\=)([0-9]+)/";
+ $content= preg_replace($search, '$@BLTIVIEWBYID*$2@$', $content);
return $content;
}
View
14 ...ckup/moodle2/backup_basiclti_stepslib.php → ...i/backup/moodle2/backup_blti_stepslib.php
@@ -32,9 +32,9 @@
/**
* This file contains all the backup steps that will be used
- * by the backup_basiclti_activity_task
+ * by the backup_blti_activity_task
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -47,13 +47,13 @@
*/
/**
- * Define all the backup steps that will be used by the backup_basiclti_activity_task
+ * Define all the backup steps that will be used by the backup_blti_activity_task
*/
/**
* Define the complete assignment structure for backup, with file and id annotations
*/
-class backup_basiclti_activity_structure_step extends backup_activity_structure_step {
+class backup_blti_activity_structure_step extends backup_activity_structure_step {
protected function define_structure() {
@@ -61,7 +61,7 @@ protected function define_structure() {
$userinfo = $this->get_setting_value('userinfo');
// Define each element separated
- $basiclti = new backup_nested_element('basiclti', array('id'), array(
+ $basiclti = new backup_nested_element('blti', array('id'), array(
'name', 'intro', 'introformat', 'timecreated', 'timemodified',
'typeid', 'toolurl', 'preferheight', 'instructorchoiccesendname',
'instructorchoicesendemailaddr', 'organizationid',
@@ -73,13 +73,13 @@ protected function define_structure() {
// (none)
// Define sources
- $basiclti->set_source_table('basiclti', array('id' => backup::VAR_ACTIVITYID));
+ $basiclti->set_source_table('blti', array('id' => backup::VAR_ACTIVITYID));
// Define id annotations
// (none)
// Define file annotations
- $basiclti->annotate_files('mod_basiclti', 'intro', null); // This file areas haven't itemid
+ $basiclti->annotate_files('mod_blti', 'intro', null); // This file areas haven't itemid
// Return the root element (basiclti), wrapped into standard activity structure
return $this->prepare_activity_structure($basiclti);
View
22 .../restore_basiclti_activity_task.class.php → ...dle2/restore_blti_activity_task.class.php
@@ -33,7 +33,7 @@
/**
* This file contains the basicLTI module restore class
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -46,13 +46,13 @@
*/
defined('MOODLE_INTERNAL') || die();
-require_once($CFG->dirroot . '/mod/basiclti/backup/moodle2/restore_basiclti_stepslib.php'); // Because it exists (must)
+require_once($CFG->dirroot . '/mod/blti/backup/moodle2/restore_blti_stepslib.php'); // Because it exists (must)
/**
* basiclti restore task that provides all the settings and steps to perform one
* complete restore of the activity
*/
-class restore_basiclti_activity_task extends restore_activity_task {
+class restore_blti_activity_task extends restore_activity_task {
/**
* Define (add) particular settings this activity can have
@@ -66,7 +66,7 @@ protected function define_my_settings() {
*/
protected function define_my_steps() {
// label only has one structure step
- $this->add_step(new restore_basiclti_activity_structure_step('basiclti_structure', 'basiclti.xml'));
+ $this->add_step(new restore_blti_activity_structure_step('blti_structure', 'blti.xml'));
}
/**
@@ -76,7 +76,7 @@ protected function define_my_steps() {
static public function define_decode_contents() {
$contents = array();
- $contents[] = new restore_decode_content('basiclti', array('intro'), 'basiclti');
+ $contents[] = new restore_decode_content('blti', array('intro'), 'blti');
return $contents;
}
@@ -88,8 +88,8 @@ static public function define_decode_contents() {
static public function define_decode_rules() {
$rules = array();
- $rules[] = new restore_decode_rule('BASICLTIVIEWBYID', '/mod/basiclti/view.php?id=$1', 'course_module');
- $rules[] = new restore_decode_rule('BASICLTIINDEX', '/mod/basiclti/index.php?id=$1', 'course');
+ $rules[] = new restore_decode_rule('BLTIVIEWBYID', '/mod/blti/view.php?id=$1', 'course_module');
+ $rules[] = new restore_decode_rule('BLTIINDEX', '/mod/blti/index.php?id=$1', 'course');
return $rules;
@@ -104,9 +104,9 @@ static public function define_decode_rules() {
static public function define_restore_log_rules() {
$rules = array();
- $rules[] = new restore_log_rule('basiclti', 'add', 'view.php?id={course_module}', '{basiclti}');
- $rules[] = new restore_log_rule('basiclti', 'update', 'view.php?id={course_module}', '{basiclti}');
- $rules[] = new restore_log_rule('basiclti', 'view', 'view.php?id={course_module}', '{basiclti}');
+ $rules[] = new restore_log_rule('blti', 'add', 'view.php?id={course_module}', '{blti}');
+ $rules[] = new restore_log_rule('blti', 'update', 'view.php?id={course_module}', '{blti}');
+ $rules[] = new restore_log_rule('blti', 'view', 'view.php?id={course_module}', '{blti}');
return $rules;
}
@@ -124,7 +124,7 @@ static public function define_restore_log_rules() {
static public function define_restore_log_rules_for_course() {
$rules = array();
- $rules[] = new restore_log_rule('basiclti', 'view all', 'index.php?id={course}', null);
+ $rules[] = new restore_log_rule('blti', 'view all', 'index.php?id={course}', null);
return $rules;
}
View
18 ...kup/moodle2/restore_basiclti_stepslib.php → .../backup/moodle2/restore_blti_stepslib.php
@@ -35,7 +35,7 @@
* This file contains all the restore steps that will be used
* by the restore_basiclti_activity_task
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -54,18 +54,18 @@
/**
* Structure step to restore one basiclti activity
*/
-class restore_basiclti_activity_structure_step extends restore_activity_structure_step {
+class restore_blti_activity_structure_step extends restore_activity_structure_step {
protected function define_structure() {
$paths = array();
- $paths[] = new restore_path_element('basiclti', '/activity/basiclti');
+ $paths[] = new restore_path_element('blti', '/activity/blti');
// Return the paths wrapped into standard activity structure
return $this->prepare_activity_structure($paths);
}
- protected function process_basiclti($data) {
+ protected function process_blti($data) {
global $DB;
$data = (object)$data;
@@ -73,7 +73,7 @@ protected function process_basiclti($data) {
$data->course = $this->get_courseid();
// insert the basiclti record
- $newitemid = $DB->insert_record('basiclti', $data);
+ $newitemid = $DB->insert_record('blti', $data);
// immediately after inserting "activity" record, call this
$this->apply_activity_instance($newitemid);
}
@@ -81,9 +81,9 @@ protected function process_basiclti($data) {
protected function after_execute() {
global $DB;
- $basicltis = $DB->get_records('basiclti');
+ $basicltis = $DB->get_records('blti');
foreach ($basicltis as $basiclti) {
- if (!$DB->get_record('basiclti_types_config',
+ if (!$DB->get_record('blti_types_config',
array('typeid' => $basiclti->typeid, 'name' => 'toolurl', 'value' => $basiclti->toolurl))) {
$basiclti->typeid = 0;
@@ -92,10 +92,10 @@ protected function after_execute() {
$basiclti->placementsecret = uniqid('', true);
$basiclti->timeplacementsecret = time();
- $DB->update_record('basiclti', $basiclti);
+ $DB->update_record('blti', $basiclti);
}
// Add basiclti related files, no need to match by itemname (just internally handled context)
- $this->add_related_files('mod_basiclti', 'intro', null);
+ $this->add_related_files('mod_blti', 'intro', null);
}
}
View
2  mod/basiclti/basiclti.js → mod/blti/basiclti.js
@@ -32,7 +32,7 @@
/**
* This file contains a library of javasxript functions for the BasicLTI module
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
View
10 mod/basiclti/db/access.php → mod/blti/db/access.php
@@ -1,6 +1,6 @@
<?php
//
-// Capability definitions for the basicLTI module.
+// Capability definitions for the blti module.
//
// The capabilities are loaded into the database table when the module is
// installed or updated. Whenever the capability definitions are updated,
@@ -28,9 +28,9 @@
// The variable name for the capability definitions array is $capabilities
/**
- * This file contains the capabilities used by the basiclti module
+ * This file contains the capabilities used by the blti module
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -44,7 +44,7 @@
$capabilities = array(
- 'mod/basiclti:view' => array(
+ 'mod/bltii:view' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
@@ -57,7 +57,7 @@
)
),
- 'mod/basiclti:grade' => array(
+ 'mod/blti:grade' => array(
'riskbitmask' => RISK_XSS,
'captype' => 'write',
View
19 mod/basiclti/db/install.xml → mod/blti/db/install.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="mod/basiclti/db" VERSION="20080912" COMMENT="XMLDB file for Moodle mod/basiclti"
+<XMLDB PATH="mod/blti/db" VERSION="20080912" COMMENT="XMLDB file for Moodle mod/blti"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
- <TABLE NAME="basiclti" COMMENT="This table contains Basic LTI activities instances" NEXT="basiclti_filter">
+ <TABLE NAME="blti" COMMENT="This table contains Basic LTI activities instances" NEXT="blti_types">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="course"/>
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Course basiclti activity belongs to" PREVIOUS="id" NEXT="name"/>
@@ -42,19 +42,8 @@
<INDEX NAME="course" UNIQUE="false" FIELDS="course"/>
</INDEXES>
</TABLE>
- <TABLE NAME="basiclti_filter" COMMENT="This table stores trusted servers and it's password" PREVIOUS="basiclti" NEXT="basiclti_types">
- <FIELDS>
- <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="toolurl"/>
- <FIELD NAME="toolurl" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="Server url" PREVIOUS="id" NEXT="password"/>
- <FIELD NAME="password" TYPE="char" LENGTH="32" NOTNULL="true" SEQUENCE="false" COMMENT="Server password" PREVIOUS="toolurl"/>
- </FIELDS>
- <KEYS>
- <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
- </KEYS>
- </TABLE>
-
- <TABLE NAME="basiclti_types" COMMENT="Basic LTI pre-configured activities" PREVIOUS="basiclti_filter" NEXT="basiclti_types_config">
+ <TABLE NAME="blti_types" COMMENT="Basic LTI pre-configured activities" PREVIOUS="blti" NEXT="blti_types_config">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" DEFAULT="basiclti Activity" SEQUENCE="false" COMMENT="Activity name" PREVIOUS="id" NEXT="rawname"/>
@@ -65,7 +54,7 @@
</KEYS>
</TABLE>
- <TABLE NAME="basiclti_types_config" COMMENT="Basic LTI types configuration" PREVIOUS="basiclti_types">
+ <TABLE NAME="blti_types_config" COMMENT="Basic LTI types configuration" PREVIOUS="blti_types">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="typeid"/>
<FIELD NAME="typeid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="Basic LTI type id" PREVIOUS="id" NEXT="name"/>
View
0  mod/basiclti/db/log.php → mod/blti/db/log.php
File renamed without changes
View
72 mod/blti/db/upgrade.php
@@ -0,0 +1,72 @@
+<?php
+// This file is part of BasicLTI4Moodle
+//
+// BasicLTI4Moodle is an IMS BasicLTI (Basic Learning Tools for Interoperability)
+// consumer for Moodle 1.9 and Moodle 2.0. BasicLTI is a IMS Standard that allows web
+// based learning tools to be easily integrated in LMS as native ones. The IMS BasicLTI
+// specification is part of the IMS standard Common Cartridge 1.1 Sakai and other main LMS
+// are already supporting or going to support BasicLTI. This project Implements the consumer
+// for Moodle. Moodle is a Free Open source Learning Management System by Martin Dougiamas.
+// BasicLTI4Moodle is a project iniciated and leaded by Ludo(Marc Alier) and Jordi Piguillem
+// at the GESSI research group at UPC.
+// SimpleLTI consumer for Moodle is an implementation of the early specification of LTI
+// by Charles Severance (Dr Chuck) htp://dr-chuck.com , developed by Jordi Piguillem in a
+// Google Summer of Code 2008 project co-mentored by Charles Severance and Marc Alier.
+//
+// BasicLTI4Moodle is copyright 2009 by Marc Alier Forment, Jordi Piguillem and Nikolas Galanis
+// of the Universitat Politecnica de Catalunya http://www.upc.edu
+// Contact info: Marc Alier Forment granludo @ gmail.com or marc.alier @ upc.edu
+//
+// Moodle 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, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle 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 Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * This file keeps track of upgrades to the basiclti module
+ *
+ * @package blti
+ * @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
+ * marc.alier@upc.edu
+ * @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
+ *
+ * @author Marc Alier
+ * @author Jordi Piguillem
+ * @author Nikolas Galanis
+ *
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * xmldb_blti_upgrade is the function that upgrades Moodle's
+ * database when is needed
+ *
+ * This function is automaticly called when version number in
+ * version.php changes.
+ *
+ * @param int $oldversion New old version number.
+ *
+ * @return boolean
+ */
+
+function xmldb_blti_upgrade($oldversion=0) {
+
+ global $DB;
+
+ $dbman = $DB->get_manager();
+ $result = true;
+
+
+
+ return $result;
+}
+
View
118 mod/basiclti/edit_form.php → mod/blti/edit_form.php
@@ -33,7 +33,7 @@
/**
* This file defines de main basiclti configuration form
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -50,7 +50,7 @@
require_once($CFG->libdir.'/formslib.php');
-class mod_basiclti_edit_types_form extends moodleform{
+class mod_blti_edit_types_form extends moodleform{
function definition() {
$mform =& $this->_form;
@@ -59,161 +59,161 @@ function definition() {
// Add basiclti elements
$mform->addElement('header', 'setup', get_string('modstandardels', 'form'));
- $mform->addElement('text', 'lti_typename', get_string('typename', 'basiclti'));
+ $mform->addElement('text', 'lti_typename', get_string('typename', 'blti'));
$mform->setType('lti_typename', PARAM_INT);
-// $mform->addHelpButton('lti_typename', 'typename','basiclti');
+// $mform->addHelpButton('lti_typename', 'typename','blti');
$mform->addRule('lti_typename', null, 'required', null, 'client');
$regex = '/^(http|https):\/\/([a-z0-9-]\.+)*/i';
- $mform->addElement('text', 'lti_toolurl', get_string('toolurl', 'basiclti'), array('size'=>'64'));
+ $mform->addElement('text', 'lti_toolurl', get_string('toolurl', 'blti'), array('size'=>'64'));
$mform->setType('lti_toolurl', PARAM_TEXT);
-// $mform->addHelpButton('lti_toolurl', 'toolurl', 'basiclti');
- $mform->addRule('lti_toolurl', get_string('validurl', 'basiclti'), 'regex', $regex, 'client');
+// $mform->addHelpButton('lti_toolurl', 'toolurl', 'blti');
+ $mform->addRule('lti_toolurl', get_string('validurl', 'blti'), 'regex', $regex, 'client');
$mform->addRule('lti_toolurl', null, 'required', null, 'client');
- $mform->addElement('text', 'lti_resourcekey', get_string('resourcekey', 'basiclti'));
+ $mform->addElement('text', 'lti_resourcekey', get_string('resourcekey', 'blti'));
$mform->setType('lti_resourcekey', PARAM_TEXT);
- $mform->addElement('passwordunmask', 'lti_password', get_string('password', 'basiclti'));
+ $mform->addElement('passwordunmask', 'lti_password', get_string('password', 'blti'));
$mform->setType('lti_password', PARAM_TEXT);
//-------------------------------------------------------------------------------
// Add size parameters
- $mform->addElement('header', 'size', get_string('size', 'basiclti'));
+ $mform->addElement('header', 'size', get_string('size', 'blti'));
- $mform->addElement('text', 'lti_preferheight', get_string('preferheight', 'basiclti'));
+ $mform->addElement('text', 'lti_preferheight', get_string('preferheight', 'blti'));
$mform->setType('lti_preferheight', PARAM_INT);
-// $mform->addHelpButton('lti_preferheight', 'preferheight', 'basiclti');
+// $mform->addHelpButton('lti_preferheight', 'preferheight', 'blti');
//-------------------------------------------------------------------------------
// Add privacy preferences fieldset where users choose whether to send their data
- $mform->addElement('header', 'privacy', get_string('privacy', 'basiclti'));
+ $mform->addElement('header', 'privacy', get_string('privacy', 'blti'));
$options=array();
- $options[0] = get_string('never', 'basiclti');
- $options[1] = get_string('always', 'basiclti');
- $options[2] = get_string('delegate', 'basiclti');
+ $options[0] = get_string('never', 'blti');
+ $options[1] = get_string('always', 'blti');
+ $options[2] = get_string('delegate', 'blti');
$defaults=array();
- $defaults[0] = get_string('donot', 'basiclti');
- $defaults[1] = get_string('send', 'basiclti');
+ $defaults[0] = get_string('donot', 'blti');
+ $defaults[1] = get_string('send', 'blti');
- $mform->addElement('select', 'lti_sendname', get_string('sendname', 'basiclti'), $options);
+ $mform->addElement('select', 'lti_sendname', get_string('sendname', 'blti'), $options);
$mform->setDefault('lti_sendname', '0');
-// $mform->addHelpButton('lti_sendname', 'sendname', 'basiclti');
+// $mform->addHelpButton('lti_sendname', 'sendname', 'blti');
- $mform->addElement('select', 'lti_instructorchoicesendname', get_string('setdefault', 'basiclti'), $defaults);
+ $mform->addElement('select', 'lti_instructorchoicesendname', get_string('setdefault', 'blti'), $defaults);
$mform->setDefault('lti_instructorchoicesendname', '0');
$mform->disabledIf('lti_instructorchoicesendname', 'lti_sendname', 'neq', 2);
- $mform->addElement('select', 'lti_sendemailaddr', get_string('sendemailaddr', 'basiclti'), $options);
+ $mform->addElement('select', 'lti_sendemailaddr', get_string('sendemailaddr', 'blti'), $options);
$mform->setDefault('lti_sendemailaddr', '0');
-// $mform->addHelpButton('lti_sendemailaddr', 'sendemailaddr', 'basiclti');
+// $mform->addHelpButton('lti_sendemailaddr', 'sendemailaddr', 'blti');
- $mform->addElement('select', 'lti_instructorchoicesendemailaddr', get_string('setdefault', 'basiclti'), $defaults);
+ $mform->addElement('select', 'lti_instructorchoicesendemailaddr', get_string('setdefault', 'blti'), $defaults);
$mform->setDefault('lti_instructorchoicesendemailaddr', '0');
$mform->disabledIf('lti_instructorchoicesendemailaddr', 'lti_sendemailaddr', 'neq', 2);
//-------------------------------------------------------------------------------
// BLTI Extensions
- $mform->addElement('header', 'extensions', get_string('extensions', 'basiclti'));
+ $mform->addElement('header', 'extensions', get_string('extensions', 'blti'));
$defaults_accept=array();
- $defaults_accept[0] = get_string('donotaccept', 'basiclti');
- $defaults_accept[1] = get_string('accept', 'basiclti');
+ $defaults_accept[0] = get_string('donotaccept', 'blti');
+ $defaults_accept[1] = get_string('accept', 'blti');
$defaults_allow=array();
- $defaults_allow[0] = get_string('donotallow', 'basiclti');
- $defaults_allow[1] = get_string('allow', 'basiclti');
+ $defaults_allow[0] = get_string('donotallow', 'blti');
+ $defaults_allow[1] = get_string('allow', 'blti');
// Add grading preferences fieldset where the tool is allowed to return grades
- $mform->addElement('select', 'lti_acceptgrades', get_string('acceptgrades', 'basiclti'), $options);
+ $mform->addElement('select', 'lti_acceptgrades', get_string('acceptgrades', 'blti'), $options);
$mform->setDefault('lti_acceptgrades', '0');
-// $mform->addHelpButton('lti_acceptgrades', 'acceptgrades', 'basiclti');
+// $mform->addHelpButton('lti_acceptgrades', 'acceptgrades', 'blti');
- $mform->addElement('select', 'lti_instructorchoiceacceptgrades', get_string('setdefault', 'basiclti'), $defaults_accept);
+ $mform->addElement('select', 'lti_instructorchoiceacceptgrades', get_string('setdefault', 'blti'), $defaults_accept);
$mform->setDefault('lti_instructorchoiceacceptgrades', '0');
$mform->disabledIf('lti_instructorchoiceacceptgrades', 'lti_acceptgrades', 'neq', 2);
// Add grading preferences fieldset where the tool is allowed to retrieve rosters
- $mform->addElement('select', 'lti_allowroster', get_string('allowroster', 'basiclti'), $options);
+ $mform->addElement('select', 'lti_allowroster', get_string('allowroster', 'blti'), $options);
$mform->setDefault('lti_allowroster', '0');
-// $mform->addHelpButton('lti_allowroster', 'allowroster', 'basiclti');
+// $mform->addHelpButton('lti_allowroster', 'allowroster', 'blti');
- $mform->addElement('select', 'lti_instructorchoiceallowroster', get_string('setdefault', 'basiclti'), $defaults_allow);
+ $mform->addElement('select', 'lti_instructorchoiceallowroster', get_string('setdefault', 'blti'), $defaults_allow);
$mform->setDefault('lti_instructorchoiceallowroster', '0');
$mform->disabledIf('lti_instructorchoiceallowroster', 'lti_allowroster', 'neq', 2);
// Add grading preferences fieldset where the tool is allowed to update settings
- $mform->addElement('select', 'lti_allowsetting', get_string('allowsetting', 'basiclti'), $options);
+ $mform->addElement('select', 'lti_allowsetting', get_string('allowsetting', 'blti'), $options);
$mform->setDefault('lti_allowsetting', '0');
-// $mform->addHelpButton('lti_allowsetting', 'allowsetting', 'basiclti');
+// $mform->addHelpButton('lti_allowsetting', 'allowsetting', 'blti');
- $mform->addElement('select', 'lti_instructorchoiceallowsetting', get_string('setdefault', 'basiclti'), $defaults_allow);
+ $mform->addElement('select', 'lti_instructorchoiceallowsetting', get_string('setdefault', 'blti'), $defaults_allow);
$mform->setDefault('lti_instructorchoiceallowsetting', '0');
$mform->disabledIf('lti_instructorchoiceallowsetting', 'lti_allowsetting', 'neq', 2);
//-------------------------------------------------------------------------------
// Add custom parameters fieldset
- $mform->addElement('header', 'custom', get_string('custom', 'basiclti'));
+ $mform->addElement('header', 'custom', get_string('custom', 'blti'));
$mform->addElement('textarea', 'lti_customparameters', '', array('rows'=>15, 'cols'=>60));
$mform->setType('lti_customparameters', PARAM_TEXT);
- $mform->addElement('select', 'lti_allowinstructorcustom', get_string('allowinstructorcustom', 'basiclti'), $defaults_allow);
+ $mform->addElement('select', 'lti_allowinstructorcustom', get_string('allowinstructorcustom', 'blti'), $defaults_allow);
$mform->setDefault('lti_allowinstructorcustom', '0');
//-------------------------------------------------------------------------------
// Add setup parameters fieldset
- $mform->addElement('header', 'setupoptions', get_string('setupoptions', 'basiclti'));
+ $mform->addElement('header', 'setupoptions', get_string('setupoptions', 'blti'));
// Adding option to change id that is placed in context_id
$idoptions = array();
- $idoptions[0] = get_string('id', 'basiclti');
- $idoptions[1] = get_string('courseid', 'basiclti');
+ $idoptions[0] = get_string('id', 'blti');
+ $idoptions[1] = get_string('courseid', 'blti');
- $mform->addElement('select', 'lti_moodle_course_field', get_string('moodle_course_field', 'basiclti'), $idoptions);
+ $mform->addElement('select', 'lti_moodle_course_field', get_string('moodle_course_field', 'blti'), $idoptions);
$mform->setDefault('lti_moodle_course_field', '0');
// Added option to allow user to specify if this is a resource or activity type
$classoptions = array();
- $classoptions[0] = get_string('activity', 'basiclti');
- $classoptions[1] = get_string('resource', 'basiclti');
+ $classoptions[0] = get_string('activity', 'blti');
+ $classoptions[1] = get_string('resource', 'blti');
- $mform->addElement('select', 'lti_module_class_type', get_string('module_class_type', 'basiclti'), $classoptions);
+ $mform->addElement('select', 'lti_module_class_type', get_string('module_class_type', 'blti'), $classoptions);
$mform->setDefault('lti_module_class_type', '0');
//-------------------------------------------------------------------------------
// Add organization parameters fieldset
- $mform->addElement('header', 'organization', get_string('organization', 'basiclti'));
+ $mform->addElement('header', 'organization', get_string('organization', 'blti'));
- $mform->addElement('text', 'lti_organizationid', get_string('organizationid', 'basiclti'));
+ $mform->addElement('text', 'lti_organizationid', get_string('organizationid', 'blti'));
$mform->setType('lti_organizationid', PARAM_TEXT);
-// $mform->addHelpButton('lti_organizationid', 'organizationid', 'basiclti');
+// $mform->addHelpButton('lti_organizationid', 'organizationid', 'blti');
- $mform->addElement('text', 'lti_organizationurl', get_string('organizationurl', 'basiclti'));
+ $mform->addElement('text', 'lti_organizationurl', get_string('organizationurl', 'blti'));
$mform->setType('lti_organizationurl', PARAM_TEXT);
-// $mform->addHelpButton('lti_organizationurl', 'organizationurl', 'basiclti');
+// $mform->addHelpButton('lti_organizationurl', 'organizationurl', 'blti');
/* Suppress this for now - Chuck
- $mform->addElement('text', 'lti_organizationdescr', get_string('organizationdescr', 'basiclti'));
+ $mform->addElement('text', 'lti_organizationdescr', get_string('organizationdescr', 'blti'));
$mform->setType('lti_organizationdescr', PARAM_TEXT);
- $mform->addHelpButton('lti_organizationdescr', 'organizationdescr', 'basiclti');
+ $mform->addHelpButton('lti_organizationdescr', 'organizationdescr', 'blti');
*/
//-------------------------------------------------------------------------------
// Add launch parameters fieldset
- $mform->addElement('header', 'launchoptions', get_string('launchoptions', 'basiclti'));
+ $mform->addElement('header', 'launchoptions', get_string('launchoptions', 'blti'));
$launchoptions=array();
- $launchoptions[0] = get_string('launch_in_moodle', 'basiclti');
- $launchoptions[1] = get_string('launch_in_popup', 'basiclti');
+ $launchoptions[0] = get_string('launch_in_moodle', 'blti');
+ $launchoptions[1] = get_string('launch_in_popup', 'blti');
- $mform->addElement('select', 'lti_launchinpopup', get_string('launchinpopup', 'basiclti'), $launchoptions);
+ $mform->addElement('select', 'lti_launchinpopup', get_string('launchinpopup', 'blti'), $launchoptions);
$mform->setDefault('lti_launchinpopup', '0');
-// $mform->addHelpButton('lti_launchinpopup', 'launchinpopup', 'basiclti');
+// $mform->addHelpButton('lti_launchinpopup', 'launchinpopup', 'blti');
//-------------------------------------------------------------------------------
// Add a hidden element to signal a tool fixing operation after a problematic backup - restore process
View
14 mod/basiclti/index.php → mod/blti/index.php
@@ -33,7 +33,7 @@
/**
* This page lists all the instances of basiclti in a particular course
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -45,7 +45,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once("../../config.php");
-require_once($CFG->dirroot.'/mod/basiclti/lib.php');
+require_once($CFG->dirroot.'/mod/blti/lib.php');
$id = required_param('id', PARAM_INT); // course id
@@ -53,25 +53,25 @@
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Course ID is incorrect');
}
-$url = new moodle_url('/mod/basiclti/index.php', array('id'=>$id));
+$url = new moodle_url('/mod/blti/index.php', array('id'=>$id));
$PAGE->set_url($url);
$PAGE->set_pagelayout('incourse');
require_login($course);
-add_to_log($course->id, "basiclti", "view all", "index.php?id=$course->id", "");
+add_to_log($course->id, "blti", "view all", "index.php?id=$course->id", "");
-$pagetitle = strip_tags($course->shortname.': '.get_string("modulenamepluralformatted", "basiclti"));
+$pagetitle = strip_tags($course->shortname.': '.get_string("modulenamepluralformatted", "blti"));
$PAGE->set_title($pagetitle);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
/// Print the main part of the page
-echo $OUTPUT->heading(get_string("modulenamepluralformatted", "basiclti"));
+echo $OUTPUT->heading(get_string("modulenamepluralformatted", "blti"));
/// Get all the appropriate data
-if (! $basicltis = get_all_instances_in_course("basiclti", $course)) {
+if (! $basicltis = get_all_instances_in_course("blti", $course)) {
notice("There are no basicltis", "../../course/view.php?id=$course->id");
die;
}
View
3  mod/basiclti/lang/en/basiclti.php → mod/blti/lang/en/blti.php
@@ -56,6 +56,7 @@
$string['allowroster'] = 'Allow tool access to course roster';
$string['allowsetting'] = 'Allow tool to store 8K of settings in Moodle';
$string['always'] = 'Always';
+$string['blti'] = 'Basic LTI';
$string['basiclti'] = 'Basic LTI';
$string['basiclti_base_string'] = 'Basic LTI OAuth Base String';
$string['basiclti_in_new_window'] = 'Your activity has opened in a new window';
@@ -131,7 +132,7 @@
$string['pagesize'] = 'Submissions shown per page';
$string['password'] = 'Remote Tool Password';
$string['pluginadministration'] = 'Basic LTI administration';
-$string['pluginname'] = 'BasicLTI';
+$string['pluginname'] = 'BLTI';
$string['preferheight'] = 'Preferred Height';
$string['preferwidget'] = 'Prefer Widget Launch';
$string['preferwidth'] = 'Preferred Width';
View
0  ...basiclti/lang/en/help/basiclti/index.html → mod/blti/lang/en/help/basiclti/index.html
File renamed without changes
View
0  mod/basiclti/lang/en/help/basiclti/mods.html → mod/blti/lang/en/help/basiclti/mods.html
File renamed without changes
View
16 mod/basiclti/launch.php → mod/blti/launch.php
@@ -33,7 +33,7 @@
/**
* This file contains all necessary code to view a basiclti activity instance
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -46,8 +46,8 @@
*/
require_once("../../config.php");
-require_once($CFG->dirroot.'/mod/basiclti/lib.php');
-require_once($CFG->dirroot.'/mod/basiclti/locallib.php');
+require_once($CFG->dirroot.'/mod/blti/lib.php');
+require_once($CFG->dirroot.'/mod/blti/locallib.php');
$id = optional_param('id', 0, PARAM_INT); // Course Module ID, or
$object = optional_param('withobject', false, PARAM_BOOL); // Launch BasicLTI in an object
@@ -61,25 +61,25 @@
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Course is misconfigured');
}
- if (! $basiclti = $DB->get_record("basiclti", array("id" => $cm->instance))) {
+ if (! $basiclti = $DB->get_record("blti", array("id" => $cm->instance))) {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Course module is incorrect');
}
} else {
- if (! $basiclti = $DB->get_record("basiclti", array("id" => $a))) {
+ if (! $basiclti = $DB->get_record("blti", array("id" => $a))) {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Course module is incorrect');
}
if (! $course = $DB->get_record("course", array("id" => $basiclti->course))) {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Course is misconfigured');
}
- if (! $cm = get_coursemodule_from_instance("basiclti", $basiclti->id, $course->id)) {
+ if (! $cm = get_coursemodule_from_instance("blti", $basiclti->id, $course->id)) {
throw new moodle_exception('generalexceptionmessage', 'error', '', 'Course Module ID was incorrect');
}
}
require_login($course);
-add_to_log($course->id, "basiclti", "launch", "launch.php?id=$cm->id", "$basiclti->id");
+add_to_log($course->id, "blti", "launch", "launch.php?id=$cm->id", "$basiclti->id");
-basiclti_view($basiclti, $object);
+blti_view($basiclti, $object);
View
154 mod/basiclti/lib.php → mod/blti/lib.php
@@ -34,7 +34,7 @@
* This file contains a library of functions and constants for the
* BasicLTI module
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -48,14 +48,14 @@
defined('MOODLE_INTERNAL') || die;
-require_once($CFG->dirroot.'/mod/basiclti/locallib.php');
+require_once($CFG->dirroot.'/mod/blti/locallib.php');
/**
* List of features supported in URL module
* @param string $feature FEATURE_xx constant for requested feature
* @return mixed True if module supports feature, false if not, null if doesn't know
*/
-function basiclti_supports($feature) {
+function blti_supports($feature) {
switch($feature) {
case FEATURE_GROUPS: return false;
case FEATURE_GROUPINGS: return false;
@@ -79,19 +79,19 @@ function basiclti_supports($feature) {
* @param object $instance An object from the form in mod.html
* @return int The id of the newly inserted basiclti record
**/
-function basiclti_add_instance($basiclti) {
+function blti_add_instance($basiclti) {
global $DB;
$basiclti->timecreated = time();
$basiclti->timemodified = $basiclti->timecreated;
$basiclti->placementsecret = uniqid('', true);
$basiclti->timeplacementsecret = time();
- $id = $DB->insert_record("basiclti", $basiclti);
+ $id = $DB->insert_record("blti", $basiclti);
- $basiclti = $DB->get_record('basiclti', array('id'=>$id));
+ $basiclti = $DB->get_record('blti', array('id'=>$id));
if ($basiclti->instructorchoiceacceptgrades == 1) {
- basiclti_grade_item_update($basiclti);
+ blti_grade_item_update($basiclti);
}
return $id;
@@ -105,13 +105,13 @@ function basiclti_add_instance($basiclti) {
* @param object $instance An object from the form in mod.html
* @return boolean Success/Fail
**/
-function basiclti_update_instance($basiclti) {
+function blti_update_instance($basiclti) {
global $DB;
$basiclti->timemodified = time();
$basiclti->id = $basiclti->instance;
- $basicltirec = $DB->get_record("basiclti", array("id" => $basiclti->id));
+ $basicltirec = $DB->get_record("blti", array("id" => $basiclti->id));
$basiclti->grade = $basicltirec->grade;
if (empty($basiclti->preferwidget)) {
@@ -119,12 +119,12 @@ function basiclti_update_instance($basiclti) {
}
if ($basiclti->instructorchoiceacceptgrades == 1) {
- basiclti_grade_item_update($basiclti);
+ blti_grade_item_update($basiclti);
} else {
- basiclti_grade_item_delete($basiclti);
+ blti_grade_item_delete($basiclti);
}
- return $DB->update_record("basiclti", $basiclti);
+ return $DB->update_record("blti", $basiclti);
}
/**
@@ -135,19 +135,19 @@ function basiclti_update_instance($basiclti) {
* @param int $id Id of the module instance
* @return boolean Success/Failure
**/
-function basiclti_delete_instance($id) {
+function blti_delete_instance($id) {
global $DB;
- if (! $basiclti = $DB->get_record("basiclti", array("id" => $id))) {
+ if (! $basiclti = $DB->get_record("blti", array("id" => $id))) {
return false;
}
$result = true;
# Delete any dependent records here #
- basiclti_grade_item_delete($basiclti);
+ blti_grade_item_delete($basiclti);
- return $DB->delete_records("basiclti", array("id" => $basiclti->id));
+ return $DB->delete_records("blti", array("id" => $basiclti->id));
}
/**
@@ -160,7 +160,7 @@ function basiclti_delete_instance($id) {
* @return null
* @TODO: implement this moodle function (if needed)
**/
-function basiclti_user_outline($course, $user, $mod, $basiclti) {
+function blti_user_outline($course, $user, $mod, $basiclti) {
return $return;
}
@@ -171,7 +171,7 @@ function basiclti_user_outline($course, $user, $mod, $basiclti) {
* @return boolean
* @TODO: implement this moodle function (if needed)
**/
-function basiclti_user_complete($course, $user, $mod, $basiclti) {
+function blti_user_complete($course, $user, $mod, $basiclti) {
return true;
}
@@ -184,7 +184,7 @@ function basiclti_user_complete($course, $user, $mod, $basiclti) {
* @return boolean
* @TODO: implement this moodle function
**/
-function basiclti_print_recent_activity($course, $isteacher, $timestart) {
+function blti_print_recent_activity($course, $isteacher, $timestart) {
return false; // True if anything was printed, otherwise false
}
@@ -196,7 +196,7 @@ function basiclti_print_recent_activity($course, $isteacher, $timestart) {
* @uses $CFG
* @return boolean
**/
-function basiclti_cron () {
+function blti_cron () {
return true;
}
@@ -215,7 +215,7 @@ function basiclti_cron () {
*
* @TODO: implement this moodle function (if needed)
**/
-function basiclti_grades($basicltiid) {
+function blti_grades($basicltiid) {
return null;
}
@@ -230,7 +230,7 @@ function basiclti_grades($basicltiid) {
*
* @TODO: implement this moodle function
**/
-function basiclti_get_participants($basicltiid) {
+function blti_get_participants($basicltiid) {
return false;
}
@@ -245,7 +245,7 @@ function basiclti_get_participants($basicltiid) {
*
* @TODO: implement this moodle function (if needed)
**/
-function basiclti_scale_used ($basicltiid, $scaleid) {
+function blti_scale_used ($basicltiid, $scaleid) {
$return = false;
//$rec = get_record("basiclti","id","$basicltiid","scale","-$scaleid");
@@ -266,10 +266,10 @@ function basiclti_scale_used ($basicltiid, $scaleid) {
* @return boolean True if the scale is used by any basiclti
*
*/
-function basiclti_scale_used_anywhere($scaleid) {
+function blti_scale_used_anywhere($scaleid) {
global $DB;
- if ($scaleid and $DB->record_exists('basiclti', array('grade' => -$scaleid))) {
+ if ($scaleid and $DB->record_exists('blti', array('grade' => -$scaleid))) {
return true;
} else {
return false;
@@ -282,7 +282,7 @@ function basiclti_scale_used_anywhere($scaleid) {
*
* @return boolean true if success, false on error
*/
-function basiclti_install() {
+function blti_install() {
return true;
}
@@ -292,7 +292,7 @@ function basiclti_install() {
*
* @return boolean true if success, false on error
*/
-function basiclti_uninstall() {
+function blti_uninstall() {
return true;
}
@@ -301,10 +301,10 @@ function basiclti_uninstall() {
*
* @return array of basicLTI types
*/
-function basiclti_get_basiclti_types() {
+function blti_get_blti_types() {
global $DB;
- return $DB->get_records('basiclti_types');
+ return $DB->get_records('blti_types');
}
/**
@@ -312,13 +312,13 @@ function basiclti_get_basiclti_types() {
*
* @return array of basicLTI types
*/
-function basiclti_get_types() {
+function blti_get_types() {
$types = array();
- $basicltitypes = basiclti_get_basiclti_types();
+ $basicltitypes = blti_get_blti_types();
if (!empty($basicltitypes)) {
foreach ($basicltitypes as $basicltitype) {
- $ltitypesconfig = basiclti_get_type_config($basicltitype->id);
+ $ltitypesconfig = blti_get_type_config($basicltitype->id);
$modclass = MOD_CLASS_ACTIVITY;
if (isset($ltitypesconfig['module_class_type'])) {
@@ -329,7 +329,7 @@ function basiclti_get_types() {
$type = new object();
$type->modclass = $modclass;
- $type->type = 'basiclti&amp;type='.urlencode($basicltitype->rawname);
+ $type->type = 'blti&amp;type='.urlencode($basicltitype->rawname);
$type->typestr = $basicltitype->name;
$types[] = $type;
}
@@ -385,7 +385,7 @@ function basiclti_get_types() {
* @global object
* @param string $mode Specifies the kind of teacher interaction taking place
*/
-function basiclti_submissions($cm, $course, $basiclti, $mode) {
+function blti_submissions($cm, $course, $basiclti, $mode) {
///The main switch is changed to facilitate
///1) Batch fast grading
///2) Skip to the next one on the popup
@@ -405,33 +405,33 @@ function basiclti_submissions($cm, $course, $basiclti, $mode) {
if (is_null($mailinfo)) {
if (optional_param('sesskey', null, PARAM_BOOL)) {
- set_user_preference('basiclti_mailinfo', $mailinfo);
+ set_user_preference('blti_mailinfo', $mailinfo);
} else {
- $mailinfo = get_user_preferences('basiclti_mailinfo', 0);
+ $mailinfo = get_user_preferences('blti_mailinfo', 0);
}
} else {
- set_user_preference('basiclti_mailinfo', $mailinfo);
+ set_user_preference('blti_mailinfo', $mailinfo);
}
switch ($mode) {
case 'grade': // We are in a main window grading
if ($submission = process_feedback()) {
- basiclti_display_submissions($cm, $course, $basiclti, get_string('changessaved'));
+ blti_display_submissions($cm, $course, $basiclti, get_string('changessaved'));
} else {
- basiclti_display_submissions($cm, $course, $basiclti);
+ blti_display_submissions($cm, $course, $basiclti);
}
break;
case 'single': // We are in a main window displaying one submission
if ($submission = process_feedback()) {
- basiclti_display_submissions($cm, $course, $basiclti, get_string('changessaved'));
+ blti_display_submissions($cm, $course, $basiclti, get_string('changessaved'));
} else {
display_submission();
}
break;
case 'all': // Main window, display everything
- basiclti_display_submissions($cm, $course, $basiclti);
+ blti_display_submissions($cm, $course, $basiclti);
break;
case 'fastgrade':
@@ -449,7 +449,7 @@ function basiclti_submissions($cm, $course, $basiclti, $mode) {
}
if (!$col) {
//both submissioncomment and grade columns collapsed..
- basiclti_display_submissions($cm, $course, $basiclti);
+ blti_display_submissions($cm, $course, $basiclti);
break;
}
@@ -543,7 +543,7 @@ function basiclti_submissions($cm, $course, $basiclti, $mode) {
}
//add to log only if updating
- add_to_log($course->id, 'basiclti', 'update grades',
+ add_to_log($course->id, 'blti', 'update grades',
'submissions.php?id='.$cm->id.'&user='.$USER->id,
$USER->id, $cm->id);
}
@@ -552,7 +552,7 @@ function basiclti_submissions($cm, $course, $basiclti, $mode) {
$message = $OUTPUT->notification(get_string('changessaved'), 'notifysuccess');
- basiclti_display_submissions($cm, $course, $basiclti, $message);
+ blti_display_submissions($cm, $course, $basiclti, $message);
break;
case 'saveandnext':
@@ -595,7 +595,7 @@ function basiclti_submissions($cm, $course, $basiclti, $mode) {
* @param string $message
* @return bool|void
*/
-function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
+function blti_display_submissions($cm, $course, $basiclti, $message='') {
global $CFG, $DB, $OUTPUT, $PAGE;
require_once($CFG->libdir.'/gradelib.php');
@@ -608,18 +608,18 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
$perpage = optional_param('perpage', 10, PARAM_INT);
$perpage = ($perpage <= 0) ? 10 : $perpage;
$filter = optional_param('filter', 0, PARAM_INT);
- set_user_preference('basiclti_perpage', $perpage);
- set_user_preference('basiclti_quickgrade', optional_param('quickgrade', 0, PARAM_BOOL));
- set_user_preference('basiclti_filter', $filter);
+ set_user_preference('blti_perpage', $perpage);
+ set_user_preference('blti_quickgrade', optional_param('quickgrade', 0, PARAM_BOOL));
+ set_user_preference('blti_filter', $filter);
}
/* next we get perpage and quickgrade (allow quick grade) params
* from database
*/
- $perpage = get_user_preferences('basiclti_perpage', 10);
- $quickgrade = get_user_preferences('basiclti_quickgrade', 0);
- $filter = get_user_preferences('basiclti_filter', 0);
- $grading_info = grade_get_grades($course->id, 'mod', 'basiclti', $basiclti->id);
+ $perpage = get_user_preferences('blti_perpage', 10);
+ $quickgrade = get_user_preferences('blti_quickgrade', 0);
+ $filter = get_user_preferences('blti_filter', 0);
+ $grading_info = grade_get_grades($course->id, 'mod', 'blti', $basiclti->id);
if (!empty($CFG->enableoutcomes) and !empty($grading_info->outcomes)) {
$uses_outcomes = true;
@@ -628,10 +628,10 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
}
$page = optional_param('page', 0, PARAM_INT);
- $strsaveallfeedback = get_string('saveallfeedback', 'basiclti');
+ $strsaveallfeedback = get_string('saveallfeedback', 'blti');
$tabindex = 1; //tabindex for quick grading tabbing; Not working for dropdowns yet
- add_to_log($course->id, 'basiclti', 'view submission', 'submissions.php?id='.$cm->id, $basiclti->id, $cm->id);
+ add_to_log($course->id, 'blti', 'view submission', 'submissions.php?id='.$cm->id, $basiclti->id, $cm->id);
$PAGE->set_title(format_string($basiclti->name, true));
$PAGE->set_heading($course->fullname);
@@ -645,7 +645,7 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
/// Print quickgrade form around the table
if ($quickgrade) {
$formattrs = array();
- $formattrs['action'] = new moodle_url('/mod/basiclti/submissions.php');
+ $formattrs['action'] = new moodle_url('/mod/blti/submissions.php');
$formattrs['id'] = 'fastg';
$formattrs['method'] = 'post';
@@ -673,10 +673,10 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
/// find out current groups mode
$groupmode = groups_get_activity_groupmode($cm);
$currentgroup = groups_get_activity_group($cm, true);
- groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/basiclti/submissions.php?id=' . $cm->id);
+ groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/blti/submissions.php?id=' . $cm->id);
/// Get all ppl that are allowed to submit tools
- list($esql, $params) = get_enrolled_sql($context, 'mod/basiclti:view', $currentgroup);
+ list($esql, $params) = get_enrolled_sql($context, 'mod/blti:view', $currentgroup);
$sql = "SELECT u.id FROM {user} u ".
"LEFT JOIN ($esql) eu ON eu.id=u.id ".
@@ -702,8 +702,8 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
$tableheaders = array('',
get_string('fullname'),
get_string('grade'),
- get_string('comment', 'basiclti'),
- get_string('lastmodified').' ('.get_string('submission', 'basiclti').')',
+ get_string('comment', 'blti'),
+ get_string('lastmodified').' ('.get_string('submission', 'blti').')',
get_string('lastmodified').' ('.get_string('grade').')',
get_string('status'),
get_string('finalgrade', 'grades'));
@@ -712,11 +712,11 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
}
require_once($CFG->libdir.'/tablelib.php');
- $table = new flexible_table('mod-basiclti-submissions');
+ $table = new flexible_table('mod-blti-submissions');
$table->define_columns($tablecolumns);
$table->define_headers($tableheaders);
- $table->define_baseurl($CFG->wwwroot.'/mod/basiclti/submissions.php?id='.$cm->id.'&amp;currentgroup='.$currentgroup);
+ $table->define_baseurl($CFG->wwwroot.'/mod/blti/submissions.php?id='.$cm->id.'&amp;currentgroup='.$currentgroup);
$table->sortable(true, 'lastname');//sorted by lastname by default
$table->collapsible(true);
@@ -749,7 +749,7 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
$table->setup();
if (empty($users)) {
- echo $OUTPUT->heading(get_string('noviewusers', 'basiclti'));
+ echo $OUTPUT->heading(get_string('noviewusers', 'blti'));
echo '</div>';
return true;
}
@@ -788,7 +788,7 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
$strgrade = get_string('grade');
$grademenu = make_grades_menu($basiclti->grade);
if ($ausers !== false) {
- $grading_info = grade_get_grades($course->id, 'mod', 'basiclti', $basiclti->id, array_keys($ausers));
+ $grading_info = grade_get_grades($course->id, 'mod', 'blti', $basiclti->id, array_keys($ausers));
$endposition = $offset + $perpage;
$currentposition = 0;
foreach ($ausers as $auser) {
@@ -861,7 +861,7 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
$buttontext = ($auser->status == 1) ? $strupdate : $strgrade;
///No more buttons, we use popups ;-).
- $popup_url = '/mod/basiclti/submissions.php?id='.$cm->id
+ $popup_url = '/mod/blti/submissions.php?id='.$cm->id
. '&amp;userid='.$auser->id.'&amp;mode=single'.'&amp;filter='.$filter.'&amp;offset='.$offset++;
$button = $OUTPUT->action_link($popup_url, $buttontext);
@@ -908,15 +908,15 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
/// Print quickgrade form around the table
if ($quickgrade && $table->started_output) {
$mailinfopref = false;
- if (get_user_preferences('basiclti_mailinfo', 1)) {
+ if (get_user_preferences('blti_mailinfo', 1)) {
$mailinfopref = true;
}
- $emailnotification = html_writer::checkbox('mailinfo', 1, $mailinfopref, get_string('enableemailnotification', 'basiclti'));
+ $emailnotification = html_writer::checkbox('mailinfo', 1, $mailinfopref, get_string('enableemailnotification', 'blti'));
- $emailnotification .= $OUTPUT->help_icon('enableemailnotification', 'basiclti');
+ $emailnotification .= $OUTPUT->help_icon('enableemailnotification', 'blti');
echo html_writer::tag('div', $emailnotification, array('class'=>'emailnotification'));
- $savefeedback = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'fastg', 'value'=>get_string('saveallfeedback', 'basiclti')));
+ $savefeedback = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'fastg', 'value'=>get_string('saveallfeedback', 'blti')));
echo html_writer::tag('div', $savefeedback, array('class'=>'fastgbutton'));
echo html_writer::end_tag('form');
@@ -929,22 +929,22 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
/// Mini form for setting user preference
- $formaction = new moodle_url('/mod/basiclti/submissions.php', array('id'=>$cm->id));
+ $formaction = new moodle_url('/mod/blti/submissions.php', array('id'=>$cm->id));
$mform = new MoodleQuickForm('optionspref', 'post', $formaction, '', array('class'=>'optionspref'));
$mform->addElement('hidden', 'updatepref');
$mform->setDefault('updatepref', 1);
- $mform->addElement('header', 'qgprefs', get_string('optionalsettings', 'basiclti'));
+ $mform->addElement('header', 'qgprefs', get_string('optionalsettings', 'blti'));
// $mform->addElement('select', 'filter', get_string('show'), $filters);
$mform->setDefault('filter', $filter);
- $mform->addElement('text', 'perpage', get_string('pagesize', 'basiclti'), array('size'=>1));
+ $mform->addElement('text', 'perpage', get_string('pagesize', 'blti'), array('size'=>1));
$mform->setDefault('perpage', $perpage);
- $mform->addElement('checkbox', 'quickgrade', get_string('quickgrade', 'basiclti'));
+ $mform->addElement('checkbox', 'quickgrade', get_string('quickgrade', 'blti'));
$mform->setDefault('quickgrade', $quickgrade);
- $mform->addHelpButton('quickgrade', 'quickgrade', 'basiclti');
+ $mform->addHelpButton('quickgrade', 'quickgrade', 'blti');
$mform->addElement('submit', 'savepreferences', get_string('savepreferences'));
@@ -960,7 +960,7 @@ function basiclti_display_submissions($cm, $course, $basiclti, $message='') {
* @param mixed optional array/object of grade(s); 'reset' means reset grades in gradebook
* @return int 0 if ok, error code otherwise
*/
-function basiclti_grade_item_update($basiclti, $grades=null) {
+function blti_grade_item_update($basiclti, $grades=null) {
global $CFG;
require_once($CFG->libdir.'/gradelib.php');
@@ -988,7 +988,7 @@ function basiclti_grade_item_update($basiclti, $grades=null) {
$grades = null;
}
- return grade_update('mod/basiclti', $basiclti->courseid, 'mod', 'basiclti', $basiclti->id, 0, $grades, $params);
+ return grade_update('mod/blti', $basiclti->courseid, 'mod', 'blti', $basiclti->id, 0, $grades, $params);
}
/**
@@ -997,7 +997,7 @@ function basiclti_grade_item_update($basiclti, $grades=null) {
* @param object $basiclti object
* @return object basiclti
*/
-function basiclti_grade_item_delete($basiclti) {
+function blti_grade_item_delete($basiclti) {
global $CFG;
require_once($CFG->libdir.'/gradelib.php');
@@ -1005,6 +1005,6 @@ function basiclti_grade_item_delete($basiclti) {
$basiclti->courseid = $basiclti->course;
}
- return grade_update('mod/basiclti', $basiclti->courseid, 'mod', 'basiclti', $basiclti->id, 0, null, array('deleted'=>1));
+ return grade_update('mod/blti', $basiclti->courseid, 'mod', 'blti', $basiclti->id, 0, null, array('deleted'=>1));
}
View
8 mod/basiclti/localadminlib.php → mod/blti/localadminlib.php
@@ -34,7 +34,7 @@
* This file contains some functions and classes used in Basic LTI
* module administration
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -54,7 +54,7 @@
*
* @TODO: finish doc this class and it's functions
*/
-class admin_setting_basicltimodule_configlink extends admin_setting {
+class admin_setting_bltimodule_configlink extends admin_setting {
/**
* Constructor
@@ -62,7 +62,7 @@ class admin_setting_basicltimodule_configlink extends admin_setting {
* @param string $visiblename localised
* @param string $description long localised info
*/
- function admin_setting_basicltimodule_configlink($name, $visiblename, $description) {
+ function admin_setting_bltimodule_configlink($name, $visiblename, $description) {
parent::__construct($name, $visiblename, $description, '');
}
@@ -78,7 +78,7 @@ function output_html($data, $query='') {
global $CFG;
return format_admin_setting($this, "",
'<div class="defaultsnext" >'.
- '<a href="'.$CFG->wwwroot.'/mod/basiclti/typessettings.php">'.get_string('filterconfig', 'basiclti').'</a>'.
+ '<a href="'.$CFG->wwwroot.'/mod/blti/typessettings.php">'.get_string('filterconfig', 'blti').'</a>'.
'</div>',
$this->description, true, '', null, $query);
}
View
120 mod/basiclti/locallib.php → mod/blti/locallib.php
@@ -33,7 +33,7 @@
/**
* This file contains the library of functions and constants for the basiclti module
*
- * @package basiclti
+ * @package blti
* @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
* marc.alier@upc.edu
* @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
@@ -47,17 +47,17 @@
defined('MOODLE_INTERNAL') || die;
-require_once($CFG->dirroot.'/mod/basiclti/OAuth.php');
+require_once($CFG->dirroot.'/mod/blti/OAuth.php');
/**
* Prints a Basic LTI activity
*
* $param int $basicltiid Basic LTI activity id
*/
-function basiclti_view($instance, $makeobject=false) {
+function blti_view($instance, $makeobject=false) {
global $PAGE;
- $typeconfig = basiclti_get_type_config($instance->typeid);
+ $typeconfig = blti_get_type_config($instance->typeid);
$endpoint = $typeconfig['toolurl'];
$key = $typeconfig['resourcekey'];