Skip to content
Snippets Groups Projects
Commit 769c7ae2 authored by Thomas Marstrander's avatar Thomas Marstrander
Browse files

Fix using moodle_url for generating the content hub registration url

parent 725d3263
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,11 @@ class admin_setting_html extends admin_setting { ...@@ -66,6 +66,11 @@ class admin_setting_html extends admin_setting {
*/ */
public function output_html($data, $query = '') { public function output_html($data, $query = '') {
global $OUTPUT; global $OUTPUT;
$registrationurl = new moodle_url('/mod/hvp/content_hub_registration.php');
if ($this->hubinfo === false) {
$this->hubinfo = (object) [];
}
$this->hubinfo->registrationurl = $registrationurl->out(false);
return $OUTPUT->render_from_template('mod_hvp/content_hub_registration_box', $this->hubinfo); return $OUTPUT->render_from_template('mod_hvp/content_hub_registration_box', $this->hubinfo);
} }
} }
\ No newline at end of file
...@@ -489,8 +489,8 @@ $string['contenthub:settings:box'] = 'Content Hub Account'; ...@@ -489,8 +489,8 @@ $string['contenthub:settings:box'] = 'Content Hub Account';
$string['contenthub:licenseagreementtitle'] = 'End User License Agreement (EULA)'; $string['contenthub:licenseagreementtitle'] = 'End User License Agreement (EULA)';
$string['contenthub:licenseagreementdescription'] = 'Please read the following agreement before proceeding with the '; $string['contenthub:licenseagreementdescription'] = 'Please read the following agreement before proceeding with the ';
$string['contenthub:licenseagreementmaintext'] = 'TODO'; $string['contenthub:licenseagreementmaintext'] = 'TODO';
$string['contenthub:register'] = 'Register an account on the H5P Hub <a href="/mod/hvp/content_hub_registration.php">here</a>'; $string['contenthub:register'] = 'Register an account on the H5P Hub <a href="{$a}">here</a>';
$string['contenthub:changesettings'] = 'Change account settings <a href="/mod/hvp/content_hub_registration.php">here</a>'; $string['contenthub:changesettings'] = 'Change account settings <a href="{$a}">here</a>';
$string['contenthub:nopermissions'] = 'You do not have permission to register the site with the content hub.'; $string['contenthub:nopermissions'] = 'You do not have permission to register the site with the content hub.';
$string['contentissyncing'] = 'Content is being synced.'; $string['contentissyncing'] = 'Content is being synced.';
$string['noexport'] = 'Missing export file.'; $string['noexport'] = 'Missing export file.';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="form-label col-sm-3 text-sm-right"></div> <div class="form-label col-sm-3 text-sm-right"></div>
<div class="form-setting col-sm-9"> <div class="form-setting col-sm-9">
{{^name}} {{^name}}
{{# str }} contenthub:register, mod_hvp {{/str}} {{# str }} contenthub:register, mod_hvp, {{ registrationurl }} {{/str}}
{{/name}} {{/name}}
{{#name}} {{#name}}
<div> <div>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
{{/phone}} {{/phone}}
</div> </div>
<div style="margin-top: 1em"> <div style="margin-top: 1em">
{{# str}} contenthub:changesettings, mod_hvp {{/str}} {{# str}} contenthub:changesettings, mod_hvp, {{ registrationurl }} {{/str}}
</div> </div>
</div> </div>
{{/name}} {{/name}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment