New Release - Management & Reporting Now in Moodle

New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Number of replies: 48
Picture of Core developers Picture of Plugin developers Picture of Testers
Its been a long time coming, but I have just released a new version of the questionnaire module. This version begins the process of bringing the phpESP management and reporting features into Moodle. This version allows owners of questionnaires to edit the content of that questionnaire at any time. There is no need to use 'test', 'edit' and 'activate' modes any longer.

I have attached the README.TXT file here to describe the details. Here are the highlights:

Adding a questionnaire is now done from one interface. When you add the questionnaire to the course, you will be offered the option of creating a brand new one, copying an existing one or using a public one.

Viewing the results of the questionnaire can be done from the same screen as the questionnaire view. If you have the rights to view them, there will be a link at the top right of the screen.

There is now three types of questionnaires.
1. Private - the most commonly used type. A private questionnaire belongs to the course it was created in and cannot be accessed outside of that course. Topic Leaders can change the content of the questionnaire and view the results.

2. Template - A template questionnaire can be copied into any other course. This is an ideal way to provide complex questionnaires as a starting point. Template questionnaires cannot be used as questionnaires on their own.

3. Public - A public questionnaire can be assigned to any course. Once assigned, they cannot be edited outside of their originating course. Also, results of a public questionnaire are only available within the owning course. Public questionnaires are a great way of collecting data across multiple courses while keeping control in one place.

If you need to test a questionnaire before using it:
- create the one you want to test as a private questionnaire and keep the activity hidden.
- test and edit until you are comfortable.
- create a new questionnaire as a copy of the one you tested.
- unhide the new questionnaire.
- delete the original one.

The update procedure will walk through your exisiting questionnaire tables and set them accoring to the new type scheme.

Please try it out, and let me know your thoughts, problems, issues.

mike

Coming Next - Backup and restore.
Average of ratings: -
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Wicked! (as they say)  Great to hear this module is progressing!! approve cool
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Mark Stevens -
Very cool indeed.  We love your module and we'll be sure to test it and let you know.
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
Hi Mike, et al.

Thanks for doing the work to integrate this tool into Moodle. I had been looking at using phpESP separately, but this will make it more seamless for my users.

A question. I'm getting the same error (with this new version) that another user was having with an older version -- "questionnaire not yet available" or "survey does not exist".

Your suggestion to that person was that they be sure they had created and activated a survey *before* creating a questionnaire.

1. Is that still the case with this version?
2. When I try to do that, the phpesp admin interface does not respond.

I'd be happy to point you to the site in question, if you be willing to take a look at the behavior. I have a somewhat unusual hosting arrangement (host.domain.org, and not www.domain.org/directory/), which may be in play here.

Thanks again.

Jamie Folsom
In reply to J F

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Can you show me a screenshot of the questionnaire update screen?

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
Hi Mike,

Here's a zip file with three screenshots in it. If I click "continue" from the update page, fill out the edit survey form, and click "edit questions", I get the "survey does not exist" error. If I "save & return", then "save changes" (although there are none), I get the "questionnaire not yet available" error.

Thanks very much for your help!

Jamie
In reply to J F

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Upgrade you version. I just checked in a fix that should resolve this issue.

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
Hi Mike,

Installed the new version. Same trouble. Looking at the page source, on the
"adding new questionnaire" page, and on the "editing survey/questionnaire" page, I see what I think are some weird values for hidden form fields, if that info is at all helpful. sesskey="", and sid="0", in particular don't seem right.

Could session variables from Moodle, or from other php apps on the same server, be messing with the questionnaire sessions? Just a thought.

Also, the owner of a survey is always something like: "brighamcourses / [[]] ". Hmm.

Thanks.

Jamie Folsom
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
Switched to php4 -- that solved the problem. Sorry if that was explicitly documented. Was it?
In reply to J F

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
No, its not explicitly documented. But, I know with PHP 5, you need to have the 'register_long_arrays' directive set to 'on'. You may be fine with PHP 5 if you do that.

