diff --git a/README.md b/README.md
index eb756a4..0ff0502 100644
--- a/README.md
+++ b/README.md
@@ -58,9 +58,19 @@ By default only editing teacher can use this generator. If other roles should be
### D: Changelog ###
+[[v2.0.4]]
+
+- fixed: add "ranked" to pluginname and refactored to new name feedbackcankedchoicegenerator
+- fixed: Wrong link URL if Moodle not installed in the server root.
+- fixed: wrong namespaces
+- fixed: pull request with correct language strings
+- fixed: do not hard-code the word "Option"
+
+
+
[[v2.0.3]]
-- setting to allow generator on frontpage with courseid=1. Use URL moodleurl/local/feedbackchoicegenerator/index.php?id=1'
+- setting to allow generator on frontpage with courseid=1. Use URL moodleurl/local/feedbackrankedchoicegenerator/index.php?id=1'
[[v2.0.2]]
@@ -97,7 +107,7 @@ unknown
- 02.12.2021 set capability für role editingteacher instead of teacher
- 02.12.2021 check, if user has capability to view report also by checking the capapility
- 02.12.2021 do not prevent capability for student
-- 02.12.2021 added missing languagestring feedbackchoicegenerator:view
+- 02.12.2021 added missing languagestring feedbackrankedchoicegenerator:view
[[v1.0.1]] beta
@@ -121,7 +131,7 @@ unknown
The plugin can be also installed by putting the contents of this directory to
- {your/moodle/dirroot}/local/feedbackchoicegenerator
+ {your/moodle/dirroot}/local/feedbackrankedchoicegenerator
Afterwards, log in to your Moodle site as an admin and go to _Site administration >
Notifications_ to complete the installation.
diff --git a/classes/View/FeedbackChoiceGenerator.php b/classes/FeedbackRankedChoiceGenerator.php
similarity index 84%
rename from classes/View/FeedbackChoiceGenerator.php
rename to classes/FeedbackRankedChoiceGenerator.php
index 1167560..b5cd748 100644
--- a/classes/View/FeedbackChoiceGenerator.php
+++ b/classes/FeedbackRankedChoiceGenerator.php
@@ -14,19 +14,19 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-namespace local_feedbackchoicegenerator\View;
+namespace local_feedbackrankedchoicegenerator;
use stdClass;
use moodle_database;
-use local_feedbackchoicegenerator\Helper;
-use local_feedbackchoicegenerator\Manager;
+use local_feedbackrankedchoicegenerator\Helper;
+use local_feedbackrankedchoicegenerator\Manager;
/**
- * @package local_feedbackchoicegenerator
- * Class FeedbackChoiceGenerator
+ * @package local_feedbackrankedchoicegenerator
+ * Class FeedbackrankedChoiceGenerator
*/
-class FeedbackChoiceGenerator
+class FeedbackrankedChoiceGenerator
{
/**
@@ -46,7 +46,7 @@ class FeedbackChoiceGenerator
private $apim;
/**
- * FeedbackChoiceGenerator constructor.
+ * FeedbackrankedChoiceGenerator constructor.
* @param moodle_database $db
* @param int $courseid
* @param moodle_page $page
@@ -77,8 +77,10 @@ public function get_page(): Page {
*/
public function init() {
global $CFG;
- $maxlength = (int)$CFG->local_feedbackchoicegenerator_maxlength;
- $maxoptionslength = (int)$CFG->local_feedbackchoicegenerator_maxoptionslength;
+ $maxlength = (int)$CFG->local_feedbackrankedchoicegenerator_maxlength;
+ $maxoptionslength = (int)$CFG->local_feedbackrankedchoicegenerator_maxoptionslength;
+ $optionlabel = '';
+ $optionlabel = get_string('optionlabel', 'local_feedbackrankedchoicegenerator');
$this->apim->security()->user_is_allowed_to_view_the_course_and_has_capability_to_use_generator($this->courseid);
@@ -110,7 +112,7 @@ public function init() {
$optioncounter = substr($optioncounter , 0, $maxoptionslength);
$options[] = array(
'optionnumber' => $i,
- 'optionlabel' => "Option $i",
+ 'optionlabel' => "$optionlabel $i",
'optionname' => "option$i",
'optionvalue' => $optioncounter
);
@@ -120,32 +122,35 @@ public function init() {
$textareacontent = $this->textareagenerator($optionsarray);
$dataurl = 'data:application/xml;charset=UTF-8;utf8,' . $textareacontent;
+ $wwwroot = $CFG->wwwroot;
+
echo $this->get_page()->get_output()->render_from_template(
- 'local_feedbackchoicegenerator/mainpage',
+ 'local_feedbackrankedchoicegenerator/mainpage',
[
+ 'wwwroot' => $wwwroot,
'courseid' => $this->courseid,
- 'backtocourselabel' => get_string('backtocourselabel', 'local_feedbackchoicegenerator'),
+ 'backtocourselabel' => get_string('backtocourselabel', 'local_feedbackrankedchoicegenerator'),
'title' => $this->get_page()->get_title(),
- 'header3' => get_string('header3', 'local_feedbackchoicegenerator'),
- 'summary' => get_string('summary', 'local_feedbackchoicegenerator'),
+ 'header3' => get_string('header3', 'local_feedbackrankedchoicegenerator'),
+ 'summary' => get_string('summary', 'local_feedbackrankedchoicegenerator'),
- 'courseidlabel' => get_string('courseidlabel', 'local_feedbackchoicegenerator'),
- 'sizelabel' => get_string('sizelabel', 'local_feedbackchoicegenerator'),
+ 'courseidlabel' => get_string('courseidlabel', 'local_feedbackrankedchoicegenerator'),
+ 'sizelabel' => get_string('sizelabel', 'local_feedbackrankedchoicegenerator'),
'maxlength' => $maxlength,
- 'optionslengthinfo' => get_string('optionslengthinfo', 'local_feedbackchoicegenerator'),
- 'description' => get_string('description', 'local_feedbackchoicegenerator'),
+ 'optionslengthinfo' => get_string('optionslengthinfo', 'local_feedbackrankedchoicegenerator'),
+ 'description' => get_string('description', 'local_feedbackrankedchoicegenerator'),
'size' => $size,
'filename' => $filename,
'options' => $options,
'maxoptionslength' => $maxoptionslength,
'textareacontent' => $textareacontent,
- 'buttonlabel' => get_string('buttonlabel', 'local_feedbackchoicegenerator'),
- 'downloadbuttonlabel' => get_string('downloadbuttonlabel', 'local_feedbackchoicegenerator'),
- 'updatebuttonlabel' => get_string('updatebuttonlabel', 'local_feedbackchoicegenerator'),
- 'resetbuttonlabel' => get_string('resetbuttonlabel', 'local_feedbackchoicegenerator'),
+ 'buttonlabel' => get_string('buttonlabel', 'local_feedbackrankedchoicegenerator'),
+ 'downloadbuttonlabel' => get_string('downloadbuttonlabel', 'local_feedbackrankedchoicegenerator'),
+ 'updatebuttonlabel' => get_string('updatebuttonlabel', 'local_feedbackrankedchoicegenerator'),
+ 'resetbuttonlabel' => get_string('resetbuttonlabel', 'local_feedbackrankedchoicegenerator'),
'dataurl' => $dataurl
]
);
diff --git a/classes/Helper.php b/classes/Helper.php
index 33802f5..3015c6f 100644
--- a/classes/Helper.php
+++ b/classes/Helper.php
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-namespace local_feedbackchoicegenerator;
+namespace local_feedbackrankedchoicegenerator;
defined('MOODLE_INTERNAL') || die;
use html_writer;
@@ -111,12 +111,12 @@ public static function generate_selection_overview($level,
$itemnumber,
$firstchoicereferencenumber,
$alloptionstoadd, $option) {
- $selectlabel = get_string('selectlabel', 'local_feedbackchoicegenerator');
+ $selectlabel = get_string('selectlabel', 'local_feedbackrankedchoicegenerator');
if ($level === 1) {
- $choicelabel = get_string('firstchoicelabel', 'local_feedbackchoicegenerator');
+ $choicelabel = get_string('firstchoicelabel', 'local_feedbackrankedchoicegenerator');
$firstchoicereferencenumber = 0;
} else {
- $choicelabel = get_string('secondchoicelabel', 'local_feedbackchoicegenerator');;
+ $choicelabel = get_string('secondchoicelabel', 'local_feedbackrankedchoicegenerator');;
}
$output = "";
$output = $output . html_writer::start_tag('ITEM', array('TYPE' => 'multichoice', 'REQUIRED' => '0')) . "\n";
@@ -145,7 +145,7 @@ public static function generate_label($itemnumber, $firstchoicereferencenumber,
$output = $output . html_writer::tag('ITEMTEXT', "") . "\n";
$output = $output . html_writer::tag('ITEMLABEL', "") . "\n";
$output = $output . html_writer::tag('PRESENTATION',
- "") . "\n";
+ "") . "\n";
$output = $output . html_writer::tag('OPTIONS', "") . "\n";
$output = $output . html_writer::tag('DEPENDITEM', "") . "\n";
$output = $output . html_writer::tag('DEPENDVALUE', "") . "\n";
diff --git a/classes/Manager.php b/classes/Manager.php
index ef5d962..1e13b3d 100644
--- a/classes/Manager.php
+++ b/classes/Manager.php
@@ -14,16 +14,16 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-namespace local_feedbackchoicegenerator;
+namespace local_feedbackrankedchoicegenerator;
defined('MOODLE_INTERNAL') || die;
use moodle_database;
-use local_feedbackchoicegenerator\Database\Factory as DatabaseFactory;
-use local_feedbackchoicegenerator\Security\Security;
+use local_feedbackrankedchoicegenerator\local\Database\Factory as DatabaseFactory;
+use local_feedbackrankedchoicegenerator\Security;
defined('MOODLE_INTERNAL') || die();
/**
- * @package local_feedbackchoicegenerator
+ * @package local_feedbackrankedchoicegenerator
* Class manager
*/
class Manager
diff --git a/classes/View/Page.php b/classes/Page.php
similarity index 85%
rename from classes/View/Page.php
rename to classes/Page.php
index 07ec31f..6cdea95 100644
--- a/classes/View/Page.php
+++ b/classes/Page.php
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-namespace local_feedbackchoicegenerator\View;
+namespace local_feedbackrankedchoicegenerator;
+
defined('MOODLE_INTERNAL') || die;
use moodle_url;
@@ -35,12 +36,14 @@ public function __construct($page, $course, $courseid, $output) {
$this->page = $page;
$this->output = $output;
$this->course = $course;
- $this->title = get_string('pluginname', 'local_feedbackchoicegenerator');
+ $this->title = get_string('pluginname', 'local_feedbackrankedchoicegenerator');
- $page->set_url(new moodle_url('/local/feedbackchoicegenerator/index.php', ['id' => $courseid]));
+ $page->set_context(\context_course::instance($courseid));
+ $page->set_url(new moodle_url('/local/feedbackrankedchoicegenerator/index.php', ['id' => $courseid]));
$page->set_title($this->get_title());
$page->set_heading($course->fullname);
$page->set_pagelayout('incourse');
+
}
public function get_output() {
diff --git a/classes/Security/Security.php b/classes/Security.php
similarity index 89%
rename from classes/Security/Security.php
rename to classes/Security.php
index 68afd56..396b4e7 100644
--- a/classes/Security/Security.php
+++ b/classes/Security.php
@@ -14,7 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-namespace local_feedbackchoicegenerator\Security;
+namespace local_feedbackrankedchoicegenerator;
+
defined('MOODLE_INTERNAL') || die;
use coding_exception;
use context_course;
@@ -24,7 +25,7 @@
use stdClass;
/**
- * @package local_feedbackchoicegenerator
+ * @package local_feedbackrankedchoicegenerator
* Class Security
*/
class Security
@@ -55,6 +56,6 @@ public function user_is_allowed_to_view_the_course_and_has_capability_to_use_gen
require_login($course);
$coursecontext = context_course::instance($courseid);
- require_capability('local/feedbackchoicegenerator:view', $coursecontext);
+ require_capability('local/feedbackrankedchoicegenerator:view', $coursecontext);
}
}
diff --git a/classes/Database/DataFiles.php b/classes/local/Database/DataFiles.php
similarity index 97%
rename from classes/Database/DataFiles.php
rename to classes/local/Database/DataFiles.php
index 34c91f1..867bf1e 100644
--- a/classes/Database/DataFiles.php
+++ b/classes/local/Database/DataFiles.php
@@ -14,12 +14,12 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-namespace local_feedbackchoicegenerator\Database;
+namespace local_feedbackrankedchoicegenerator\local\Database;
defined('MOODLE_INTERNAL') || die();
use moodle_database;
/**
- * @package local_feedbackchoicegenerator
+ * @package local_feedbackrankedchoicegenerator
* This class provides high-level functionality for the module. Concepts like
* enumerating files belonging to a specific component are mapped to the
* relevant SQL queries, therefore encapsulating low-level database access inside
diff --git a/classes/Database/Factory.php b/classes/local/Database/Factory.php
similarity index 94%
rename from classes/Database/Factory.php
rename to classes/local/Database/Factory.php
index 397cf7d..096d604 100644
--- a/classes/Database/Factory.php
+++ b/classes/local/Database/Factory.php
@@ -14,12 +14,12 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-namespace local_feedbackchoicegenerator\Database;
+namespace local_feedbackrankedchoicegenerator\local\Database;
defined('MOODLE_INTERNAL') || die;
use moodle_database;
/**
- * @package local_feedbackchoicegenerator
+ * @package local_feedbackrankedchoicegenerator
* This is a straightfoward implementation of the Factory Pattern. The
* class provides access to objects that are necessary for interaction
* with the Moodle database via a DataFiles abstraction.
diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php
index 8b4b4dd..60ac221 100644
--- a/classes/privacy/provider.php
+++ b/classes/privacy/provider.php
@@ -1,6 +1,5 @@
[
+ 'local/feedbackrankedchoicegenerator:view' => [
'captype' => 'read',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
diff --git a/index.php b/index.php
index b2f5729..5dba660 100644
--- a/index.php
+++ b/index.php
@@ -16,7 +16,7 @@
require_once(__DIR__ . '/../../config.php');
require_login();
-use local_feedbackchoicegenerator\View\FeedbackChoiceGenerator;
+use local_feedbackrankedchoicegenerator\FeedbackRankedChoiceGenerator;
// Assign global variables to local (parameter) variables.
// At the moment, this approach is used for documentation purposes.
@@ -25,22 +25,22 @@
$output = $OUTPUT;
$db = $DB;
-$feedbackchoicegeneratorinstance = new FeedbackChoiceGenerator($db, $courseid, $page, $output);
+$feedbackrankedchoicegeneratorinstance = new FeedbackRankedChoiceGenerator($db, $courseid, $page, $output);
global $CFG;
-$isallowedonfrontpage = $CFG->local_feedbackchoicegenerator_isallowedonfrontpage;
-$isactive = $CFG->local_feedbackchoicegenerator_isactive;
+$isallowedonfrontpage = $CFG->local_feedbackrankedchoicegenerator_isallowedonfrontpage;
+$isactive = $CFG->local_feedbackrankedchoicegenerator_isactive;
if ($isactive) {
if ($courseid === (int)'1') {
if ($isallowedonfrontpage) {
- $feedbackchoicegeneratorinstance->init();
+ $feedbackrankedchoicegeneratorinstance->init();
} else {
echo "not supported on frontpage";
}
} else {
- $feedbackchoicegeneratorinstance->init();
+ $feedbackrankedchoicegeneratorinstance->init();
}
} else {
echo "is not activ";
diff --git a/lang/de/local_feedbackchoicegenerator.php b/lang/de/local_feedbackrankedchoicegenerator.php
similarity index 92%
rename from lang/de/local_feedbackchoicegenerator.php
rename to lang/de/local_feedbackrankedchoicegenerator.php
index 1765f7e..d982bc9 100644
--- a/lang/de/local_feedbackchoicegenerator.php
+++ b/lang/de/local_feedbackrankedchoicegenerator.php
@@ -17,7 +17,7 @@
/**
* Plugin strings are defined here.
*
- * @package local_feedbackchoicegenerator
+ * @package local_feedbackrankedchoicegenerator
* @category string
* @copyright Andreas Schenkel
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -27,14 +27,14 @@
$string['pluginname'] = '1./2. Wahl Feedback-Generator';
-$string['feedbackchoicegenerator:view'] = '1./2. Wahl Feedback-Generator anzeigen';
+$string['feedbackrankedchoicegenerator:view'] = '1./2. Wahl Feedback-Generator anzeigen';
$string['isactive'] = 'Generator aktivieren';
$string['configisactive'] = 'Wenn aktiviert kann der Generator bei vorhandenen Berechtigungen im der Kursnavigation aufgerufen werden.';
$string['isallowedonfrontpage'] = 'Generator auf Startseite mit Kursid=1 erlauben';
$string['configisallowedonfrontpage'] = 'Wenn aktiviert kann der Generator auf der Startseite aufgerufen werden.
- Link wird allerdings nicht angezeigt. URL ist: moodleurl/local/feedbackchoicegenerator/index.php?id=1';
+ Link wird allerdings nicht angezeigt. URL ist: moodleurl/local/feedbackrankedchoicegenerator/index.php?id=1';
$string['maxoptionslength'] = 'Max. Länge der Optionen';
$string['configmaxoptionslength'] = 'Bis zu dieser Länge kann der Text einer Option eingegeben werden.';
@@ -63,3 +63,4 @@
$string['resetbuttonlabel'] = 'Eingaben zurücksetzen';
$string['selectlabel'] = 'auswählen';
+$string['optionlabel'] = 'Option';
diff --git a/lang/en/local_feedbackchoicegenerator.php b/lang/en/local_feedbackrankedchoicegenerator.php
similarity index 69%
rename from lang/en/local_feedbackchoicegenerator.php
rename to lang/en/local_feedbackrankedchoicegenerator.php
index 34ea05d..64da677 100644
--- a/lang/en/local_feedbackchoicegenerator.php
+++ b/lang/en/local_feedbackrankedchoicegenerator.php
@@ -17,7 +17,7 @@
/**
* Plugin strings are defined here.
*
- * @package local_feedbackchoicegenerator
+ * @package local_feedbackrankedchoicegenerator
* @category string
* @copyright Andreas Schenkel
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -25,21 +25,21 @@
defined('MOODLE_INTERNAL') || die();
-$string['pluginname'] = '1./2. choise-generator for feedback';
+$string['pluginname'] = '1./2. ranked-choise-generator for feedback';
-$string['feedbackchoicegenerator:view'] = 'see 1.2-choice feedback-generator';
+$string['feedbackrankedchoicegenerator:view'] = 'see 1./2-ranked-choice-generator for feedback';
$string['isactive'] = 'Activate generator';
-$string['configisactive'] = 'When activate the generator can be started in the coursenavigation.';
+$string['configisactive'] = 'When activated, the generator can be started in the navigation drawer of the course.';
$string['isallowedonfrontpage'] = 'Allow generator on frontpage with coursid=1';
-$string['configisallowedonfrontpage'] = 'When activate the generator can be used on frontpage with courseid=1.
- URL ist: moodleurl/local/feedbackchoicegenerator/index.php?id=1';
+$string['configisallowedonfrontpage'] = 'When activated, the generator can be used on the frontpage with courseid=1.
+URL is: yourmoodleurl/local/feedbackchoicegenerator/index.php?id=1';
-$string['maxoptionslength'] = 'maximum text length of an option';
+$string['maxoptionslength'] = 'maximum text length of each option';
$string['configmaxoptionslength'] = 'Up to this length a user can enter text as an option.';
-$string['maxlength'] = 'max. count of options';
+$string['maxlength'] = 'maximum count of options';
$string['configmaxlength'] = 'Up to how many options can be used.';
$string['firstchoicelabel'] = '1. choice';
@@ -52,9 +52,9 @@
$string['backtocourselabel'] = 'Back to the course';
$string['sizelabel'] = 'How many options';
-$string['optionslengthinfo'] = 'Max. inputlength for each option:';
+$string['optionslengthinfo'] = 'Maximum lengthof input for each option:';
-$string['description'] = 'Download the generated code "Save link as ..." or put the generated xml-Code in to a textfile with the extension .xml.';
+$string['description'] = 'Download the generated code "Save link as ..." or put the generated XML-Code in a textfile with the extension .xml.';
$string['buttonlabel'] = 'generate XML';
$string['updatebuttonlabel'] = 'update';
@@ -62,3 +62,4 @@
$string['resetbuttonlabel'] = 'reset';
$string['selectlabel'] = 'select';
+$string['optionlabel'] = 'Option';
\ No newline at end of file
diff --git a/lib.php b/lib.php
index c6316b5..5eb11f1 100755
--- a/lib.php
+++ b/lib.php
@@ -19,22 +19,22 @@
/**
* This function extends the navigation with the report items
*
- * @package local_feedbackchoicegenerator
+ * @package local_feedbackrankedchoicegenerator
* @param navigation_node $navigation The navigation node to extend
* @param stdClass $course The course to object for the generator
* @param stdClass $context The context of the course
*/
-function local_feedbackchoicegenerator_extend_navigation_course($navigation, $course, $context) {
+function local_feedbackrankedchoicegenerator_extend_navigation_course($navigation, $course, $context) {
global $CFG;
$isactive = false;
- $isactive = $CFG->local_feedbackchoicegenerator_isactive;
+ $isactive = $CFG->local_feedbackrankedchoicegenerator_isactive;
if ($isactive) {
$page = $GLOBALS['PAGE'];
- $url = new moodle_url('/local/feedbackchoicegenerator/index.php', array('id' => $course->id));
+ $url = new moodle_url('/local/feedbackrankedchoicegenerator/index.php', array('id' => $course->id));
- $feedbackchoicegeneratornode = $page->navigation->find($course->id, navigation_node::TYPE_COURSE);
+ $feedbackrankedchoicegeneratornode = $page->navigation->find($course->id, navigation_node::TYPE_COURSE);
- $collection = $feedbackchoicegeneratornode->children;
+ $collection = $feedbackrankedchoicegeneratornode->children;
foreach ($collection->getIterator() as $child) {
$key = $child->key;
@@ -44,12 +44,12 @@ function local_feedbackchoicegenerator_extend_navigation_course($navigation, $co
}
}
- $node = $feedbackchoicegeneratornode->create(get_string('pluginname', 'local_feedbackchoicegenerator'),
- $url, navigation_node::NODETYPE_LEAF, null, 'feedbackchoicegenerator', new pix_icon('i/report', 'grades'));
- $feedbackchoicegeneratornode->add_node($node, $key);
+ $node = $feedbackrankedchoicegeneratornode->create(get_string('pluginname', 'local_feedbackrankedchoicegenerator'),
+ $url, navigation_node::NODETYPE_LEAF, null, 'feedbackrankedchoicegenerator', new pix_icon('i/report', 'grades'));
+ $feedbackrankedchoicegeneratornode->add_node($node, $key);
$navigation->add(
- get_string('pluginname', 'local_feedbackchoicegenerator'),
+ get_string('pluginname', 'local_feedbackrankedchoicegenerator'),
$url,
navigation_node::TYPE_SETTING,
null,
diff --git a/settings.php b/settings.php
index 1909dd1..b7e32a4 100644
--- a/settings.php
+++ b/settings.php
@@ -15,14 +15,14 @@
// along with Moodle. If not, see .
/**
- * @package local_feedbackchoicegenerator
+ * @package local_feedbackrankedchoicegenerator
* @copyright Andreas Schenkel
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
-$settings = new admin_settingpage( 'local_feedbackchoicegenerator', 'Feedbackchoice generator' );
+$settings = new admin_settingpage( 'local_feedbackrankedchoicegenerator', 'Feedback ranked choice generator' );
// Create
$ADMIN->add( 'localplugins', $settings );
@@ -31,34 +31,34 @@
if ($ADMIN->fulltree) {
$settings->add(new admin_setting_configcheckbox(
- 'local_feedbackchoicegenerator_isactive',
- get_string('isactive', 'local_feedbackchoicegenerator'),
- get_string('configisactive', 'local_feedbackchoicegenerator'),
+ 'local_feedbackrankedchoicegenerator_isactive',
+ get_string('isactive', 'local_feedbackrankedchoicegenerator'),
+ get_string('configisactive', 'local_feedbackrankedchoicegenerator'),
0
));
$settings->add(new admin_setting_configcheckbox(
- 'local_feedbackchoicegenerator_isallowedonfrontpage',
- get_string('isallowedonfrontpage', 'local_feedbackchoicegenerator'),
- get_string('configisallowedonfrontpage', 'local_feedbackchoicegenerator'),
+ 'local_feedbackrankedchoicegenerator_isallowedonfrontpage',
+ get_string('isallowedonfrontpage', 'local_feedbackrankedchoicegenerator'),
+ get_string('configisallowedonfrontpage', 'local_feedbackrankedchoicegenerator'),
0
));
$options = array(5 => '5', 10 => '10', 20 => '20', 30 => '30', 40 => '40', 50 => '50', 100 => '100', 200 => '200');
$settings->add(new admin_setting_configselect(
- 'local_feedbackchoicegenerator_maxlength',
- get_string('maxlength', 'local_feedbackchoicegenerator'),
- get_string('configmaxlength', 'local_feedbackchoicegenerator'),
+ 'local_feedbackrankedchoicegenerator_maxlength',
+ get_string('maxlength', 'local_feedbackrankedchoicegenerator'),
+ get_string('configmaxlength', 'local_feedbackrankedchoicegenerator'),
'40',
$options
));
$options = array(5 => '5', 10 => '10', 20 => '20', 30 => '30', 40 => '40', 50 => '50');
$settings->add(new admin_setting_configselect(
- 'local_feedbackchoicegenerator_maxoptionslength',
- get_string('maxoptionslength', 'local_feedbackchoicegenerator'),
- get_string('configmaxoptionslength', 'local_feedbackchoicegenerator'),
+ 'local_feedbackrankedchoicegenerator_maxoptionslength',
+ get_string('maxoptionslength', 'local_feedbackrankedchoicegenerator'),
+ get_string('configmaxoptionslength', 'local_feedbackrankedchoicegenerator'),
'30',
$options
));
diff --git a/styles.css b/styles.css
index 9dcb166..af69215 100644
--- a/styles.css
+++ b/styles.css
@@ -1,14 +1,14 @@
-#feedbackchoicegenerator {
+#feedbackrankedchoicegenerator {
background-color: rgb(223, 242, 247);
padding: 10px;
}
-#feedbackchoicegenerator h3 {
+#feedbackrankedchoicegenerator h3 {
padding: 10px;
background-color: rgb(35, 65, 163);
color: #fff;
}
-#feedbackchoicegenerator .row {
+#feedbackrankedchoicegenerator .row {
margin-left: 0;
}
diff --git a/templates/mainpage.mustache b/templates/mainpage.mustache
index 7794039..30df06e 100644
--- a/templates/mainpage.mustache
+++ b/templates/mainpage.mustache
@@ -1,10 +1,10 @@
{{!
- @template local_feedbackchoicegenerator/mainpage
+ @template local_feedbackrankedchoicegenerator/mainpage
}}
-{{backtocourselabel}}
-
-