Becoming a half-crazed monkey

Becoming a half-crazed monkey

by Frankie Kam -
Number of replies: 13
Picture of Plugin developers

Hiya all

I'm setting the drag-and-drop marker settings of the drop zones for a quiz question. Getting the settings just right ... it's turning me a half-crazed monkey.



Getting the Polygon coordinates settings right is an exercise for my vertically-challenged-IQ mind. A form of mental gymnastics workout for me. Yes I know that the settings follow this set pattern of "Polygon: x1, y1; x2, y2; ...; xn, yn". Doing this manually, even though the block on the graph moves with every update of the coordinates, is driving me up the wall. Somehow, I don't quite fancy being a glutton for punishment. I'm one step away from joining my cousins in the rain forest jungle. Does anyone out there have any tips, tools or magic bullet that they use to reduce the amount of time to get the Polygon "Coords" settings right? 

Regards
Frankie "half-crazed monkey Moodler" Kam 

Average of ratings: -
In reply to Frankie Kam

Re: Becoming a half-crazed monkey

by Frankie Kam -
Picture of Plugin developers

Okay, I've discovered that doing it "old-school" works best for me. I print out image with the grid lines superimposed. Then I demarcate the x-axis in units of tens. Same for the y-axis. Then I use a good old-fashioned pen to plot the points on the paper itself. 


Then I visually count the units of tens (to save time) and then fine-tune to the units of 1 to get the x-point and y-points reasonally accurate. Fine tune accordingly after the superimposed polygon shape has refreshed on the grid.

Frankie "sanity-saved" Kam

In reply to Frankie Kam

Re: Becoming a half-crazed monkey

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

I would really like someone to write the JavaScript so that you could edit the shapes by dragging points on the image. Marcus came close a while ago, but his code only let you click to create the shape, you could not go back later and change it.

I think it would a fun project for a developer with a week or two. I don't have that time myself, and so far I have failed to convince anyone else to do it.

In reply to Tim Hunt

Re: Becoming a half-crazed monkey

by Frankie Kam -
Picture of Plugin developers

Hi Tim

Thanks for the reply. No worries. I'm getting better at this. Before lunch I spent more than an hour setting up some coordinates. Then I got this error message for all Drop zones. Couldn't figure it out, Gave up solving. Went for lunch. Was back an hour later and threw I myself at the problem. 


Then I realised it was the trailing semicolon ";" that caused the error to popup. I deleted that ";" and everything was okay. Haha! Sometimes a little break does wonders! wink

As for a tool to automate the creation of coordinates, all I have for now is this link http://maschek.hu/imagemap/imgmap/ taken from http://www.open.edu/openlearnworks/mod/oucontent/view.php?id=52747&section=2.5.1.


I tried it out but it still requires one to work out the coordinates first. Well, at least I tried it out.

In the absence of a Javascript tool to draw and generate the coordinates, the manual old-school method still works for me. A bit like Sudoku. It gives my brain a good workout.

Regards
Frankie Kam 

P.S., I've used this gif file for the crosshairs. See attached.

Attachment crosshairs.gif
In reply to Frankie Kam

Re: Becoming a half-crazed monkey

by Frankie Kam -
Picture of Plugin developers

Hi Tim

For my drag and drop into markers question, I have multiple markers.


So in other words, I have a total of 6 drop zones for 3 markers. There are two drop zones for brush for example. When I preview my question, I notice that the two brush markers are stacked on top of each other. Same for the other two pairs of bucket and gloves markers. I suppose that this is by design. The screenshot below shows me dragging the top-most brush marker with my mouse cursor.


To the student, it looks as though there are only 3 markers. Of course once he or she drags the top marker, the bottom marker is revealed. My question is this: is it possible to display all 6 markers side-by-side instead of having duplicate markers stacked on top of each other?

Regards
Frankie Kam 

In reply to Tim Hunt

Re: Becoming a half-crazed monkey

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