I have added this note to the 'readme'.

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
OK Thanks. Does that directive need to be set site-wide?
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Herbert Keijers -
Hi Mike,
Nice to read the progress of questionaire ! Great work !
I tried it right away ... , but ...
On the latest CVS developement code (2008021800) I get following sreenshot (debug on) wich results in general failure of :"A required parameter (sesskey) was missing"



Attachment enquete.png
In reply to Herbert Keijers

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
What version of Moodle are you using?
When do you get the 'sesskey' error?
You are showing the 'preview' screen. Do you get this error on the questionnaire view as well?

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Marc Dastous -

Mike, this module has come a long way!!  I added it to my 1.5Dev test server and got the same problems.  The issue that I noticed right off, in my dbase, that the Owner of the survey does not match the actual user.  Therefore, I get an error when I try to add questions that says:

"You must be a survey owner to perform this operation."

I am logged in as the Admin, so it should be automatic.

Also, I had some old questionnaires in the dbase and when I tried to access them I got the "Sesskey" error.  I "blew-up" those questionnaires thinking I might need to start fresh, but that didn't work either.  Oh well big grin

Great integration though, I can't wait until we troubleshoot this one clean!!!

Marc

Attachment sample.jpg
In reply to Marc Dastous

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
I'm pretty sure I've fixed the 'survey owner' problem. I haven't tried this on 1.5 yet, so the sesskey issue may be specific to that. I will check it under 1.5.

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
The sesskey was indeed specific to 1.5. It has now been fixed as is the warnings on preview.

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Marc Dastous -

Mike;

Sesskey problem in 1.5DEV gone.  I am now able to create a questionnaire.  However, with the settings below, I get a "You are not eligible to take this questionnaire" error that is left justified.

I got the code straight from CVS.

Marc

Attachment questionnaire.jpg
In reply to Marc Dastous

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
The 'not eligible' message is only displayed if the questionnaire is set to 'student' and you aren't one, or set to 'teacher' and you aren't one. If it is set to 'all'. which is what you are showing here, then you are always eligible.

I've double checked the code, and that is the only way to get that message. I can't explain this.

Can you see if your 'questionnaire' table has a 'resp_eligible' field, and that it is set to 'all'?

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Marc Dastous -

Here is a screen shot of the questionnaire table.

Marc

Attachment questionnaire.jpg
In reply to Marc Dastous

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Well, see, that's a problem. Your table is missing the 'resp_eligible' field. You're also missing 'opendate' and 'closedate'.

I'm not sure how, but somehow you've updated the module without it getting updated in the database.

Did you install this new, or upgrade from a previous version?

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Marc Dastous -

I got it straight from CVS contrib.

Marc

In reply to Marc Dastous

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Yes, but was it a new install or were you updating an older version?

mike
In reply to Marc Dastous

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
I tested both an upgrade from older versions and a new install. Both set up the data tables properly.

If this was an upgrade, did you remember to visit the 'admin' page after installing the module?

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Marc Dastous -

It was an upgrade.  Yes I did visit the Admin page.  Yes it showed that the tables were upgraded.

So I "blew up" the existing installation of the module and started over.  Everything seems to work fine now.  I'll let you know if I find anything else.

Marc

In reply to Marc Dastous

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Thanks Marc. I can't explain what happened.
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
Hi Mike,

I am still getting the error described in this post: "You must be a survey owner to perform this operation" when I try to create a questionnaire from a template.

Everything else seems to be working fine. I'm logged in as an admin.

My installed version is identical to the CVS version. Any thoughts on why this might be?

[Edited to include this:] Incidentally, even though it gives me an error, the module does create a questionnaire, called "whatever_the_template_was_called_copy", but it's a template, too, not whatever I asked for, such as a public or private survey.

Thanks.

Jamie
In reply to J F

Re: New Release - Management & Reporting Now in Moodle

