MDL-53738 feedback: enable mod and block by default

This commit is contained in:
Marina Glancy 2016-04-07 16:47:19 +08:00
parent 6bd3ab0717
commit aeeeb78847
16 changed files with 4 additions and 280 deletions

View file

@ -4,11 +4,6 @@ Feature: Block activity modules
As a manager As a manager
I can add activities block in a course or on the frontpage I can add activities block in a course or on the frontpage
Background:
Given I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "//a[@title=\"Show\"]" "xpath_element" in the "Feedback" "table_row"
Scenario: Add activities block on the frontpage Scenario: Add activities block on the frontpage
Given the following "activities" exist: Given the following "activities" exist:
| activity | name | intro | course | idnumber | | activity | name | intro | course | idnumber |
@ -34,8 +29,9 @@ Feature: Block activity modules
| wiki | Frontpage wiki name | Frontpage wiki description | Acceptance test site | wiki0 | | wiki | Frontpage wiki name | Frontpage wiki description | Acceptance test site | wiki0 |
| workshop | Frontpage workshop name | Frontpage workshop description | Acceptance test site | workshop0 | | workshop | Frontpage workshop name | Frontpage workshop description | Acceptance test site | workshop0 |
When I log in as "admin"
And I am on site homepage And I am on site homepage
When I follow "Turn editing on" And I follow "Turn editing on"
And I add the "Activities" block And I add the "Activities" block
And I click on "Assignments" "link" in the "Activities" "block" And I click on "Assignments" "link" in the "Activities" "block"
Then I should see "Frontpage assignment name" Then I should see "Frontpage assignment name"
@ -112,7 +108,8 @@ Feature: Block activity modules
| wiki | Test wiki name | Test wiki description | C1 | wiki1 | | wiki | Test wiki name | Test wiki description | C1 | wiki1 |
| workshop | Test workshop name | Test workshop description | C1 | workshop1 | | workshop | Test workshop name | Test workshop description | C1 | workshop1 |
When I follow "Courses" When I log in as "admin"
And I follow "Courses"
And I follow "Course 1" And I follow "Course 1"
And I turn editing mode on And I turn editing mode on
And I add the "Activities" block And I add the "Activities" block

View file

