Skip to content

Commit

Permalink
address some hopefully last code prechecks
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-web committed Jun 14, 2024
1 parent f023608 commit 8a33df7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ As moodle administrator, you can make the following settings:
</tr>
<tr>
<th>HTML entities</th>
<td>If this setting is set to <code>true</code>, HTMLentities like "&", "<", etc. are supported within the JavaScript code for JSXGraph.</td>
<td>If this setting is set to <code>true</code>, HTML entities like "&", "<", etc. are supported within the JavaScript code for JSXGraph.</td>
</tr>
<tr>
<th>convert encoding</th>
Expand Down Expand Up @@ -264,7 +264,7 @@ Within the `<jsxgraph>` tag different attributes can be declared, e.g. `<jsxgrap
</tr>
<tr>
<th><code>entities</code></th>
<td>If HTMLentities like "&", "<", etc. should be supported within the JavaScript code set the attribute to <code>"true"</code>. To override a global <code>true</code> type <code>"false"</code>.</td>
<td>If HTML entities like "&", "<", etc. should be supported within the JavaScript code set the attribute to <code>"true"</code>. To override a global <code>true</code> type <code>"false"</code>.</td>
</tr>
<tr>
<th><code>useGlobalJS</code></th>
Expand Down
6 changes: 3 additions & 3 deletions filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ private function apply_js($node) {

// Convert the HTML-entities in the variable $code.

if ($this->settings['HTMLentities'] && $attributes['entities']) {
if ($this->settings['html_entities'] && $attributes['entities']) {
$code = html_entity_decode($code);
}

Expand Down Expand Up @@ -896,7 +896,7 @@ private function get_adminsettings() {
$defaults = [
'versionJSXGraph' => 'auto',
'formulasextension' => true,
'HTMLentities' => true,
'html_entities' => true,
'convertencoding' => true,
'globalJS' => '',
'usedivid' => false,
Expand All @@ -912,7 +912,7 @@ private function get_adminsettings() {

$bools = [
'formulasextension',
'HTMLentities',
'html_entities',
'convertencoding',
'usedivid',
];
Expand Down
8 changes: 4 additions & 4 deletions lang/de/filter_jsxgraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['filtername'] = 'JSXGraph';

$string['aspectratio'] = 'Seitenverhältnis';
$string['aspectratio_desc'] = 'Format z.B. <code>1 / 1</code>';

Expand All @@ -59,6 +57,8 @@
$string['fallbackwidth'] = 'Fallback-Breite';
$string['fallbackwidth_desc'] = 'Siehe Beschreibung der Standard-Dimensionen.';

$string['filtername'] = 'JSXGraph';

$string['filterversion'] = 'Sie benutzen derzeit die folgende <b>Version des JSXGraph-Filters</b> für Moodle:';

$string['fixheight'] = 'Höhe';
Expand All @@ -81,8 +81,8 @@
$string['header_libs'] = 'Erweiterungen für den JSXGraph-Filter';
$string['header_versions'] = 'Versionsinformationen';

$string['HTMLentities'] = 'HTMLentities';
$string['HTMLentities_desc'] = 'Einstellung, ob HTMLentities wie z.B. "&", "<",... innerhalb des JavaScript-Codes für JSXGraph unterstützt werden.';
$string['html_entities'] = 'HTML entities';
$string['html_entities_desc'] = 'Einstellung, ob HTML entities wie z.B. "&", "<",... innerhalb des JavaScript-Codes für JSXGraph unterstützt werden.';

$string['maxheight'] = 'Maximale Höhe';
$string['maxheight_desc'] = '';
Expand Down
10 changes: 5 additions & 5 deletions lang/en/filter_jsxgraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['filtername'] = 'JSXGraph';

$string['aspectratio'] = 'aspect-ratio';
$string['aspectratio_desc'] = 'Format e.g. <code>1 / 1</code>';

Expand All @@ -59,6 +57,8 @@
$string['fallbackwidth'] = 'fallback width';
$string['fallbackwidth_desc'] = 'See description of standard dimensions.';

$string['filtername'] = 'JSXGraph';

$string['filterversion'] = 'You are using version the following <b>version of the JSXGraph filter</b> for Moodle:';

$string['fixheight'] = 'height';
Expand All @@ -81,8 +81,8 @@
$string['header_libs'] = 'Extensions for the JSXGraph filter';
$string['header_versions'] = 'Version info';

$string['HTMLentities'] = 'HTML entities';
$string['HTMLentities_desc'] = 'Decide whether HTMLentities like "&", "<",... are supported within the JavaScript code for JSXGraph.';
$string['html_entities'] = 'HTML entities';
$string['html_entities_desc'] = 'Decide whether HTML entities like "&", "<",... are supported within the JavaScript code for JSXGraph.';

$string['maxheight'] = 'max-height';
$string['maxheight_desc'] = '';
Expand All @@ -107,4 +107,4 @@
$string['versionJSXGraph_auto'] = 'latest supplied version (automatically)';
$string['versionJSXGraph_desc'] = 'Select here which version of JSXGraph should be used. Attention: Version 1.3.2+ is needed for responsiveness.';

$string['yes'] = 'yes';
$string['yes'] = 'yes';
6 changes: 3 additions & 3 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ function get_recommended_version_with_prefix() {
));

$settings->add(new admin_setting_configselect(
'filter_jsxgraph/HTMLentities',
get_string('HTMLentities', 'filter_jsxgraph'),
get_string('HTMLentities_desc', 'filter_jsxgraph'),
'filter_jsxgraph/html_entities',
get_string('html_entities', 'filter_jsxgraph'),
get_string('html_entities_desc', 'filter_jsxgraph'),
'1',
[get_string('no', 'filter_jsxgraph'), get_string('yes', 'filter_jsxgraph')]
));
Expand Down

0 comments on commit 8a33df7

Please sign in to comment.