Quiz

 
 
Picture of Miguel Martínez
New question type: Structure diagrams
 

Good morning!

I am glad to communicate you we have just finished developing a new question type based on the shortanswer one.

From our point of view, this question type attends to one of the most important and basic parts of the structural analysis. It allows the professor to ask the student to draw the graph of internal forces of a predefined structure.

At the moment we have just developed it for moodle 2.2. But we will be interested in developing it for moodle 2.4 as our university moodle version it is going to change next year.

I upload a .zip with all the information. We have tested it and we have not found any problem. But we will be very thankful if anyone checks it (as we are not moodle experts).

Kind regards




Note: We have also developed a users guide with the explanations of how to work with this question type. Available here: http://dfiles.eu/files/2swkyfnfk
The question and its components are open-souce and free.

 
Average of ratings: -
Picture of Marcus Green
Re: New question type: Structure diagrams
Group Particularly helpful Moodlers

This sounds very interesting. However I cannot see an image in your post and the link you have provided is censored filtered where I work and blocks it on the grounds that it is "computers.filehosting", which seems like blocking off an awful large amount of the interwebs to me.

 

 
Average of ratings: -
Picture of Miguel Martínez
Re: New question type: Structure diagrams
 

Hi!

I attach the file on this new link: https://collab.upm.es/gm/document-1.9.150436/diagrams.zip

Inside it you can find a pdf with a user guide with pictures about it.

 
 
Average of ratings: -
Picture of Joseph Rézeau
Re: New question type: Structure diagrams
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

Hi Miguel,

Please make your new question type available on github.

Joseph

 
Average of ratings: -
Picture of Miguel Martínez
Re: New question type: Structure diagrams
 

Hi Joseph!

This it´s the first time I used github, but I think it works:

https://github.com/miguel-martinez/diagrams/


 
Average of ratings: -
Picture of Joseph Rézeau
Re: New question type: Structure diagrams
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

Hi Miguel,

Thanks for uploading your contribution on github.

Upon installing, I get this error message "Notice: Use of undefined constant MATURITY_VERDE - assumed 'MATURITY_VERDE' in moodle\question\type\diagrams\version.php on line 33". This is because MATURITY_VERDE does not exist in the list of MATURITY levels, see the documentation for possible values.

Unfortunately, my level in physics is next to nil so I do not understand the explanations in the documentation and will not be able to help you test that very specialized question type. But I'm sure other moodlers will be able and willing to try.smile

Joseph

 

 
Average of ratings:Useful (1)
Tim at Lone Pine Koala Sanctuary
Re: New question type: Structure diagrams
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

A question type that works for Moodle 2.2 should work in Moodle 2.4 (or later) with very few changes.

A detailed list of things you might need to change is in https://github.com/moodle/moodle/blob/master/question/type/upgrade.txt.

 
Average of ratings:Useful (1)
Picture of Douglas Broad
Re: New question type: Structure diagrams
 

Miguel,

What is the extra green rectangle below the axis on the shear diagram where the left column is?  That should not be part of a shear diagram.  

Regards,

Doug

 
Average of ratings: -
Picture of Miguel Martínez
Re: New question type: Structure diagrams
 

Hi!
I´m not quite sure if I have understood what you mean, but if you mean the vertical rectangle of the picture of the example, it corresponds to the shear diagram of the column. Notice that there is one horizontal force on the left that is assumed by the column.

Kind regards
Miguel

 
Average of ratings: -
Picture of Douglas Broad
Re: New question type: Structure diagrams
 

Got it.  Thanks.  Am used to working with beams separately from columns(by parts).

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: New question type: Structure diagrams
Group DevelopersGroup Particularly helpful Moodlers

Hello Miguel,

This seems to be a very interesting question type (on a personal note it unfortunately remind me of very bad moments as I studied this, and had one of my worst marks on the final exam wink)

But I think there are some problems in your code, for instance

$result .=html_writer::tag('div', "</script><script type=\"text/javascript\" src=\"http://localhost/moodle/question/type/diagrams/diagrams.js?".base64_encode($javascript_parametro)."\"></script>", array('class' => 'qtext'));

in your renderer will not work on most Moodle install. You can't hard code the url like that.

Unfortunately i was unable to fully test it due to my poor understanding of structure diagrams (as I was not understanding them 40 years ago as a student, you can guess how it is now !)

Maybe you could upload sample questions on this forum exporting some of the ones you have using Moodle xml format ?

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: New question type: Structure diagrams
Group DevelopersGroup Particularly helpful Moodlers

Hello,

I discovered there are example questions at the end of your user manual, and I was able to replicate some of them. So this is working on my Moodle 2.6dev test installation (I only had to add some mform->setType instructions to edit_diagrams_form.php to suppress some warnings)

My only problems so far are the hardcoded url given in my previous message (I did a quick fix using $CFG->wwwroot but the javascript would surely benefit from some work for a better integration into Moodle (see docs: http://docs.moodle.org/dev/Javascript ) and the spanish help strings used in javascript too, as I don't understand them so they don't really help me smile (here also look at the docs to see how to use Moodle lang strings in javascript to permit translators to fully translate your plugin when you will submit it to the Plugins directory)

 
Average of ratings:Useful (1)
Picture of Miguel Martínez
Re: New question type: Structure diagrams
 

Hello Jean-Michel!

Sorry for the delay. Thank you very much for your contribution with  "$CFG->wwwroot", we have already changed it.

My apologize about the bad writing of the javascript but I have to recognised that when we first wrote the code we were not expecting to go so far even to show it to the public. And if you put it together with the fact that we have really less idea about javascript, and we have just learned a little bit of c and fortran for developing it, as it also was our first time with php, the final result it is no so bad hehehe. 

I will translate the help strings so they could be useful for others. Thank you very much for show us the page "http://docs.moodle.org/dev/Javascript", but, one little question, where do you recommend us to start there, as there´s plenty a lot of information there.

Could you please tell us what did you change for using it with moodle 2.6 (as I have said that we wish to use it next year with moodle 2.4 but we have no idea how to change it).

I haven´t uploaded it to the plugins directory, as I was waiting for your advices, I don´t know if you think we should wait to uploaded it until we have improved the javascript and made it legible.

Merci beaucoup!

Miguel

 
Average of ratings: -
Picture of Miguel Martínez
Re: New question type: Structure diagrams
 

Hello!


We have just translated the diagrams.js comments to English so it will become easier to understand.

If anyone notice any other possible error please let me know!

Thanks to all!
Miguel Martínez

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: New question type: Structure diagrams
Group DevelopersGroup Particularly helpful Moodlers

Hello Miguel,

I just spotted that your version.php file is UTF-8 encoded with a Byte Order Mark, I had to remove the BOM because it was producing warnings at each plugin installation/upgrade

 
Average of ratings: -
Picture of Miguel Martínez
Re: New question type: Structure diagrams
 

Hello!
Thank you very much Jean-Michel. Sorry for the delay, I was enjoying a short vacances.

We are planning to make a few more improvements before we uploaded it to the plugins directory, and I was wondering if you could please sent me (or uploaded it to the github version, as you prefer), the modifications you have made in the code, so that we could incorporate them and compare them to what we have.

Thank you very much

Miguel Martínez

 
Average of ratings: -