Skip to content

Commit

Permalink
Merge pull request #5 from andreasschenkel/develop
Browse files Browse the repository at this point in the history
v1.0.5
  • Loading branch information
andreasschenkel authored Dec 3, 2021
2 parents b4f254d + 12b1eca commit 9c2482f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 7 deletions.
3 changes: 2 additions & 1 deletion classes/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ static function generatePagebreak($itemnumber)
*/
static function generateSelectionOverview($level, $itemnumber, $firstchoicereferencenumber, $allOptionsToAdd, $option)
{
$selectlabel = get_string('selectlabel', 'report_feedbackchoicegenerator');
if ($level === 1) {
$choicelabel = get_string('firstchoicelabel', 'report_feedbackchoicegenerator');
$firstchoicereferencenumber = 0;
Expand All @@ -109,7 +110,7 @@ static function generateSelectionOverview($level, $itemnumber, $firstchoicerefer
$output = $output . html_writer::start_tag('ITEM', array('TYPE' => 'multichoice', 'REQUIRED' => '0')) . "\n";
$output = $output . html_writer::tag('ITEMID', "<![CDATA[$itemnumber]]>") . "\n";
$output = $output . html_writer::tag('ITEMTEXT', "<![CDATA[$choicelabel]]>") . "\n";
$output = $output . html_writer::tag('ITEMLABEL', "<![CDATA[$choicelabel auswählen]]>") . "\n";
$output = $output . html_writer::tag('ITEMLABEL', "<![CDATA[$choicelabel $selectlabel]]>") . "\n";
$output = $output . html_writer::tag('PRESENTATION', "<![CDATA[r>>>>>$allOptionsToAdd]]>") . "\n";
$output = $output . html_writer::tag('OPTIONS', "<![CDATA[h]]>") . "\n";
$output = $output . html_writer::tag('DEPENDITEM', "<![CDATA[$firstchoicereferencenumber]]>") . "\n";
Expand Down
2 changes: 2 additions & 0 deletions classes/View/FeedbackChoiceGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ public function init()
'maxoptionslength' => $maxoptionslength,
'textareacontent' => $textareacontent,
'buttonlabel' => get_string('buttonlabel', 'report_feedbackchoicegenerator'),
'downloadbuttonlabel' => get_string('downloadbuttonlabel', 'report_feedbackchoicegenerator'),
'resetbuttonlabel' => get_string('resetbuttonlabel', 'report_feedbackchoicegenerator'),
'dataurl' => $dataurl
]
);
Expand Down
1 change: 1 addition & 0 deletions db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*
* @package report_feedbackchoicegenerator
* @category access
* @copyright Andreas Schenkel
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
5 changes: 5 additions & 0 deletions lang/de/report_feedbackchoicegenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*
* @package report_feedbackchoicegenerator
* @category string
* @copyright Andreas Schenkel
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down Expand Up @@ -52,3 +53,7 @@
Alternativ den xml-Code in einer Textdatei kopieren und mit der Endung .xml speichern.';

$string['buttonlabel'] = 'XML erzeugen oder aktualisieren';
$string['downloadbuttonlabel'] = 'Download (rechte Maustaste speichern und unter)';
$string['resetbuttonlabel'] = 'Eingaben zurücksetzen';

$string['selectlabel'] = 'auswählen';
7 changes: 6 additions & 1 deletion lang/en/report_feedbackchoicegenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*
* @package report_feedbackchoicegenerator
* @category string
* @copyright Andreas Schenkel
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down Expand Up @@ -48,6 +49,10 @@

$string['optionsheader'] = 'Enter options';

$string['description'] = 'Put the generated xml-Code in to a textfile with the extension .xml. First line of code musst be: <\?xml version=\"1.0\" encoding=\"UTF-8\" ?>';
$string['description'] = 'Download the generated code or put the generated xml-Code in to a textfile with the extension .xml.';

$string['buttonlabel'] = 'generate XML or update';
$string['downloadbuttonlabel'] = 'download with right click and save';
$string['resetbuttonlabel'] = 'reset';

$string['selectlabel'] = 'select';
2 changes: 1 addition & 1 deletion settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

/**
* @package report_feedbackchoicegenerator
* @copyright
* @copyright Andreas Schenkel
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
4 changes: 2 additions & 2 deletions templates/reportgenerator.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<br>
<div class="form-row mb-2">
<button id='input_feedbackchoicegenerator' class='btn btn-primary' type='submit'>{{buttonlabel}}</button>
<a class='btn btn-warning' href='{{dataurl}}' type='application/xml'>Download (rechte Maustaste speichern unter)</a>
<a class='btn btn-danger' href='index.php?id={{courseid}}'>Session zurücksetzen</a>
<a class='btn btn-warning' href='{{dataurl}}' type='application/xml'>{{downloadbuttonlabel}}</a>
<a class='btn btn-danger' href='index.php?id={{courseid}}'>{{resetbuttonlabel}}</a>
</div>

</form>
Expand Down
5 changes: 3 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
/**
* @package report_feedbackchoicegenerator
* @author Andreas Schenkel
* @copyright Andreas Schenkel
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

$plugin->component = 'report_feedbackchoicegenerator';
$plugin->release = '1.0.4';
$plugin->version = 2021120302;
$plugin->release = '1.0.5';
$plugin->version = 2021120303;
$plugin->requires = 2020061500;
$plugin->maturity = MATURITY_RC;

0 comments on commit 9c2482f

Please sign in to comment.