Quiz questions based on student entered data--Moodle 2.8

Re: Quiz questions based on student entered data--Moodle 2.8

by Tim Hunt -
Number of replies: 15
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You can do this with the STACK question type (https://moodle.org/plugins/qtype_stack) but that is overkill just for this.

The University of Bristol have a question type specifically for this purpose, which they promised to share with the community when it was 'finished', but I have never seen it.

It may also be possible to do this with the Formulas question type (https://moodle.org/plugins/qtype_formulas)

In reply to Tim Hunt

Re: Quiz questions based on student entered data--Moodle 2.8

by Gus Cameron -

Sorry, only just saw this.  I asked our developers to share the question type but it's got stuck at the plugin approval stage with some outstanding issues - see here.  It's a few days work to fix but at present I don't have the resources to do it.

bw,

Gus Cameron,  eBiolabs

   

Average of ratings: Useful (1)
In reply to Gus Cameron

Re: Quiz questions based on student entered data--Moodle 2.8

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Ah cool! Having the code on github is a great start.

In reply to Tim Hunt

Re: Quiz questions based on student entered data--Moodle 2.8

by Gus Cameron -

Even in the state it's in now we find it incredibly useful, if anyone wants to help us develop it further that would be fantastic.

bw,

Gus Cameron,  eBiolabs

Average of ratings: Useful (1)
In reply to Gus Cameron

Re: Quiz questions based on student entered data--Moodle 2.8

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

It sounds very interesting. I tried installing it and it went through the dialogues, but then it didn't appear on the list of usable questions in the select a question dialog. Any ideas (I have never seen that before)

In reply to Marcus Green

Re: Quiz questions based on student entered data--Moodle 2.8

by Jeff McCarthy -

Hi all, we installed it but it is not working properly.  We are not able to preview or save changes to the spreadsheet within the question. Gus, I will message you separately to see if there someone we can contact to resolve it.  Thanks,

Jeff  

In reply to Marcus Green

Re: Quiz questions based on student entered data--Moodle 2.8

by Jean-Michel Védrine -

Hello  Gus, Tim, Marcus, and other,

I think this is a  very interesting question type.

I forked it on github and I fixed the phpunit and Behat tests and they are now OK.

See https://github.com/jmvedrine/moodle-qtype_lsciss and https://travis-ci.org/jmvedrine/moodle-qtype_lsciss/jobs/398888517 (note that I have excluded some folders like pChart and phpexcel from the codechecker step because it would be a huge task to try to make them comply with Moodle coding style rules)

Unfortunately there are still some issues that prevent creating a new question using the spreadsheet (but importing existing question or creating a new question entering the JSON in the "Spreadsheet JSON" text field rather than using the spreadsheet itself also works).

Another good thing is that once the question is created it seems to be working with no problem and according to my tests grading is correct.

Maybe part of the problems are in the javascript ?

Another potential problem could be that PHPExcel is now deprecated and replaced by PhpSpreadsheet but here also it would be some work to do the migration.

I don't know if other people are interested to solve the remaining problems but I think it would be a very good question type to have in the plugin directory.

As I have said several times I am very bad at javascript so even if I can do some work on this plugin a good help on the javascript side would be needed.

So that people can get a good feeling of the possibilities of the qtype_lsciss plugin I will upload some examples of questions that I have created using the varions JSON that were in the tests/fixtures subfolder.

In reply to Jean-Michel Védrine

Re: Quiz questions based on student entered data--Moodle 2.8

by Jean-Michel Védrine -

 4 example of spreadsheet questions.

In reply to Jean-Michel Védrine

Re: Quiz questions based on student entered data--Moodle 2.8

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Cool!

I didn't understand what it was trying to do until I found this link

https://github.com/LearningScience/moodle-qtype_lsciss/wiki/Creating-a-question

In reply to Marcus Green

Re: Quiz questions based on student entered data--Moodle 2.8

by Jean-Michel Védrine -

Hello Marcus,

Thanks for providing that link. I always forget that github repo can have wiki pages!

I did understood what this question type was trying to do looking at the sample xml and json located in the tests/fixtures directory and also running the Behat tests.

I just tested it with the More theme and the result is somewhat different (until that I conducted all my tests using Moodle 3.5 default setup to mimic Travis so I was using the Boost theme).

In More the Spreadsheet JSON text input that I used in Boost to enter raw json is hidden and part of the javascript is working so when I edit a cell in the Spreadsheet the result is saved correctly. But even in Moore I have been unable to create a new question from the beginning using the spreadsheet.

What is frustrating is that a lot of things are working in this question type so maybe it's just a few lines to change to have it completely working.

Having played with lsciss question I can say it seems very interesting for Moodle users because it's a lot easier to use than Stack or Formulas to create questions based on student entered data.

In reply to Jean-Michel Védrine

Re: Quiz questions based on student entered data--Moodle 2.8

by Jean-Michel Védrine -

Hello,

At that stage of the work I would really benefit to speak to someone involved in the development of this question type because I have a lot of interrogations

- there is an undefined function get_spreadsheetObject in some files (is there a missing file or is it because of a bug in some refactoring ?) I think I see what it was supposed to do (take a json decoded string an return a spreadsheet object) but I have some trouble trying to redo it.

- there is a lot of stuff about graphs that seems to have been removed at some stage in the development. Why ? Was there problems with it or was it useless ? I have been able to fix ajax_chart.php and ajax_chartStats.php but I don't know if this is of any use

ajax_chart

ajax_chartStats

I still don't know what is the problem with the edit page not working. Maybe we should study the saveSStoPage js function and places where it is called this seems to be part of the problem.

In reply to Jean-Michel Védrine

Re: Quiz questions based on student entered data--Moodle 2.8

by Jean-Michel Védrine -

I forgot to say that I think part of the problems originated from the renaming of the question type lsspreadsheet->lsciss in 2014 that wasn't done completely. And also another part of the problem is in the changes in Moodle latest versions that broke the javascript.

Surely if Learning Science is using this question type either they run a rather old version of Moodle or they have made some changes to the version that is on Github.

In reply to Jean-Michel Védrine

Re: Quiz questions based on student entered data--Moodle 2.8

by john eastman -

Hi

Glad that you have been able to add to this. We haven't been supporting this question type for some time as we have diverted work in this area to our new Smart Worksheets system. See https://www.learnsci.co.uk/post-labs/. Thanks for re-igniting it though as I agree it is a very useful question type and we were proud to have come up with this solution.

Thanks

John

In reply to john eastman

Re: Quiz questions based on student entered data--Moodle 2.8

by Jean-Michel Védrine -

Hello John,

Thanks a lot for your answer.

Do you know if the University of Bristol is still using this plugin or if I can ask some questions to the people involved in its development ?

Also do you know if the graph stuff has ever been working ?

In reply to Jean-Michel Védrine

Re: Quiz questions based on student entered data--Moodle 2.8

by Jean-Michel Védrine -

Here are my current plan to upgrade the lsciss question type

  1. Migrate from PHPExcel to phpSpreadsheet . It will be better to use an actively developed project for the future. I don't expect too much problems as those 2 libraries have extensive documentation and there is even a webpage about migration also lsciss don't use a lot of phpExcel calls and features.
  2. I considered migrating the pChart library to version 2.x but given that this feature of lsciss is now completely broken and disabled, that also we only need to do a simple plot of dots and the least squares line I decided not to upgrade. Additionnaly the current version of pChart 2.x is not even php7 compatible. So I will simply upgrade the version now in lsciss to php7 and somewhat improve the coding style to Moodle standard. I have already done part of the job.
  3. After steps 1 and 2 the plugin will be in the same shape as today: the question will be working but the javascript in the edit page will still be broken, so I am now entering the hard part of the work. After studying the javascript in lsciss, I think that the problem is that all this was written nearly 10 years ago, and is now broken because of all the work since done in Moodle on jQuery, RequireJS and AMD.
    Unfortunately I think that the only good solution is to develop again an authoring tool from the start as AMD module. This will take some time and surely there will be problems along the way.
    I have started to study how to write AMD modules in Moodle last year but I am only a beginner so I think I will progress quite slowly. Of course any help on this would be greatly appreciated.
Average of ratings: Useful (2)
In reply to Jean-Michel Védrine

Re: Quiz questions based on student entered data--Moodle 2.8

by Gus Cameron -

Dear Jean-Michel,

It's great to hear you can put some time and expertise into this question type. As you say, it was originally developed for us many years ago, the graphing part was depreciated more recently due to incompatibility with something or other - the exact reasons escape me now.  

As you point out, the code was developed for previous versions of PHP and Moodle, and we are lagging behind with our upgrades so that may explain why it works for us and not others.  But the functionality of this question type is fundamental to the way we mark our student's work, and eventually we'll have to upgrade, so we'll need something to happen sooner rather than later.

I'm not technical (I know just enough to be dangerous), but I'm an expert in deploying and using this question.  If you'd like to have a chat about how we can help each other you can find my contact details here.  

All the best,

Gus Cameron