Skip to content
Browse files

MDL-20534 lti: Replacing <<< strings with normal multi-line strings.

  • Loading branch information...
1 parent a55c361 commit 5de15b83cc41c1f03415db00088b0c0d294556a9 @scriby scriby committed Nov 7, 2011
View
14 mod/lti/grade.php
@@ -87,17 +87,17 @@
$PAGE->requires->yui2_lib('datatable');
-$submissionquery = <<<SQL
+$submissionquery = '
SELECT s.id, u.firstname, u.lastname, u.id AS userid, s.datesubmitted, s.gradepercent
FROM {lti_submission} s
INNER JOIN {user} u ON s.userid = u.id
WHERE s.ltiid = :ltiid
ORDER BY s.datesubmitted DESC
-SQL;
+';
$submissions = $DB->get_records_sql($submissionquery, array('ltiid' => $lti->id));
-$html = <<<HTML
+$html = '
<noscript>
<!-- If javascript is disabled, we need to show the table using CSS.
The table starts out hidden to avoid flickering as it loads -->
@@ -107,7 +107,7 @@
</noscript>
<div id="lti_submissions_table_container" style="display:none">
- <table id='lti_submissions_table'>
+ <table id="lti_submissions_table">
<thead>
<tr>
<th>User</th>
@@ -120,9 +120,9 @@
</tbody>
</table>
</div>
-HTML;
+';
-$rowtemplate = <<<HTML
+$rowtemplate = '
<tr>
<td>
<!--firstname--> <!--lastname-->
@@ -134,7 +134,7 @@
<!--gradepercent-->
</td>
</tr>
-HTML;
+';
$rows = '';
View
18 mod/lti/instructor_edit_tool_type.php
@@ -63,12 +63,12 @@
$json = json_encode($fromdb);
//Output script to update the calling window.
- $script = <<<SCRIPT
- <script type="text/javascript">
+ $script = "
+ <script type=\"text/javascript\">
window.opener.M.mod_lti.editor.updateToolType({$json});
window.close();
</script>
-SCRIPT;
+ ";
echo $script;
die;
@@ -82,23 +82,23 @@
$json = json_encode($fromdb);
//Output script to update the calling window.
- $script = <<<SCRIPT
- <script type="text/javascript">
+ $script = "
+ <script type=\"text/javascript\">
window.opener.M.mod_lti.editor.addToolType({$json});
window.close();
</script>
-SCRIPT;
+ ";
echo $script;
die;
}
} else if (isset($data->cancel)) {
- $script = <<<SCRIPT
- <script type="text/javascript">
+ $script = "
+ <script type=\"text/javascript\">
window.close();
</script>
-SCRIPT;
+ ";
echo $script;
die;
View
157 mod/lti/lang/en/lti.php
@@ -225,32 +225,33 @@
$string['return_to_course'] = 'Click <a href="{$a->link}" target="_top">here</a> to return to the course.';
$string['lti_launch_error'] = 'An error occured when launching the external tool: ';
-$string['lti_launch_error_unsigned_help'] = <<<'HTML'
+$string['lti_launch_error_unsigned_help'] = '
<p>
This error may be a result of a missing consumer key and shared secret for the tool provider.
</p>
<p>
If you have a consumer key and shared secret, you may enter it when editing the external tool instance (make sure advanced options are visible).<br />
Alternatively, you may create a course level tool provider configuration <a href="{$a->course_tool_editor}">here</a>.
</p>
-HTML;
-$string['lti_launch_error_tool_request'] = <<<'HTML'
+';
+
+$string['lti_launch_error_tool_request'] = '
<p>
To submit a request for an administrator to complete the tool configuration, click <a href="{$a->admin_request_url}" target="_top">here</a>.
</p>
-HTML;
+';
-$string['lti_tool_request_added'] = <<<HTML
+$string['lti_tool_request_added'] = '
Tool configuration request successfully submitted. You may need to contact an administrator to complete the tool configuration.
-HTML;
+';
-$string['lti_tool_request_existing'] = <<<HTML
+$string['lti_tool_request_existing'] = '
A tool configuration for the tool domain has already been submitted.
-HTML;
+';
//Instance help
-$string['external_tool_type_help'] = <<<HTML
+$string['external_tool_type_help'] = '
The main purpose of a tool configuration is to set up a secure communication channel between Moodle and the tool provider.
It also provides an opportunity for configuration defaults and setting up additional services provided by the tool.
@@ -288,35 +289,35 @@
<b>Delete</b> - Remove the selected course level tool type.
</li>
</ul>
-HTML;
+';
-$string['launch_url_help'] = <<<HTML
+$string['launch_url_help'] = '
The Launch URL indicates the web address of the External Tool, and may contain additional information, such as the resource to show.
If you are unsure what to enter for the Launch URL, please check with the tool provider for more information.
If you have selected a specific tool type, you may not need to enter a Launch URL. If the tool link is used to just launch
-into the tool provider's system, and not go to a specific resource, this will likely be the case.
-HTML;
+into the tool provider\'s system, and not go to a specific resource, this will likely be the case.
+';
-$string['secure_launch_url_help'] = <<<HTML
+$string['secure_launch_url_help'] = '
Similar to Launch URL, but used instead of the launch url if high security is required. Moodle will use the
secure launch URL instead of the launch URL if the Moodle site is accessed through SSL, or if the tool configuration
is set to always launch through SSL.
The Launch URL may also be set to an https address to force launching through SSL, and this field may be left blank.
-HTML;
+';
-$string['icon_url_help'] = <<<HTML
+$string['icon_url_help'] = '
The icon URL allows the icon that shows up in the course listing for this activity to be modified. Instead of using the default
LTI icon, an icon which conveys the type of activity may be specified.
-HTML;
+'
-$string['secure_icon_url_help'] = <<<HTML
+$string['secure_icon_url_help'] = '
Similar to the icon URL, but used if the user accessing Moodle securely through SSL. The main purpose for this field is to prevent
the browser from warning the user if the underlying page was accessed over SSL, but requesting to show an unsecure image.
-HTML;
+';
-$string['launchinpopup_help'] = <<<HTML
+$string['launchinpopup_help'] = '
The launch container affects the display of the tool when launched from the course. Some launch containers provide more screen
real estate to the tool, and others provide a more integrated feel with the Moodle environemnt.
@@ -337,9 +338,9 @@
It is possible that browsers will prevent the new window from opening.
</li>
</ul>
-HTML;
+';
-$string['resourcekey_help'] = <<<HTML
+$string['resourcekey_help'] = '
For pre-configured tools, it is not necessary to enter a resource key here, as the consumer key will be
provided as part of the configuration process.
@@ -354,9 +355,9 @@
Tools which do not require secure communication from Moodle and do not provide additional services (such as grade reporting)
may not require a resource key.
-HTML;
+';
-$string['password_help'] = <<<HTML
+$string['password_help'] = '
For pre-configured tools, it is not necessary to enter a shared secret here, as the shared secret will be
provided as part of the configuration process.
@@ -368,69 +369,69 @@
Tools which do not require secure communication from Moodle and do not provide additional services (such as grade reporting)
may not require a shared secret.
-HTML;
+';
-$string['custom_help'] = <<<HTML
+$string['custom_help'] = '
Custom parameters are settings used by the tool provider. For example, a custom parameter may be used to display
a specific resource from the provider.
It is safe to leave this field unchanged unless directed by the tool provider.
-HTML;
+';
-$string['share_name_help'] = <<<HTML
+$string['share_name_help'] = '
Specify whether the full name of the user launching the tool should be shared with the tool provider.
-The tool provider may need launchers' names to show meaningful information within the tool.
+The tool provider may need launchers\' names to show meaningful information within the tool.
Note that this setting may be overriden in the tool configuration.
-HTML;
+';
-$string['share_email_help'] = <<<HTML
+$string['share_email_help'] = '
Specify whether the e-mail address of the user launching the tool will be shared with the tool provider.
-The tool provider may need launcher's e-mail addresses to distinguish users with the same name, or send e-mails
+The tool provider may need launcher\'s e-mail addresses to distinguish users with the same name, or send e-mails
to users based on actions within the tool.
Note that this setting may be overriden in the tool configuration.
-HTML;
+';
-$string['accept_grades_help'] = <<<HTML
+$string['accept_grades_help'] = '
Specify whether the tool provider can add, update, read, and delete grades associated only with this external tool instance.
Some tool providers support reporting grades back to Moodle based on actions taken within the tool, creating a more integrated
experience.
Note that this setting may be overriden in the tool configuration.
-HTML;
+';
-$string['share_roster_help'] = <<<HTML
+$string['share_roster_help'] = '
Specify whether the tool can access the list of users enrolled in this course.
Note that this setting may be overriden in the tool configuration.
-HTML;
+';
-$string['display_name_help'] = <<<HTML
-If selected, the activity name (specified above) will display above the tool provider's content.
+$string['display_name_help'] = '
+If selected, the activity name (specified above) will display above the tool provider\'s content.
It is possible that the tool provider may also display the title. This option can prevent the activity title from
being displayed twice.
-The title is never displayed when the tool's launch container is in a new window.
-HTML;
+The title is never displayed when the tool\'s launch container is in a new window.
+';
-$string['display_description_help'] = <<<HTML
-If selected, the activity description (specified above) will display above the tool provider's content.
+$string['display_description_help'] = '
+If selected, the activity description (specified above) will display above the tool provider\'s content.
The description may be used to provide additional instructions for launchers of the tool, but it is not required.
-The description is never displayed when the tool's launch container is in a new window.
-HTML;
+The description is never displayed when the tool\'s launch container is in a new window.
+';
//Admin help
-$string['typename_help'] = <<<HTML
+$string['typename_help'] = '
The tool name is used to identify the tool provider within Moodle. The name entered will be visible
to instructors when adding external tools within courses.
-HTML;
+';
-$string['toolurl_help'] = <<<HTML
+$string['toolurl_help'] = '
The tool base URL is used to match tool launch URLs to the correct tool configuration. Prefxing the URL with http(s) is optional.
Additionally, the base URL is used as the launch URL if a launch URL is not specified in the external tool instance.
@@ -475,9 +476,9 @@
</table>
If two different tool configurations are for the same domain, the most specific match will be used.
-HTML;
+';
-$string['resourcekey_admin_help'] = <<<HTML
+$string['resourcekey_admin_help'] = '
The consumer key can be thought of as a username used to authenticate access to the tool.
It can be used by the tool provider to uniquely identify the Moodle site from which users launch into the tool.
@@ -486,17 +487,17 @@
Tools which do not require secure communication from Moodle and do not provide additional services (such as grade reporting)
may not require a resource key.
-HTML;
+';
-$string['password_admin_help'] = <<<HTML
+$string['password_admin_help'] = '
The shared secret can be thought of as a password used to authenticate access to the tool. It should be provided
along with the consumer key from the tool provider.
Tools which do not require secure communication from Moodle and do not provide additional services (such as grade reporting)
may not require a shared secret.
-HTML;
+';
-$string['show_in_course_help'] = <<<HTML
+$string['show_in_course_help'] = '
If selected, this tool configuration will appear in the "External tool type" dropdown when instructors
configure external tools within courses.
@@ -505,9 +506,9 @@
The only case in which this option should be selected is if the tool configuration is just intended for single sign on.
For example, if all launches to the tool provider just take the user to a landing page instead of to a specific resource.
-HTML;
+';
-$string['default_launch_container_help'] = <<<HTML
+$string['default_launch_container_help'] = '
The launch container affects the display of the tool when launched from the course. Some launch containers provide more screen
real estate to the tool, and others provide a more integrated feel with the Moodle environemnt.
@@ -528,36 +529,36 @@
It is possible that browsers will prevent the new window from opening.
</li>
</ul>
-HTML;
+';
-$string['share_name_admin_help'] = <<<HTML
+$string['share_name_admin_help'] = '
Specify whether the full name of the user launching the tool should be shared with the tool provider.
-The tool provider may need launchers' names to show meaningful information within the tool.
-HTML;
+The tool provider may need launchers\' names to show meaningful information within the tool.
+';
-$string['share_email_admin_help'] = <<<HTML
+$string['share_email_admin_help'] = '
Specify whether the e-mail address of the user launching the tool will be shared with the tool provider.
-The tool provider may need launcher's e-mail addresses to distinguish users with the same name in the UI, or send e-mails
+The tool provider may need launcher\'s e-mail addresses to distinguish users with the same name in the UI, or send e-mails
to users based on actions within the tool.
-HTML;
+';
-$string['accept_grades_admin_help'] = <<<HTML
+$string['accept_grades_admin_help'] = '
Specify whether the tool provider can add, update, read, and delete grades associated with instances of this tool type.
Some tool providers support reporting grades back to Moodle based on actions taken within the tool, creating a more integrated
experience.
-HTML;
+';
-$string['share_roster_admin_help'] = <<<HTML
+$string['share_roster_admin_help'] = '
Specify whether the tool can access the list of users enrolled in courses from which this tool type is launched.
-HTML;
+';
$string['main_admin'] = 'General help';
-$string['main_admin_help'] = <<<HTML
+$string['main_admin_help'] = '
External tools allow Moodle users to seamlessly interact with learning resources hosted remotely. Through a special
launch protocol, the remote tool will have access to some general information about the launching user. For example,
-the institution name, course id, user id, and other information such as the user's name or e-mail address.
+the institution name, course id, user id, and other information such as the user\'s name or e-mail address.
Tool types listed on this page are separated into three categories:
@@ -576,9 +577,9 @@
Moodle instance. Instructors may still use tools from these providers if they have a consumer key and shared secret, or if none is required.
</li>
</ul>
-HTML;
+';
-$string['modulename_help'] = <<<HTML
+$string['modulename_help'] = '
External tools allow Moodle users to interact with learning resources and activities on other web sites. For instance, an
external tool could provide access to a new activity type or learning materials from a publisher.
@@ -601,24 +602,24 @@
between them.
</li>
</ul>
-HTML;
+';
-$string['force_ssl_help'] = <<<HTML
+$string['force_ssl_help'] = '
Selecting this option forces all launches to this tool provider to use SSL.
In addition, all web service requests from the tool provider will use SSL.
If using this option, confirm that this Moodle site and the tool provider support SSL.
-HTML;
+';
-$string['organizationid_help'] = <<<HTML
+$string['organizationid_help'] = '
A unique identifier for this Moodle instance. Typically, the DNS name of the organization is used.
If this field is left blank, the host name of this Moodle site will be used as the default value.
-HTML;
+';
-$string['organizationurl_help'] = <<<HTML
+$string['organizationurl_help'] = '
The base URL of this Moodle instance.
If this field is left blank, a default value will be used based on the site configuration.
-HTML;
+';
View
52 mod/lti/locallib.php
@@ -346,9 +346,9 @@ function lti_get_tool_table($tools, $id) {
}
if (!empty($tools)) {
- $html .= <<<HTML
- <div id="{$id}_container" style="margin-top:.5em;margin-bottom:.5em">
- <table id="{$id}_tools">
+ $html .= "
+ <div id=\"{$id}_container\" style=\"margin-top:.5em;margin-bottom:.5em\">
+ <table id=\"{$id}_tools\">
<thead>
<tr>
<th>$typename</th>
@@ -357,19 +357,19 @@ function lti_get_tool_table($tools, $id) {
<th>$action</th>
</tr>
</thead>
-HTML;
+ ";
foreach ($tools as $type) {
$date = userdate($type->timecreated);
$accept = get_string('accept', 'lti');
$update = get_string('update', 'lti');
$delete = get_string('delete', 'lti');
- $accepthtml = <<<HTML
- <a class="editing_accept" href="{$CFG->wwwroot}/mod/lti/typessettings.php?action=accept&amp;id={$type->id}&amp;sesskey={$USER->sesskey}&amp;tab={$id}" title="{$accept}">
- <img class="iconsmall" alt="{$accept}" src="{$CFG->wwwroot}/pix/t/clear.gif"/>
+ $accepthtml = "
+ <a class=\"editing_accept\" href=\"{$CFG->wwwroot}/mod/lti/typessettings.php?action=accept&amp;id={$type->id}&amp;sesskey={$USER->sesskey}&amp;tab={$id}\" title=\"{$accept}\">
+ <img class=\"iconsmall\" alt=\"{$accept}\" src=\"{$CFG->wwwroot}/pix/t/clear.gif\"/>
</a>
-HTML;
+ ";
$deleteaction = 'delete';
@@ -382,7 +382,7 @@ function lti_get_tool_table($tools, $id) {
$delete = get_string('reject', 'lti');
}
- $html .= <<<HTML
+ $html .= "
<tr>
<td>
{$type->name}
@@ -393,17 +393,17 @@ function lti_get_tool_table($tools, $id) {
<td>
{$date}
</td>
- <td align="center">
+ <td align=\"center\">
{$accepthtml}
- <a class="editing_update" href="{$CFG->wwwroot}/mod/lti/typessettings.php?action=update&amp;id={$type->id}&amp;sesskey={$USER->sesskey}&amp;tab={$id}" title="{$update}">
- <img class="iconsmall" alt="{$update}" src="{$CFG->wwwroot}/pix/t/edit.gif"/>
+ <a class=\"editing_update\" href=\"{$CFG->wwwroot}/mod/lti/typessettings.php?action=update&amp;id={$type->id}&amp;sesskey={$USER->sesskey}&amp;tab={$id}\" title=\"{$update}\">
+ <img class=\"iconsmall\" alt=\"{$update}\" src=\"{$CFG->wwwroot}/pix/t/edit.gif\"/>
</a>
- <a class="editing_delete" href="{$CFG->wwwroot}/mod/lti/typessettings.php?action={$deleteaction}&amp;id={$type->id}&amp;sesskey={$USER->sesskey}&amp;tab={$id}" title="{$delete}">
- <img class="iconsmall" alt="{$delete}" src="{$CFG->wwwroot}/pix/t/delete.gif"/>
+ <a class=\"editing_delete\" href=\"{$CFG->wwwroot}/mod/lti/typessettings.php?action={$deleteaction}&amp;id={$type->id}&amp;sesskey={$USER->sesskey}&amp;tab={$id}\" title=\"{$delete}\">
+ <img class=\"iconsmall\" alt=\"{$delete}\" src=\"{$CFG->wwwroot}/pix/t/delete.gif\"/>
</a>
</td>
</tr>
-HTML;
+ ";
}
$html .= '</table></div>';
} else {
@@ -508,17 +508,17 @@ function lti_get_ims_role($user, $cmid, $courseid) {
function lti_get_type_config($typeid) {
global $DB;
- $query = <<<QUERY
+ $query = '
SELECT name, value
FROM {lti_types_config}
WHERE typeid = :typeid1
UNION ALL
- SELECT 'toolurl' AS name, baseurl AS value
+ SELECT \'toolurl\' AS name, baseurl AS value
FROM {lti_types}
WHERE id = :typeid2
-QUERY;
+ ';
$typeconfig = array();
$configs = $DB->get_records_sql($query, array('typeid1' => $typeid, 'typeid2' => $typeid));
@@ -554,13 +554,13 @@ function lti_get_tools_by_domain($domain, $state = null, $courseid = null) {
$coursefilter = 'OR course = :courseid';
}
- $query = <<<QUERY
+ $query = '
SELECT * FROM {lti_types}
WHERE
tooldomain = :tooldomain
AND (course = :siteid $coursefilter)
$statefilter
-QUERY;
+ ';
return $DB->get_records_sql($query, array(
'courseid' => $courseid,
@@ -589,14 +589,14 @@ function lti_filter_get_types($course) {
function lti_get_types_for_add_instance() {
global $DB, $SITE, $COURSE;
- $query = <<<QUERY
+ $query = '
SELECT *
FROM {lti_types}
WHERE
coursevisible = 1
AND (course = :siteid OR course = :courseid)
AND state = :active
-QUERY;
+ ';
$admintypes = $DB->get_records_sql($query, array('siteid' => $SITE->id, 'courseid' => $COURSE->id, 'active' => LTI_TOOL_STATE_CONFIGURED));
@@ -692,23 +692,23 @@ function lti_get_shared_secrets_by_key($key) {
//Look up the shared secret for the specified key in both the types_config table (for configured tools)
//And in the lti resource table for ad-hoc tools
- $query = <<<QUERY
+ $query = '
SELECT t2.value
FROM {lti_types_config} t1
INNER JOIN {lti_types_config} t2 ON t1.typeid = t2.typeid
INNER JOIN {lti_types} type ON t2.typeid = type.id
WHERE
- t1.name = 'resourcekey'
+ t1.name = \'resourcekey\'
AND t1.value = :key1
- AND t2.name = 'password'
+ AND t2.name = \'password\'
AND type.state = :configured
UNION
SELECT password AS value
FROM {lti}
WHERE resourcekey = :key2
-QUERY;
+ ';
$sharedsecrets = $DB->get_records_sql($query, array('configured' => LTI_TOOL_STATE_CONFIGURED, 'key1' => $key, 'key2' => $key));
View
10 mod/lti/return.php
@@ -87,23 +87,23 @@
echo '<html><body>';
- $script = <<<SCRIPT
- <script type='text/javascript'>
+ $script = "
+ <script type=\"text/javascript\">
//<![CDATA[
if(window != top){
top.location.href = '{$url}';
}
//]]
</script>
-SCRIPT;
+ ";
$clickhere = get_string('return_to_course', 'lti', (object)array('link' => $url));
- $noscript = <<<NOSCRIPT
+ $noscript = "
<noscript>
{$clickhere}
</noscript>
-NOSCRIPT;
+ ";
echo $script;
echo $noscript;
View
44 mod/lti/settings.php
@@ -99,26 +99,26 @@
break;
}
- $template = <<<HTML
-<div id="lti_tabs" class="yui-navset">
- <ul id="lti_tab_heading" class="yui-nav" style="display:none">
+ $template = "
+<div id=\"lti_tabs\" class=\"yui-navset\">
+ <ul id=\"lti_tab_heading\" class=\"yui-nav\" style=\"display:none\">
<li {$activeselected}>
- <a href="#tab1">
+ <a href=\"#tab1\">
<em>$active</em>
</a>
</li>
<li {$pendingselected}>
- <a href="#tab2">
+ <a href=\"#tab2\">
<em>$pending</em>
</a>
</li>
<li {$rejectedselected}>
- <a href="#tab3">
+ <a href=\"#tab3\">
<em>$rejected</em>
</a>
</li>
</ul>
- <div class="yui-content">
+ <div class=\"yui-content\">
<div>
$configuredtoolshtml
</div>
@@ -131,7 +131,7 @@
</div>
</div>
-<script type='text/javascript'>
+<script type=\"text/javascript\">
//<![CDATA[
(function(){
//If javascript is disabled, they will just see the three tabs one after another
@@ -141,43 +141,43 @@
new YAHOO.widget.TabView('lti_tabs');
var setupTools = function(id, sort){
- var lti_tools = YAHOO.util.Dom.get(id + "_tools");
+ var lti_tools = YAHOO.util.Dom.get(id + '_tools');
if(lti_tools){
var dataSource = new YAHOO.util.DataSource(lti_tools);
var configuredColumns = [
- {key:"name", label:"$typename", sortable:true},
- {key:"baseURL", label:"$baseurl", sortable:true},
- {key:"timecreated", label:"$createdon", sortable:true, formatter:YAHOO.widget.DataTable.formatDate},
- {key:"action", label:"$action"}
+ {key:'name', label:'$typename', sortable:true},
+ {key:'baseURL', label:'$baseurl', sortable:true},
+ {key:'timecreated', label:'$createdon', sortable:true, formatter:YAHOO.widget.DataTable.formatDate},
+ {key:'action', label:'$action'}
];
dataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
dataSource.responseSchema = {
fields: [
- {key:"name"},
- {key:"baseURL"},
- {key:"timecreated", parser:"date"},
- {key:"action"}
+ {key:'name'},
+ {key:'baseURL'},
+ {key:'timecreated', parser:'date'},
+ {key:'action'}
]
};
- new YAHOO.widget.DataTable(id + "_container", configuredColumns, dataSource,
+ new YAHOO.widget.DataTable(id + '_container', configuredColumns, dataSource,
{
sortedBy: sort
}
);
}
};
- setupTools('lti_configured', {key:"name", dir:"asc"});
- setupTools('lti_pending', {key:"timecreated", dir:"desc"});
- setupTools('lti_rejected', {key:"timecreated", dir:"desc"});
+ setupTools('lti_configured', {key:'name', dir:'asc'});
+ setupTools('lti_pending', {key:'timecreated', dir:'desc'});
+ setupTools('lti_rejected', {key:'timecreated', dir:'desc'});
})();
//]]
</script>
-HTML;
+";
$PAGE->requires->yui2_lib('tabview');
$PAGE->requires->yui2_lib('datatable');
View
4 mod/lti/simpletest/testlocallib.php
@@ -90,7 +90,7 @@ public function test_sign_parameters() {
}
public function test_parse_grade_replace_message() {
- $message = <<<XML
+ $message = '
<imsx_POXEnvelopeRequest xmlns = "http://www.imsglobal.org/lis/oms1p0/pox">
<imsx_POXHeader>
<imsx_POXRequestHeaderInfo>
@@ -114,7 +114,7 @@ public function test_parse_grade_replace_message() {
</replaceResultRequest>
</imsx_POXBody>
</imsx_POXEnvelopeRequest>
-XML;
+';
$parsed = lti_parse_grade_replace_message(new SimpleXMLElement($message));
View
14 mod/lti/view.php
@@ -120,17 +120,17 @@
echo '<object id="contentframe" height="600px" width="100%" type="text/html" data="launch.php?id='.$cm->id.'"></object>';
//Output script to make the object tag be as large as possible
- $resize = <<<'SCRIPT'
- <script type='text/javascript'>
+ $resize = '
+ <script type="text/javascript">
//<![CDATA[
(function(){
//Take scrollbars off the outer document to prevent double scroll bar effect
- document.body.style.overflow = 'hidden';
+ document.body.style.overflow = "hidden";
var dom = YAHOO.util.Dom;
- var frame = document.getElementById('contentframe');
+ var frame = document.getElementById("contentframe");
- var padding = 15; //The bottom of the iframe wasn't visible on some themes. Probably because of border widths, etc.
+ var padding = 15; //The bottom of the iframe wasn\'t visible on some themes. Probably because of border widths, etc.
var lastHeight;
@@ -139,7 +139,7 @@
if(lastHeight !== Math.min(dom.getDocumentHeight(), viewportHeight)){
- frame.style.height = viewportHeight - dom.getY(frame) - padding + 'px';
+ frame.style.height = viewportHeight - dom.getY(frame) - padding + "px";
lastHeight = Math.min(dom.getDocumentHeight(), dom.getViewportHeight());
}
@@ -151,7 +151,7 @@
})();
//]]
</script>
-SCRIPT;
+';
echo $resize;
}

0 comments on commit 5de15b8

Please sign in to comment.
Something went wrong with that request. Please try again.