Skip to content
Permalink
Browse files

MDL-45719 mod_lti - Pass language strings to inline JS to allow for e…

…scaping
  • Loading branch information...
Michael de Raadt
Michael de Raadt committed Jun 5, 2014
1 parent 1132d30 commit ae527646a1779c90958a356d203d76175cd8ed5b
Showing with 15 additions and 8 deletions.
  1. +15 −8 mod/lti/settings.php
@@ -59,10 +59,17 @@
$active = get_string('active', 'lti');
$pending = get_string('pending', 'lti');
$rejected = get_string('rejected', 'lti');
$typename = get_string('typename', 'lti');
$baseurl = get_string('baseurl', 'lti');
$action = get_string('action', 'lti');
$createdon = get_string('createdon', 'lti');
// Gather strings used for labels in the inline JS.
$PAGE->requires->strings_for_js(
array(
'typename',
'baseurl',
'action',
'createdon'
),
'mod_lti'
);
$types = lti_filter_get_types(get_site()->id);
@@ -142,10 +149,10 @@
var dataSource = new Y.YUI2.util.DataSource(lti_tools);
var configuredColumns = [
{key:'name', label:'$typename', sortable:true},
{key:'baseURL', label:'$baseurl', sortable:true},
{key:'timecreated', label:'$createdon', sortable:true},
{key:'action', label:'$action'}
{key:'name', label: M.util.get_string('typename', 'mod_lti'), sortable: true},
{key:'baseURL', label: M.util.get_string('baseurl', 'mod_lti'), sortable: true},
{key:'timecreated', label: M.util.get_string('createdon', 'mod_lti'), sortable: true},
{key:'action', label: M.util.get_string('action', 'mod_lti')}
];
dataSource.responseType = Y.YUI2.util.DataSource.TYPE_HTMLTABLE;

0 comments on commit ae52764

Please sign in to comment.
You can’t perform that action at this time.