Question creation activity

Question creation activity

von Jean-Michel Védrine -
Anzahl Antworten: 34

Hello,

Back in 2008, Jamie Pratt created the Question creation Activity for Moodle 1.9 (qcreate) with funding from Future University Hakodate http://www.fun.ac.jp/e/
The module was originally conceived and partially designed by Peter Ruthven-Stuart (http://www.ruthven-stuart.org) from Future University - Hakodate. You can learn about it here and here.

The idea is very simple : students create questions and you grade them lächelnd

Since the begining I found it a marvellous idea (it's so Moodle said Marcus Green), so I was sad when I updated to Moodle 2.x to have to say goodbye to that activity.

I was pleased to see that people from GTN Gmbh (global training network ltd. - http://gtn-solutions.com,
http://www.exabis.at) have done a lot of work to update the code to Moodle 2.x, but unfortunately more work was needed to have a finished version.

This Summer I needed a new project for my holidays so I decided my goal was to have a working version for the beginning of the next academic year.

Today I made available a first version of the Question Creation activity for Moodle 2.7 (sorry it will not work with previous versions as it uses several new features of Moodle 2.7). I will submit it to the Moodle plugins Directory as I have Jamie's and Gtn approvals to do so, but you can already find it on my Github repository.

It started as a plan to simply make it working but slowly changed to an exercise on "How to code an activity module for Moodle" because in fact it was the first time I was working on a module (most of my work have been on question types, the question bank and question import formats) so I made a lot more changes than expected.

  • Migrated the code to a more OOP structure defining a class for most qcreate operations
  • Move display to renderers (not finished, the student view is using renderers but not the teacher view)
  • Use "fun" new features of Moodle 2.7 : scheduled tasks, new logging system, ...
Of course with a commit of more than 7000 lines of code it's totally impossible I didn't introduced bugs, so please test if you plan to use it with your students. But as I will also use it (I will meet my new students in a week from now) I will certainly find bugs too and release corrections.
From the user side there is not so much new features
  • activity completion with a fixed number of created questions
  • optional notifications for the teachers of new created questions
  • optional notifications for the students of new graded questions
  • scheduled tasks for synchronisation of students capacities on questions and for grades updates (as it is written in the 1.9 version docs you must absolutely have a cron working to use this module)
And now the big question: What next ?
I think we really miss a kind of peer to peer action in this activity: once students have created questions it would be nice if they could test the other student's questions and give some kind of feedback.
I don't intend to do a full "question workshop"activity with the complexity of the workshop module, I think we should keep it simple, but I would welcome comments from the Community before starting to design this.
PS: if you find bugs in this version of the Question Creation activity, please create an issue in the tracker it will be easier for me to manage things that way.
Mittelwert:Useful (7)
Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Toni Soto -

Thanks a lot Jean-Michel, 

I've never tested the 1.9 version but I'll test and hopefully use your version as soon as it will be accepted in the plugin repository. I also see high potential in use it as a learning activity. 

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Jean-Michel Védrine -

I am pleased to announce that the Question creation activity is now available in the Moodle Plugins directory at https://moodle.org/plugins/view.php?plugin=mod_qcreate

This plugin is compatible with Moodle 2.7 and 2.8, it will not work with previous versions of Moodle.

Very important warning (I already wrote that in the docs but I think this is not enough so I will say it again here) you must absolutely have the Moodle cron running at regular and short intervals, if this is not the case, students will will not be able to write questions when the activity open.

You can post bugs and improvements suggestions in the tracker.

I started some documentation, but you are welcome to improve it.


Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Marcus Green -
Nutzerbild von Core developers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers Nutzerbild von Testers

I think we should have a "Social Constructivist" badge to award for work like this. Well done Jean Michel.

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Jean-Michel Védrine -

Hello,

Just a short note that I was forced to release version 2.02 of the Question creation activity because I made a silly mistake in the backup code: I wrote the same line twice!

This unfortunately make all backups of course where there is a question creation activity to fail, so I urge all users having installed versions 2.0 and 2.01 to upgrade to 2.02 version ASAP.

Many thanks to Renaat Debleu for reporting this problem in CONTRIB-5419. Sorry for any inconvenience this may have caused. Quite comically I forgot to upgrade my own production website and was worried that some of my backups were failing ... until I realized today that they were all the courses where I have question creation activities  lächelnd

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Jean-Michel Védrine -

Today there is a new release of the question creation activity.

This was needed because when I upgraded this activity module to support Moodle recent versions in January 2018, I made some silly mistakes in the code and (my bad) I didn't added automated tests to verify that these new functions were working as expected.

Unfortunately one of these bugs could cause the cron to stop working, but fortunately Robert Schrenk reported the problem.

Sorry for all users this may have caused inconveniences.

The 20180515 version should solve this problem and fix some other bugs in calendar event management.

It also include more automated tests to verify all these new functions are working as expected.

I take the opportunity to underline that now as I am retired I can only rely on bug reports (and automated tests) to find bugs in my plugins because I am no more using them. So don't hesitate to report a bug or problem if you want that I fix it !

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Miro Iliaš -

Dear Jean-Michell,

thanks for your marvelous module.

Some questions (maybe hints for the further improvement):

a) Student see only his own questions and total grade of each of one. With the aim to pass him the teacher's feedback of question evaluation/grading, could the student please see the grading comment window ? With delivered feedback he could continually improve his questions.

b) When there is a lot of students in the course, who create a lot of questions,  grading of all of them by teacher becomes  time-consuming.  I am thinking  if it would be possible to include other ("referee") students into question evaluation and grading. But this feature would require  more programming work.  


Yours, Miro



Als Antwort auf Miro Iliaš

Re: Question creation activity

von Jean-Michel Védrine -

Hello Miro,

Thanks for your nice comments. Kudos to Peter and Jamie for creating this activity for Moodle 1.9.

a) I was quite sure students could see teacher comments, maybe I have broken something or the documentation is not clear ?