by Leonhard Küllinger -
Fine,

backup seems to work. On the other moodle i can handle also the questionaire. Bravo

nice greetings from austria
Leo
In reply to J F

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hmmm. Can you details the steps you are taking, what you are seeing and when exactly the error occurs?

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
Hi Mike,

Thanks for replying. The steps:

1. Create a complete questionnaire, of type template.
2. Choose "add an activity > questionnaire" from the course topic block pull-down.
3. Fill in the new questionnaire form, including:
a. Selecting public/private from type pull down
b. From "copy existing" area, selecting the template created above.
c. clicking continue.
4. Error page reports "you must be survey owner for this operation".

The module creates a copy of the survey despite the error, which you see if/when you repeat steps 2 and 3. And it's a template as well. It can be tweaked manually in the database, but that's not ideal.

Let me know if I can shed further light on this.

Thanks

Jamie
In reply to J F

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
I just ran tests on several installations, and they all worked doing what you are doing. The only think I can figure is that you aren't actually running the latest version.

Double check to make sure that the file  'mod/questionnaire/phpESP/admin/include/function/survey_update.php' has this in the first line:
    # $Id: survey_update.inc,v 1.3 2005/02/21 02:44:48 mchurch Exp $

If not, you aren't running the latest of this file - the one that fixed the bug you are seeing.

Also, when you updated, you finished the install by going to the admin page, right?

mike

In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Leonhard Küllinger -
Hi Mike,
Backup works fine, great thing you did.
Only one error i saw with Umlauts. Ä, Ö are not shown correct after restore.

nice greetings from austria

Leo
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
Yeah -- I have diffed my installed files against the current cvs version, and they're identical, and I went to the admin page post install.

Part of my confusion comes from a quirk in the interface on the "define content" section of the questionnaire editing page. There are three options:

1. create new (start from scratch)
2. copy existing (only templates should appear here, correct?)
3. use public (selecting this will make an existing survey appear in a course)

But the radio buttons for these three options are not mutually exclusive (one from each of the three areas can be checked at the same time). It is not clear why the wording says: create new -OR- copy existing -OR- use public, if you can select all of them

Do you see what I mean? Shouldn't any selection deselect all other selections?

Thanks.

Jamie
In reply to J F

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Yes, the radio buttons need a javascript fix. If 'create new' is selected, and nothing else, then it creates new. If copy existing, is selected, it uses that and it overides the 'create new'. If 'use public' is selected, it uses that and it overrides the other two.

I will try to get some better script in there to make that more obvious.

Does any of this explain your problem though?

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
Hi Mike.

I guess, in addition my confusion about the behavior of the interface, I don't understand the *intent* of the interface. My assumption is as follows (please correct me if I'm wrong):

I select "add activity" from the topic block and I get the edit questionnaire page (seems somewhat ill-named, I think, since I can do several things here: edit, copy, create, view, etc. although the only cue to that effect is that the submit button text changes in different contexts).

I am then presented with the following options:

1. If I want to show an existing questionnaire (all responses from all courses/topics stored together) I can "use existing". If I then edit questions, those edits show up wherever that questionnaire activity has been added to any course.