@ -22,11 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
if (is_file($CFG->dirroot.'/mod/feedback/lib.php')) {
require_once($CFG->dirroot.'/mod/feedback/lib.php');
define('FEEDBACK_BLOCK_LIB_IS_OK', true);
}
class block_feedback extends block_list { class block_feedback extends block_list {
function init() { function init() {
@ -49,11 +44,6 @@ class block_feedback extends block_list {
$this->content->icons = array(); $this->content->icons = array();
$this->content->footer = ''; $this->content->footer = '';
if (!defined('FEEDBACK_BLOCK_LIB_IS_OK')) {
$this->content->items = array(get_string('missing_feedback_module', 'block_feedback'));
return $this->content;
}
$courseid = $this->page->course->id; $courseid = $this->page->course->id;
if ($courseid <= 0) { if ($courseid <= 0) {
$courseid = SITEID; $courseid = SITEID;

View file

@ -25,8 +25,5 @@
function xmldb_block_feedback_install() { function xmldb_block_feedback_install() {
global $DB; global $DB;
/// Disable this block by default (because Feedback is not technically part of 2.0)
$DB->set_field('block', 'visible', 0, array('name'=>'feedback'));
} }

View file

@ -24,5 +24,4 @@
$string['feedback'] = 'Feedback'; $string['feedback'] = 'Feedback';
$string['feedback:addinstance'] = 'Add a new feedback block'; $string['feedback:addinstance'] = 'Add a new feedback block';
$string['missing_feedback_module'] = 'This blocks relies on the Feedback activity module, but that module is not present!';
$string['pluginname'] = 'Feedback'; $string['pluginname'] = 'Feedback';

View file

@ -1,212 +0,0 @@
Feedback-Module
===============
Overview
--------
The Feedback-Module is intended to create individual surveys in an easy way.
This module consists of two parts
a) the "activity" feedback (required)
b) the "sideblock" feedback (optional)
The activity is the main part an can run without the block. Here you can create, fill out or analyse the surveys.
The sideblock is an optional part. It works as a bridge between different courses and
an central placed feedback-activity. So you can create one feedback on the main site of moodle and then publish
it in many courses.
Requirements
------------
Moodle 1.9 or later
Installation
------------
The zip-archive includes the same directory hierarchy as moodle
So you only have to copy the files to the correspondent place.
copy the folder feedback.zip/mod/feedback --> moodle/mod/feedback
and the folder feedback.zip/blocks/feedback --> moodle/blocks/feedback
The langfiles normaly can be left into the folder mod/feedback/lang.
The only exception is the feedback-block. The langfile is block_feedback.php and
have to be copied into the correspondent lang folder of moodle/moodledata.
All languages should be encoded with utf8.
After it you have to run the admin-page of moodle (http://your-moodle-site/admin)
in your browser. You have to loged in as admin before.
The installation process will be displayed on the screen.
That's all.
using the block-feature
-----------------------
1. create one or more new feedback-activitys on the moodle main-site
2. go into some course and enable the feedback-block. This block now shows the feedbacks from the main-site.
3. login as student and go into the course where the feedback-block is enabled
4. fill out the feedback chosen from block
5. login as admin and look at the feedback you created above
6. now you can analyse the answers over the courses
good luck
CHANGELOG
=========
04.04.2008
- the heading has not supported multilang strings
03.04.2008
- anonymous feedback was send the userid on email-notification
(http://tracker.moodle.org/browse/CONTRIB-355)
- users can not see the own values if there are chars like single-(') or doublequotas (")
08.03.2008
- admin users now respect capability-setting
(http://tracker.moodle.org/browse/CONTRIB-321)
17.12.2007
- resolved issue http://tracker.moodle.org/browse/CONTRIB-231
03.12.2007
- changing the table feedback_template, field public -> ispublic, public is reserved in oracle
- resolved issue http://tracker.moodle.org/browse/CONTRIB-95
16.09.2007
- changing access.php, removed the lines with coursecreator, added some RISK_xxx
- removed the check of legacy roles on has_capability()
- coursesearch now use unicode characters
13.09.2007
- updated edit.php to make the output more xhtml 1.0 strict like
11.09.2007
- Update feedback settings has help showing wrongly
- Menu on "Add question to activity" should be sorted alphabetically
- missing "Add Pagebreak" is now at the item-list
- no hardcoded css
- use new print_header() (note it only is available on moodle 1.9!!!)
- missing sesskey checks in feedback
- uninitialised $filename when importing into feedback
31.07.2007
- fixed bug with missing numbers after xml Question-Import.
29.07.2007
- added "require_course_login()" in view.php
- added missing langstring "no_itemname"
25.07.2007
- now defined in applicable_formats() to hide the block in moodle My-Site
07.07.2007
- all functions in lib.php now are with comments in phpdoc-style
- removed all depricated function-calls
- some code-styling changes (http://docs.moodle.org/en/Coding)
06.07.2007
- Adding some missing lang-strings
- fixing some notice-messages with $SESSION-lstgroupid
- excelexport now uses the localwincharset from langconfig.php
Now it is possible to export excel with utf8. But to many data will crash the excel
file. If the excefile crashes so you switch to latin-export in lang-settings
- adding the default permission CAP_ALLOW to the legacy-role:user for the capabilities view and complete
24.06.2007
- fixed excel-problem with tempfiles
- added new field "idnumber" into excel detailed report
21.06.2007
- better support for xhtml
09.05.2007
- items now are classes
- most of forms use formslib
- gui now uses tabs
- new item "captcha"
Now it only runs on Moodle 1.8 or later
09.05.2007
- added two columns (random_response,anonymous_response) to feedback_complete and feedback_complete_tmp
- userids now will be logged even if the feedback is anonymous so you now can filter by group
- excelexport now use pear so cell-values can be greater then 255 chars
- logs now include the cm->id
16.01.2007
- the installation now uses the install.xml
- roles are full implemented
- now radiobuttons and checkboxes can be aligned horizontally or vertically
- now you can insert pagebreakes
- a feedback what is switch to the next page is saved temporary.
the user can cancel the completion and later continue at the last filled page.
- now you can ex-/import feedbacks into/from a xml-file
- course-reseting is supported
01.01.2007
happy new year!
14.09.2006 21:22
improve the layout of analysis (thanks to Katja Krueger)
02.06.2006 21:22
several bugfixes
improve the block "feedback"
20.05.2006 01:00
adding the block "feedback" to publish feedback over all courses
Thanks to Jun Yamog!
21.04.2006 16:00
version 2006042102
adding moving behavior like moodle activities
adding a dropdownlist on create/update item page to adjust the position
21.04.2006 16:00
version 2006042101
prefixed all function-names like "feedback_"
fixed security issues (e.g. optional_variable() >> optional_param())
improve group-feature
03.01.2006 16:00
Added "addslashes" and "stripslashes_safe" for preserving (')
03.10.2005 13:00
action handling error recovery improved (failed when debug=false)
function feedback_action_handler() argument list changed
added action handler debug modes: silent, normal, verbose
30.09.2005 00:00
version 2005300900
action handling functions added
picture item (an example for action handling added)
XHTML compliance improved
number of PHP Notify-level errors reduced
source code transferred to CVS
14.09.2005 00:20
fixed problem with restoring
new feature user-tracking (prevent multiple_submit)
new feature deleting of some completeds
22.08.2005 19:12
fixed problem with secureforms-option
16.08.2005 14:07
fixed html-syntax in edit.php
12.08.2005 21:38
fixed problem with IE
If feedback is not anonym now guest is it not allowed to fill it out
11.08.2005 22:00
added email-notification
anonymous feedbacks can be filled out by anonymous users
03.08.2005 01:20
item specific functions were moved into the items-librarys
now developers can create individual feedback-items
javascript based filling-control was replaced by php-based control
version = 2005072000
20.07.2005 01:09
adding group-ability
fixed missing bcmod()-Function-Problem
fixed referer-problem under https

View file

@ -1,6 +0,0 @@
- items use formslib
- structured Numbering and switching visible or not
- printview
- css
- the email displays the completed feedback
-

View file

@ -17,7 +17,4 @@
function xmldb_feedback_install() { function xmldb_feedback_install() {
global $DB; global $DB;
/// Disable this module by default (because it's not technically part of Moodle 2.0)
$DB->set_field('modules', 'visible', 0, array('name'=>'feedback'));
} }

View file

@ -22,10 +22,6 @@ Feature: Anonymous feedback
And the following "system role assigns" exist: And the following "system role assigns" exist:
| user | course | role | | user | course | role |
| manager | Acceptance test site | manager | | manager | Acceptance test site | manager |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
And I log out
And the following "activities" exist: And the following "activities" exist:
| activity | name | course | idnumber | anonymous | publish_stats | | activity | name | course | idnumber | anonymous | publish_stats |
| feedback | Site feedback | Acceptance test site | feedback0 | 1 | 1 | | feedback | Site feedback | Acceptance test site | feedback0 | 1 | 1 |

View file

@ -30,12 +30,6 @@ Feature: Mapping courses in a feedback
And the following "system role assigns" exist: And the following "system role assigns" exist:
| user | course | role | | user | course | role |
| manager | Acceptance test site | manager | | manager | Acceptance test site | manager |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
And I navigate to "Manage blocks" node in "Site administration > Plugins > Blocks"
And I click on "Show" "link" in the "Feedback" "table_row"
And I log out
And the following "activities" exist: And the following "activities" exist:
| activity | name | course | idnumber | anonymous | publish_stats | | activity | name | course | idnumber | anonymous | publish_stats |
| feedback | Course feedback | Acceptance test site | feedback0 | 1 | 1 | | feedback | Course feedback | Acceptance test site | feedback0 | 1 | 1 |

View file

@ -16,10 +16,6 @@ Feature: Exporting and importing feedbacks
| user | course | role | | user | course | role |
| teacher | C1 | editingteacher | | teacher | C1 | editingteacher |
| teacher | C1 | editingteacher | | teacher | C1 | editingteacher |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
And I log out
And the following "activities" exist: And the following "activities" exist:
| activity | name | course | idnumber | | activity | name | course | idnumber |
| feedback | Learning experience | C1 | feedback0 | | feedback | Learning experience | C1 | feedback0 |

View file

@ -45,10 +45,6 @@ Feature: Feedbacks in courses with groups
And the following "system role assigns" exist: And the following "system role assigns" exist:
| user | course | role | | user | course | role |
| manager | Acceptance test site | manager | | manager | Acceptance test site | manager |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
And I log out
And the following "activities" exist: And the following "activities" exist:
| activity | name | course | idnumber | anonymous | publish_stats | groupmode | | activity | name | course | idnumber | anonymous | publish_stats | groupmode |
| feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 | 1 | | feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 | 1 |

View file

@ -18,10 +18,6 @@ Feature: Testing multichoice questions in feedback
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
And I log out
And the following "activities" exist: And the following "activities" exist:
| activity | name | course | idnumber | | activity | name | course | idnumber |
| feedback | Learning experience | C1 | feedback0 | | feedback | Learning experience | C1 | feedback0 |

View file

@ -22,10 +22,6 @@ Feature: Non anonymous feedback
And the following "system role assigns" exist: And the following "system role assigns" exist:
| user | course | role | | user | course | role |
| manager | Acceptance test site | manager | | manager | Acceptance test site | manager |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
And I log out
And the following "activities" exist: And the following "activities" exist:
| activity | name | course | idnumber | anonymous | publish_stats | | activity | name | course | idnumber | anonymous | publish_stats |
| feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 | | feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 |

View file

@ -18,10 +18,6 @@ Feature: Test creating different types of feedback questions
| teacher1 | C1 | editingteacher | | teacher1 | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
And I log out
And the following "activities" exist: And the following "activities" exist:
| activity | name | course | idnumber | | activity | name | course | idnumber |
| feedback | Learning experience | C1 | feedback0 | | feedback | Learning experience | C1 | feedback0 |

View file

@ -33,10 +33,6 @@ Feature: Show users who have not responded to the feedback survey
And the following "grouping groups" exist: And the following "grouping groups" exist:
| grouping | group | | grouping | group |
| GXI1 | GI1 | | GXI1 | GI1 |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
And I log out
@javascript @javascript
Scenario: See users who have not responded Scenario: See users who have not responded

View file

@ -20,10 +20,6 @@ Feature: Saving, using and deleting feedback templates
And the following "system role assigns" exist: And the following "system role assigns" exist:
| user | course | role | | user | course | role |
| manager | Acceptance test site | manager | | manager | Acceptance test site | manager |
And I log in as "admin"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "Show" "link" in the "Feedback" "table_row"
And I log out
And the following "activities" exist: And the following "activities" exist:
| activity | name | course | idnumber | | activity | name | course | idnumber |
| feedback | Learning experience course 1 | C1 | feedback1 | | feedback | Learning experience course 1 | C1 | feedback1 |