b) This is already possible : just give to the people you want to be able to grade a qcreate activity the mod/qcreate:grade capability. A lot of things in Moodle are controlled by capabilities and this is a powerful feature. By default teachers (both editing and non editing teachers) already have the mod/qcreate:grade capability.

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity / student can not see feedback

von Miro Iliaš -

Dear Jean-Michel,

I checked the documentation and setting through, but on Moodle 2.8 student can not see teacher's feedback, see the attachement - student view.

Teacher's view is here.


Als Antwort auf Miro Iliaš

Re: Question creation activity / student can not see feedback

von Jean-Michel Védrine -

Hello Miro,

Your screenshot shows that the teacher comment is displayed between double quotes en in italics after each question as I expected lächelnd

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Osm YILDIZ -

Hello Jean-Michel

I have installed this plug-in and thank you for this module. Miro asked two question. I have interested in second one. I have read your answer but I did not understand how can I distribute rights students to grade questions.  Is it possible that A student creates a question and the other students can grade this question. If it is possible please say me how can I set step by step.

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Alex Contis -

Hello Jean-Michel,


Thank you for this useful activity! I've got it working except for the export to Gift format


When i select in the Administration block "Export Good" using "File format" "Gift format" it shows the error:


Warning: require_once(/var/www/sites/some.site.se/moodle283/question/format/$fromform->format/format.php): failed to open stream: No such file or directory in /var/www/sites/some.site.se/moodle283/mod/qcreate/exportgood.php on line 94


Fatal error: require_once(): Failed opening required '/var/www/sites/some.site.se/moodle283/question/format/$fromform->format/format.php' (include_path='/var/www/sites/some.site.se/moodle283/lib/zend:/var/www/sites/some.site.se/moodle283/lib/pear:.:/usr/share/php:/usr/share/pear') in /var/www/sites/some.site.se/moodle283/mod/qcreate/exportgood.php on line 94


The version of qcreate is 


Question creation
mod_qcreate
Additional20140825042.02 for Moodle 2.7E

running Moodle2.8.3+ (Build: 20150225) on Ubuntu 14.04LTS using MySQL

I appreciate any hint to get the Gift format export working!


Regards
Alex Contis