I did a later version that allowed you to move the shapes as whole things, i.e. move your square/octagan/whatever up and down a bit as a whole. This was done by pressing a peculiar keystroke combination (Alt plus shift or something).  

It was awesome by contrast with writing numbers on graph paper, but I am very, very keen on ease of use and Tim might as well have been the voice in the back of my head pointing out how far from ideal it was.

You can see an animation here

http://www.examulator.com/ddmarker/

And a version of the code is here

https://github.com/marcusgreen/moodle-qtype_ddmarker

(at least 2 years old and I think it is the code,but I cannot identify which bits I have changed, though I know I have the source somewhere)

I should probably make a version publicly available for people to work out co-ordinates and then use them on their own web sites. Put your hands in the air if you think you would use/try such a thing?

In reply to Marcus Green

Re: Becoming a half-crazed monkey

by Frankie Kam -
Picture of Plugin developers
In reply to Frankie Kam

Re: Becoming a half-crazed monkey

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

Okily Dokily, I just double checked that the code really is in that repo and I will put it up for playing with at questiontype.co.uk as soon as I can. I will post here again when I have done that.

I'd like to do the full thing that Tim mentioned but I am concerned that it might take rather a long time. Having said that I have substantially improved my JavaScript fu recently. In fact I have been working on little else in my spare time for the last few weeks.


In reply to Marcus Green

Re: Becoming a half-crazed monkey

by Frankie Kam -
Picture of Plugin developers

Hi Marcus

I've installed your Github ddmarker [$plugin->version   = 2014111200; $plugin->requires  = 2013101800;] on another Moodle instance and am using its "click-and-hey-presto-the-coordinate-appears-in-the-edit-box" feature which I think is absolutely fantastic. I'm managing new questions in less than half the time than if I had to use my eyes and tired brain to work out the coordinates.

What I am doing for now is to generate the coordinates, and then copy and paste those values over to my actual Moodle 2.7.2 instance's Add New Quiz question dialogue page. Short of uninstalling my Moodle 2.7.2's ddmarker plugin and installing your Github version, it's working out quite well for me for now.

My sanity is gradually being restored to normal now. What would I have done without it! I must say that this version already helps heaps and anything more than this is a big bonus. 

A BIG thank you to both Tim and you and all the others who have tested the ddmarker plugin. This is one of the most useful and flexible drag and drop Quiz plugins there is. Thanks to the crosshairs gif, the polygon, rectangle and circle markers, I can create an infinite number of quiz questions of this nature.

Regards
Frankie Kam 

In reply to Frankie Kam

Re: Becoming a half-crazed monkey

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

That is very cool indeed Frankie. You can see a bit more about the discussion on this here

https://tracker.moodle.org/browse/MDL-51997

"The perfect is the enemy of the good"

So much software, so little time...

Close cover before striking

Goldfish make an easy to maintain pet

Far north Queensland is a nice holiday destination

I am currently working on what I consider some awesome ease of use things for Quiz and related.

In reply to Marcus Green

Re: Becoming a half-crazed monkey

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

I was just thinking of that exact same phrase: "The perfect is the enemy of the good".

By all means ensure that your code is good, then put the tracker issue up for peer review. 3.2 code freeze has just been extended 2 weeks wink

In reply to Tim Hunt

Re: Becoming a half-crazed monkey

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

I don't think I could get it integrated for 3.2, but getting it ready for the next version is a very good idea.

In reply to Marcus Green

Re: Becoming a half-crazed monkey

by Frankie Kam -
Picture of Plugin developers

Hi Marcus or Tim

Let's say I have a marker named "Dinosaur". Instance is 1. Currently, is there any way to allow the user to drag that one sole marker to any one of seven locations identified by A to G to gain a point?


If I allow the marker "Dinosaur" to duplicate/be dragged and placed 7 times, then yes of course. But assuming I have just ONE marker named "Dinosaur"?

Regards
Frankie Kam 

In reply to Frankie Kam

Re: Becoming a half-crazed monkey

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

I don't have an answer to your question, but your lessons do look exciting.