2. If I want to create a new questionnaire, I can:
a. "Create new" (start from scratch). New questionnaire, new questions, new answers.
b. "Copy existing" (duplicate all MySQL records associated with an existing questionnaire, incrementing the id's). I see both templates and public surveys in this block.

Some questions pose themselves: if I choose to copy a template, the copy should not, by default, *be* a template, right? Also, If I can copy a public survey, why does the template type exist at all? Is it so that it's not visible until copied?

The columns in the questionnaire_survey table don't clear it up: 'public', 'owner', 'realm', 'status' all would seem to affect and relate to visibility, editability, type, etc.

Sorry if this is sort of rambling; I hope it doesn't seem unduly critical. I am happy to help however I can, if at all.

Thanks for all your help, past and present.

Jamie
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
Hi Mike,

I thought I would share the contents of this table, because I think it may shed some light on my problem, at the least, and perhaps those of others as well. The multiple copies of questionnaires were created by users trying to make a questionnaire based on a template.

I realize some of the flow of creating, and editing activities (of type questionnaire, in this case) is likely defined in the structure of Moodle, and that I am new enough to the tool not to know where the lines are drawn.

One thing I don't understand, is why some surveys are owned by 'root'; when changed manually to the id of an admin user, editing options that weren't possible (but should have been) become available.

Is this how it's supposed to work? Thanks.

Jamie

mysql> select id, name, owner, public, status, realm from questionnaire_survey;
+----+-----------------------------------------+-------+--------+--------+----------+
| id | name                                    | owner | public | status | realm    |
+----+-----------------------------------------+-------+--------+--------+----------+
|  6 | Abdomen_CT_Answer_Sheet                 | 2     | Y      |      1 | public   |
|  7 | PDRE_Survey                             | 6     | Y      |      1 | private  |
|  8 | RadCME_Brochure_Request_Form            | 8     | Y      |      1 | public   |
|  9 | RadCME_Brochure_Request_Form_copy       | root  | Y      |      1 | public   |
| 10 | Clinical_Competency_Evaluation          | 9     | Y      |      0 | template |
| 11 | Professionalism_Evaluation              | 9     | Y      |      0 | template |
| 38 | Suggestions_for_CME_Surveys             | 8     | Y      |      1 | public   |
| 28 | Professionalism_Evaluation_copy         | 9     | Y      |      1 | public   |
| 26 | Protocol_Help_Sheet                     | 10    | Y      |      1 | public   |
| 24 | RadCME_Brochure_Request_Form_copy3      | root  | Y      |      0 | public   |
| 25 | RadCME_Brochure_Request_Form_copy4      | root  | Y      |      0 | public   |
| 22 | RadCME_Brochure_Request_Form_copy1      | root  | Y      |      0 | public   |
| 23 | RadCME_Brochure_Request_Form_copy2      | root  | Y      |      0 | public   |
| 29 | Professionalism_Evaluation_copy1        | root  | Y      |      0 | template |
| 30 | Professionalism_Evaluation_copy1_copy   | root  | Y      |      0 | template |
| 31 | First_Year_Performance_Evaluation       | 9     | Y      |      1 | template |
| 32 | Second_Year_Performance_Evaluation_copy | 9     | Y      |      1 | private  |
| 34 | Student_Self_Evaluation_copy            | 9     | Y      |      1 | public   |
| 33 | Student_Self_Evaluation                 | 9     | Y      |      0 | template |
| 35 | RadCME_Course_Survey_Form_copy          | root  | Y      |      0 | private  |
| 36 | RadCME_Course_Survey_Form_copy1         | root  | Y      |      0 | private  |
| 37 | RadCME_Course_Survey_Form_copy2         | root  | Y      |      0 | private  |
| 39 | Bone_Answer_Sheet                       | 2     | Y      |      1 | public   |
+----+-----------------------------------------+-------+--------+--------+----------+
23 rows in set (0.01 sec)

In reply to J F

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hi Jamie -

Sorry its taken so long to get back to you... I'm going to answer both of your last posts at once.

First off, the questionnaire module is based on phpESP, an Open Source survey tool. Most of the table structures are phpESP's and are thus inherited. I took this tool and made it work with Moodle. To do this, I took some liberties with the meanings of several of the fields.

There are three 'types' of questionnaires you can create:
1) Private - a standard Moodle activity. The questionnaire and its results are only available within the defining course.
2) Public - this instance of the questionnaire can be used in other courses. Its results can be seen only within the defining course.
3) Template - this instance of the questionnaire cannot be used at all, except to be copied to another questionnaire. Any course can copy this instance.