Als Antwort auf Alex Contis

Re: Question creation activity

von Jean-Michel Védrine -

Hello Alex,

Thanks for the report. Stupid mistake, line 94 of mod/qcreate/exportgood.php

require_once($CFG->dirroot . '/question/format/$fromform->format/format.php');

Should be (change single quotes to double quotes):

require_once($CFG->dirroot . "/question/format/$fromform->format/format.php");

It used to work so most probably at some point I broke it traurig

If you are in a hurry you can edit the file yourself, I will release a new version ASAP.

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Alex Contis -

Hello Jean-Michel,

I changed the single quotes to double quotes and now exporting works ok!


Thank you for your swift response!

Alex Contis

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Miro Iliaš -

Dear Jean-Michel,


students can create new questions, but can not edit/view them. Only teacher can do that.


Is there a way to allow students edit/view their questions ?


Thanks, Miro

Als Antwort auf Miro Iliaš

Re: Question creation activity

von Emma Richardson -
Nutzerbild von Documentation writers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

Add the Edit Own Question permission to the student role.

Als Antwort auf Emma Richardson

Re: Question creation activity

von Jean-Michel Védrine -

Hello Emma,

Thanks for your answer and this is how it works outside the question creation activity but unfortunately the question creation activity is a special case because if you do that student would be able to edit their own question even if the activity is closed (for instance after the activity had ended) so you must not add the edit own question permission to student role.

In the question creation activity, students permissions on their own questions are actualized by a scheduled task. this is the reason this activity absolutely need that your cron is running and setup to run at very short intervals (for instance 1 minute)

The site administrator can change this scheduled task settings going to Site Administration -> Server -> Scheduled tasks (but this should not be necessary, the default settings are right for most websites)

question creation scheduled tasks

As you see question creation use 2 scheduled tasks, one to synchronize question access permissions and one to update grades.

As you see also on the website I made the screenshot, something is wrong because the tasks have not been executed for several days traurig (I made this screenshot on purpose with a website were the cron is not working to show the problem zwinkernd )

So when something is not working and when students can not create their question in a question creation activity this place is the first one to check.

But what about Miro's problem ? What to do if students can create their questions but cannot edit or delete them ?

You need to go to the activity settings and verify the "Student question access" setting

student question access

As you see there are 4 choices available and obviously only the last one allow student to edit and delete their questions


Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Eric Terroux -

Thanks a lot Jean-Michel for this useful plugin !

By default, all the questions created by the students are added in the question bank category of the activity (activity context). Is it possible to add the questions in another, broader, context by default, like in the question bank category of the course (course context) ? I know that it is possible to change manually the category of a question, but it would be easier for the teachers if it is by default.

We are using Question Creation Activity 2.05 with Moodle 3.0.2 .

Thanks again,

Eric Terroux


Als Antwort auf Eric Terroux

Re: Question creation activity

von Jean-Michel Védrine -

Hello Eric,

Sorry to answer more than a year after but this will give me the opportunity to explain why what you want is difficult to do.

The very special thing about this activity is that contrary to what is done in the question bank questions are created by students, not teachers.

When this activity was first coded by Jamie Pratt, this required some changes to the question engine and question bank code so that this was made possible.

When a question creation  activity opens, a scheduled task change students (those having the right to attempt the activity of course) capabilities so that they are able to create, edit, view, modify delete their questions according to the activity settings. When the activity closes these capabilities are removed.

This has 2 consequences

  • if the Moodle website cron is not running the activity is broken because students are not able to create any question
  • This is only possible if questions are stored in a context specific to the activity
But the good news is that to encompass this limitation there is a feature in the module so that teachers are able to export all the questions (with a filter to export only question meeting a given grade) so that they are able to import these questions in another broader question category

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Frederic Nevers -

Hi, 

First off, thanks a lot for the plugin - great idea! 

An error message is displayed when I try to edit the name of a 'Question creation' activity using the pencil icon next to the activity's name on a course page. Please see below

JavaScript error


Please note that nothing gets printed to the console.

PHP log error

