Decision making : Call for design help for Flashcard module

Decision making : Call for design help for Flashcard module

by Valery Fremaux -
Number of replies: 7

Here is the issue :

the flashcard module (unpublished on CVS) was designed using a match question to get its back/front card information set.

Arriving at backup/restore development point, there is here a big issue :

how to backup a flashcard without pulling out from database all its dependancies that is the question record, question_match and question_match_sub records. (remains possible at that point).

Now getting worse : how could we restore that properly, as the stored question might not have any matching category, nor come from the same release version of Moodle.

1 : we keep flashcard design as is, but restore/backup is a mess and should be resolved partially (no problem for internal data model, but maybe not restore que attached question at the good place --- if there is a place in the target environment)

2 : we break this hardcoupling between modules, that should be mostly avoided, precisely because of the evilness of such coupling consequences on backup/restore and instance moving issues. So flashcard module would have its own question/response set, with eventuality of importing/exporting question set to and from a matching question...

I need opinions to finish coding that part.

Thanks.

Average of ratings: -
In reply to Valery Fremaux

Re: Decision making : Call for design help for Flashcard module

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
I HATE BACKUP/RESTORE

just wanted to say it. smile

This is only my opinion but I think (2) is the most practical approach - break the link between questions and the flashcard module, store them in its own tables and handle backup normally. This especially applies if the flashcard module only supports one 'question type' so you don't gain much benefit from the integration. It also especially applies if your integration with the quiz questions was problematic for other reasons than backup (just guessing that might be the case).

Import/export to match question could be useful, I guess this is intended so you can use the same question set in a quiz after students have learned it with help of flashcards? This might not be a requirement though, depends on your users.

--sam
In reply to sam marshall

Re: Decision making : Call for design help for Flashcard module

by Valery Fremaux -

I HATE BACKUP/RESTORE

I think its is just a question of training. I used to hate moodleforms untill I really tried it "at work". (Actually in flashcard !!), and it was finally so nice...

backup/restore is tricky, but really efficient for programmers unless the coupling with many other structures in Moodle is too high.

You are right : (2) was the obvious solution to make the module clean, consistent and able to behave just as any well-featured module.

Here is the result as a very PRE-ALPHA. Do not consider this code can be immediately commitable in CVS as there are things missing, but the module works (1.8 and probably 1.9 either as there is no rare things in it) .

What is missing :

  • No tests unless unitary tests for features and screens
  • No help files
  • Misses a statistic screen for better knowing wich are the globalm difficulties of a class.
  • Misses a question/answer integrated editor. Now the module still imports a matching question at creation time (or update, forcing reload).

Any people interested in trying this early version and help to exfoliate first bug list welcome. As usual, my workplace here will be setup for working on the beast.

In reply to Valery Fremaux

Re: Decision making : Call for design help for Flashcard module

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
No no, I really hate backup/restore despite having to use it lots for work. I've implemented it for several modules, which I hated, and extended the core API a bit (to add support for course format specific data backup/restore), which I hated, and written a (local) wrapper so I can use a slightly nicer class to write the backup data, which still hasn't mitigated my hate. smile

Largely this is because the code/API needs to be taken out and shot, but partly it's also because it's inherently a difficult/fiddly task. When you implement it there are a million things that can go wrong... and they always do.

Ahem, anyway, this is offtopic - sorry. Good luck with your module.

--sam
In reply to sam marshall

Re: Decision making : Call for design help for Flashcard module

by Valery Fremaux -

I agree with you, in fact, but make Moodle so valuable, so versatile, and so usable !!

wink

flashcard is quite finished by now...

Thanks.

In reply to Valery Fremaux

Re: Decision making : Call for design help for Flashcard module

by ahmet b -
Hi Valery,
this new flash card set is so cool. that is great for language teaching. and i was asked for that.
here is the problem i have. when i try to upload it gave me another course file folder. i went there i upload some images there and when i uploaded images for 'edit the card' tab try to get images from this specific folder it still gives me red lined text that miss images.
it seems that it is getting sound files but asking for plug in and i couldn't make it work.
text-text works fine

the last thing.
is there anyway to start to make new matching questions from flash card and name there? some times teachers get confused to make questions somewhere else and then connect them here. actually you already have feature for adding new questions but not entirely new set of questions....

thanks again
In reply to ahmet b

Re: Decision making : Call for design help for Flashcard module

by Valery Fremaux -

Hope you rely on http://download.moodle.org/plugins/mod/flashcard.zip to get the last version of the module.

Now shall we try help you on specific points :

Sound files : I choosed to rely on how messaging play sounds. This is done calling directly an EMBED of the sound that should play with default sound player plugin. I tried with quicktime module, seting it up so it was the default plugin for .wav and .mp3 files. Was working fine.

I did not really understand the nature of your issues with images. When coming back from the course file editor using "choose" command on file entry, the local course scope URI should return to the question/answer text editing box. So the image call should always look something like :

moddata/flashcard/<flashcardid>/myimage.png

"when i try to upload it gave me another course file folder"

where did you started from when trying to upload ?

In reply to ahmet b

Re: Decision making : Call for design help for Flashcard module

by Valery Fremaux -

Ahmet,

YOU WERE COMPLETELY RIGHT !!

I'm so confused I let a hardcoded course value in bindings to file selector popup, from when I made first attempts.

this night compilation in CVS should fix the problem. I will continue tests my side on my production moodles. CVS fixes little things here and there, so take custom getting last code.

You may also (I do that and it works) checkout locally this module directly from CVS into your testing Moodle so it should be very easy and fast to get last files.

Regards.