When you create a questionnaire, you can create any one of these three types, and you can can create them in three different ways.
1) Create new - start from scratch and use the phpESP interface to add a new questionnaire and its questions.
2) Copy existing - copy an existing questionnaire into a new instance and use it as is, or change it as needed. You can copy any questionnaire owned by the defining course and any template questionnaire in other courses.
3) Use public - in this case, you cannot do anything else with the questionnaire. You are assigining an instance of a public questionnaire to this activity. Your participants will be able to fill out the questionnaire, but only the teachers of the defining course will be able to see the results.

As to your next set of questions, with the update to the module, I changed the way the 'owner' field is used. The 'ower' field is a phpESP field that doesn't have a direct Moodle translation. It used to be owner by 'root', which was the phpESP admin account, and any Moodle administrator would have full pivileges. Now, it contains the id of the course that created it. When you do an upgrade, a script is run that updates all existing questionnaires and assigns them a course owner. You should not manually change these fields unless you know what you are doing.

Similarly, the 'realm' field is a phpESP construct that implements designer groups in phpESP. I now use that field to distinguish between 'private', 'public' and 'template'.

Hope this helps.

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by J F -
Hi Mike,

This is very helpful. Thanks.

Two quick things.

First, If you check out the table I pasted into my message above, you'll see that several of the questionnaires have 'root' as their owner. From what you described, that shouldn't be the case. It's questionnaires that were created by copying an existing template.

Second, when you say 'instance', is that a new set of database records for all of the pieces of the puzzle, or just a new pointer of some kind?

Your help is much appreciated.

Jamie
In reply to J F

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
The ones that are showing up as 'root', are not active. They have a '0' status which means they were being edited. The upgrade process could not find an owner for them as they would have had no associated course questionnaire activity.

By instance, I mean one, specific occurrence of a questionnaire. For private and template questionnaires, each questionnaire has exactly one instance of a phpESP survey.

For all questionnaires using the same public questionnaire, there is only one instance if the phpESP survey, and each one accesses it.

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Leonhard Küllinger -
Great,
i will test it in the next week, we have skiing holidayscool

yeah


power on moodle
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
If you uploaded the new version, please upgrade again. I have fixed an issue which was resulting in improper owners being assigned with new questionnaires.

This should resolve the 'You must be a survey owner to perform this operation' errors that were occurring.

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Aktas Bagira -

We work with Moodle 1.4.1

I tried now to install Questionary Module 1.2 version. I got the same answer: 'You must be a survey owner to perform this operation

In reply to Aktas Bagira

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Did you get the latest straight from CVS? The fix was just checked in recently.

If you have the most recent version, the file 'mod/questionnaire/phpESP/admin/include/function/survey_update.php' will have this in the first line:
    # $Id: survey_update.inc,v 1.3 2005/02/21 02:44:48 mchurch Exp $

Please verify that this is so.

mike

In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Herbert Keijers -
I see you changed (mod.htm) and put function (survey_update.inc).
The error I reported earlier seems to be solved.

Just played around a little bit and have a question:
Is it possible to view which student answered the serie of questions apart from looking it up in the cvs file ? (I tried private and public)

Thanks for your nice implementation of phpESP !
In reply to Herbert Keijers

Re: New Release - Management & Reporting Now in Moodle

by Herbert Keijers -
cvs file should be csv file, sorry ...
In reply to Herbert Keijers

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
If you have selected 'fullname' as the respondent type, then the name is stored with the response - which at this point, you can only see in the CSV.

I will look into adding that data somewhere in the interface as well.

mike
In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by W Page -
Hi Mike C!

Thanks!!

WP1

In reply to Mike Churchward

Re: New Release - Management & Reporting Now in Moodle

by Marc Dastous -

Hey Mike;

Anyway we can get a space between results on the page below?

Marc

Attachment questionnaire.jpg
In reply to Marc Dastous

Re: New Release - Management & Reporting Now in Moodle

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
At some point I plan to overhaul the display functions. In the meantime, you can always edit 'results.inc' and change the display to your tastes.

mike