Debugging: Events API using $handlers array has been deprecated in favour of Events 2 API, please use it instead. in \n
* line 3938 of /lib/deprecatedlib.php: call to debugging()\n
* line 4216 of /lib/deprecatedlib.php: call to events_dispatch()\n
* line 809 of /lib/classes/event/base.php: call to events_trigger_legacy()\n
* line 1673 of /course/lib.php: call to core\\event\\base->trigger()\n
* line 94 of /course/classes/output/course_module_name.php: call to set_coursemodule_name()\n
* line 3972 of /course/lib.php: call to core_course\\output\\course_module_name::update()\n
* line ? of unknownfile: call to core_course_inplace_editable()\n
* line 7452 of /lib/moodlelib.php: call to call_user_func_array()\n
* line 385 of /lib/external/externallib.php: call to component_callback()\n
* line ? of unknownfile: call to core_external::update_inplace_editable()\n
* line 229 of /lib/externallib.php: call to call_user_func_array()\n
* line 64 of /lib/ajax/service.php: call to external_api::call_external_function()\n
, referer: https://somemoodle.com/course/view.php?id=5555&notifyeditingon=1


Is that something you have come across before? Do you know how I would go about fixing it?

Cheers, 

Fred

(Edited by Tim Hunt to fix the formatting of the error message - original submission Friday, 25 November 2016, 12:54 AM)

Als Antwort auf Frederic Nevers

Re: Question creation activity

von Tim Hunt -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Peer reviewers Nutzerbild von Plugin developers

It looks like that module has a minor incompatibility with more recent versions of Moodle. You need to let the plugin maintainers know. Hopefully it is not too much work to fix.

Als Antwort auf Tim Hunt

Re: Question creation activity

von Jean-Michel Védrine -

This is wierd !

I tried to solve this problem.

I found 2 problems :

first my localib.php was not included in one of the function of mod/qcreate/lib.php where it was used.

second problem was that for an unknown reason when gradelib was calling qcreate_update_grades and then qcreate_get_user_grades was called it missed the qcreate->cmidnumber (I still don't understand why) I changed the code and it seems to work but I hate when I make a fix without fully understanding the problem.

But now the situation is even more frustrating because when I try to change the activity name using the pencil, I get

unhelpfull dialog

Which is not helpful. Of course debugging is set to developper


Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Jean-Michel Védrine -

Other things I can say are that the name is updated in the gradebook but not in the calendar events

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Jean-Michel Védrine -

Doh !

As I said investigating this bug I found that I missed to require_once my locallib in one of my lib functions.

So I added it, but forgot the $CFG global

This is solved now.

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Robert Schrenk -
Nutzerbild von Core developers Nutzerbild von Plugin developers

Hello,

I love this plugin and have a feature request. I often use this plugin for a cooperative, reflexive task:

  1. Students (that are going to work as teacher) are developing questions
  2. Afterwards I create a quiz out of those questions with a random selection out of all. (students don't need to see all questions, that would be too much)
  3. At the end students have to select the best and worst questions and give feedback to the authors in a forum. For easier coordination the name of the author should be part of the discussion title.

The main problem in this scenario is, that the students are not able to see the author of the question. Even if i prepend the authors name at the export it is only part of the question name, which is not visible to students. The task I assigned to the students says, they should provide their names in the question text, but most of them forget this.


So here is my feature request:

  • Would it be possible to implement a checkbox that prepends or appends the name of the author to the question text?

Kind regards

Robert

Als Antwort auf Robert Schrenk

Re: Question creation activity

von Jean-Michel Védrine -

Hello Robert,

This is a good idea.

It is difficult to explain why but it is not an easy task to do that (this is partly caused by the fact that the code to export good questions is re-using the code for question bank export).

But this is certainly doable.

So if I find some time I will try to add this feature.

Thanks a lot for the idea.

Als Antwort auf Jean-Michel Védrine

Re: Question creation activity

von Sam Mudle -

Has anyone compared Question Create Activity with StudentQuiz?  I'm just curious about the differences between the two.

It seems that QCA limits grading to just the teacher, whereas StudentQuiz allows the students to test out the questions and comment on them before the final phase of grading.