Thanks for such a great module. We are planning to depend heavily on your module. About to have 100 quizzes to start and increase to 5oo . Just wndering about your module for Drupal 6x

Comments

westwesterson’s picture

Hi Pharma,
Im currently searching for a co-maintainer, if youd like to upgrade to drupal 6 that would be a great start! Let me know about your availability on the project, I don't have too much time for the project as I am currently working on another module, but I may be able to give you a few pointers here and there if you run into trouble.

pharma’s picture

Thank you for supporting offer. Basically i am not a developer but we might consider for sponsoring developing 6.x supporting version, if any one is ready to help you !

westwesterson’s picture

Category: support » feature
Status: Active » Postponed

not a support request

encho’s picture

subscribing

gilcot’s picture

Version: 5.x-2.x-dev » 6.x-2.x-dev
Status: Postponed » Needs review
StatusFileSize
new24.69 KB

work in progress.

*.info and *.install are ok.
*.module file still need work (menu system).

pharma’s picture

Good to hear...best of luck!

seqwence’s picture

Hi!

Any progress?

'Cos it doesn't work for me. Blank page.

Thanks in advance.

Renee S’s picture

StatusFileSize
new1.56 KB

Installer is busted, the two indexes need to be removed... give this a try :) - turn off and then uninstall Quiz first.

Renee S’s picture

(BTW, make sure that you've added permissions once you enable the module!)

Renee S’s picture

Ok, it has problems - something wrong with hook_validate() and with the menu, still (fixing some problems unfortunately led to others - updating the hook_form() has disappeared a few menu things). Somebody more familiar with the program flow needs to take a look at it :) But it's better, at least according to Coder... =)

(removed the confusing attachment)

westwesterson’s picture

please create a patch file, so changes can be tracked. Otherwise it takes forever to follow what you change in the code. I don't have a lot of time, so this will help this develop faster. Thanks!

http://drupal.org/patch

Renee S’s picture

StatusFileSize
new33.33 KB

Right-o. Sorry!

westwesterson’s picture

much easier to see changes now :-) thanks.

However this patch still needs a good deal of cleanup before it can be committed, with this patch we would loose the ability to translate the quiz interface! a major feature in quiz 6.0! we should get rid of all of these excess changes. I want to at least replicate quiz 2.0s current features. Quiz 2.0 is pretty stable right now, so I would make sure that we have the same functionality as 5.x-2 (which means not deleting the translate function t()

also what version of quiz is this patch based on? I cannot apply the patch to my version of quiz!

Additionally i'm not sure why you have 2 extra modules enabled. fillblanks currently is not a part of the quiz module. Matching module has never worked and doesn't need an info file. If you are trying to contribute new working versions of these modules, please do this in separate patches, putting this much functionality in at once is asking for trouble, it would be hard to troubleshoot.

Small patches are much more likely to get a quick push than a mega patch. A small patch i can push through in a day, mega patches can take weeks (or longer). Of course members of the community helping out with the testing are always encouraged!

Please keep up the good work, everyone really appreciates it :-)

Renee S’s picture

This was based on what was posted above by gilcot. Those modules weren't enabled, they just came with the package above. (Zoikes!) What do you suggest I do, leave this or go back and start fresh from the HEAD version?

westwesterson’s picture

StatusFileSize
new43.53 KB

thanks for doing this btw :-) your a real help. I am going to post what i've been working on, if you could help me identify bugs that would be great. It is far from complete too. the more people working on this the faster we can port the module.

We still need to port quiz views to the quiz 2.0 schema, but we can wait on that till the core of quiz is working.

westwesterson’s picture

oh and you apply this patch on HEAD :-)

Renee S’s picture

Status: Needs review » Needs work
StatusFileSize
new8.54 KB
new22.09 KB

Ok, here goes from the top. Er, well, the HEAD...

There are a few funky menu things, a few strange interface things, but I can create questions and assign them to quizzes, so it's a start... :)

One thing to pay attention to, anywhere we have $quiz = node_load(arg(1)); coder recommends we replace it with $quiz = menu_get_object(). But this doesn't work in most cases. I don't know if it's because certain variables aren't being passed, or what, but anyway.

westwesterson’s picture

in the menu items try replacing % with %node ;)

westwesterson’s picture

Renee S’s picture

If only! :) No, doing that causes the assign questions option to disappear entirely. I fiddled around quite a bit with it, but no luck...

Renee S’s picture

(BTW, should we branch this for 6?)

gilcot’s picture

Installer is busted, the two indexes need to be removed...

good catch z allen !

gilcot’s picture

hello westwesterson.

also what version of quiz is this patch based on? I cannot apply the patch to my version of quiz!

it's a port to D6 from 5.x-1.1
i didn't make a patch toward HEAD because i wanted people using Drupal 6.x to be able to test it from scratch before we initiale another branch..

Additionally i'm not sure why you have 2 extra modules enabled. fillblanks currently is not a part of the quiz module. Matching module has never worked and doesn't need an info file. If you are trying to contribute new working versions of these modules, please do this in separate patches, putting this much functionality in at once is asking for trouble, it would be hard to troubleshoot.

those extra modules are works in progress. i forgot removing them from the archive i submitted.

gilcot’s picture

There are a few funky menu things, a few strange interface things

yes, the menu still need works. i've been far from D6 developpement for a while, so i don't understand correctly how the new menu system do work exactly :(
in my dev. box, i use the %node trick, but it's still mess.. a menu guru is really needed imho :)

westwesterson’s picture

we need to refocus this development around quiz 2.0. I will not release quiz 1.1 in drupal 6 only to have to fix all the same bugs that were fixed in 2.x... we are reinventing the wheel. please work off of either what is currently in head or my previous patch.

this is also a maintenece issue. i don't have time to maintain 2 entirely different code bases.

Renee S’s picture

Sorry, gilcot, I was referring to my patch based on HEAD+westwesterson's patch... funny menu, interface issues... :)

westwesterson’s picture

StatusFileSize
new36.07 KB

thanks for the clarification, I'm worked on integrating my current revisions with your patch. please test, if it works well enough (minus menu difficulties) i will commit this to head as something to work off of.

westwesterson’s picture

StatusFileSize
new68.21 KB

that was the wrong file.

i have provided a better patch here.

optalgin’s picture

I am a bit slow with that patching thing, can you help?

When patch I get this error
(for both 5.x-2.0-rc1 2008-Jul-26 and 5.x-2.x-dev 2008-Jul-02)

D:\www\...\modules\quiz>patch < quiz_drupal_6_schema_v2.patch
patching file CHANGELOG.txt
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Should I get all files from #12, #15, #17 or the patch from #28 covers all the changes?

westwesterson’s picture

Patch head not 5.x-xx
http://drupal.org/node/95631

westwesterson’s picture

http://drupal.org/node/240964 was a duplicate of this post

Terry.Monnett’s picture

This is my first attempt at contributing to a module, so I downloaded quiz-6.x-1.x-devel.tar_.gz and installed it. I then downloaded quiz_drupal_6_schema\ v2.patch.txt and put it in the sites/all/modules/all/quiz directory on my server. When I tried patch < quiz_drupal_6_schema\ v2.patch.txt I got the following:

can't find file to patch at input line 8
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|Index: CHANGELOG.txt
|===================================================================
|RCS file: /cvs/drupal-contrib/contributions/modules/quiz/CHANGELOG.txt,v
|retrieving revision 1.11
|diff -u -r1.11 CHANGELOG.txt
|--- CHANGELOG.txt	15 Feb 2008 00:18:03 -0000	1.11
|+++ CHANGELOG.txt	30 Jul 2008 02:26:19 -0000
--------------------------
File to patch: 

I've been digging through Drupal and UNIX sites and am still puzzled. What am I doing wrong?

Thanks for any help you can give - I hope to return it by assisting with this module development.

Terry Monnett
Ohio State University

zog_zog’s picture

Maybe you should try with "-p0" option ? :

patch -p0< quiz_drupal_6_schema v2.patch.txt
jagdeep’s picture

Hi!

Any progress?

'Cos it doesn't work for me. Blank page.
I need this module on urgent basis, can u tell me a particular date upto which this module is ready for 6 version.

Thanks in advance.

nirvanajyothi’s picture

It is wonderful to see how the work has already began...As linux,
Drupal is not a platform.It has become a way of life...

Sincere thanks to all the programmers.

It will be better if an alpha version be rolled out soon ,so that users like me can test and make minor contributions?

anonimicer’s picture

Could someone please put the complete patched files? I am having serious difficulty doing it myself, and really need this urgently. I have followed the instructions and everything, but I keep getting errors despite using HEAD.

Thanks!!

Renee S’s picture

Ok, I tested this out, but there's something wrong with the multichoice module. In multichoice_render_question_form() the program flow isn't working - $node is being passed in, but it isn't getting there. Using $node = menu_get_object() works (though there's something wrong with the logic - it's ['is_correct'] instead of 'correct').

But then when the form gets submitted, nothing happens. I'm not a guru, but I think there needs to be a _submit function to handle the input...?? I don't have a lot of time to delve, though, that's just my first problem.

The menu is even more borked than before with this patch, as well.

Renee S’s picture

(As well, the menu options to associate the question with the quiz aren't there, so maybe there's something in the flow between the two that is missing, I just don't know enough about the module).

echoz’s picture

subscribing... much appreciated!

mbutcher’s picture

Will there soon be a checkin against HEAD for the D6 version?

I'd like to work a little on migrating the module to D6, but I have no idea which of the patches above are the correct ones to start working from. If there's not going to be a checkin, maybe somebody can point me toward the right patch(es).

mbutcher’s picture

I've picked up the module where westwesterson left it in #28, and I am working on a full D6 port. As soon as this is stable(ish), I will check it into CVS.

In order to accelerate the D6 port, I will check things in as soon as the quiz and multichoice modules are working. The views module will come along a little later.

Renee S’s picture

Sweet! Let me know if you need any testing or debugging done, happy to help :)

DomainManMike’s picture

Subscribing.. I'm a PHP beginner (C++ background), so can't help much.. but hopefully in the future. This module will be extremely helpful for what I'm doing! Thanks!

mulogic’s picture

Subscribing..
This is a very important module for my site (to be developed).
i can go with drupal 6.x, if quiz gets ported.

Thanks

domesticat’s picture

subscribing.

pharma’s picture

For me too. Very great module

robhamm’s picture

Subscribing

mbutcher’s picture

Assigned: Unassigned » mbutcher
Status: Needs work » Active

I have incorporated the latest patches (from this thread) into the current HEAD. I've also made a number of additional changes to get the module working in D6.

More work needs to be done before I can even cut a beta release, but we're getting there.

Those of you who like to live on the cutting edge, feel free to *test* this on a *non-production* Drupal install. Until I get things stable on D6, I will use this issue to track the D6 port.

mulogic’s picture

Title: Upgrade to Drupal 6 » How to Download Head

Hi mbutcher ,

Sounds Great. I would very much like to run and test head.

The release page for head is missing the download link
I got head from http://ftp.drupal.org/files/projects/quiz-HEAD.tar.gz

is this the patched one?

Flying Drupalist’s picture

subscribe.

regi.bradley’s picture

subscribing

mbutcher’s picture

mulogic: I haven't built a release yet, so your best bet is going to be grabbing a fresh copy from CVS.

For those interested, this CVS checkout should work:

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d quiz contributions/modules/quiz

Once I have things stable enough that no error messages pop up during standard operations, I'll create a developer release. (Right now there is still one error that appears when creating a new quiz question.)

westwesterson’s picture

Title: How to Download Head » Upgrade to Drupal 6

please refrain from hijacking the name of the thread,
i know there is a lot of excitement here, but it makes this thread hard to find.

Thanks,

Renee S’s picture

Hey mbutcher,

Thanks so much for the alpha-alpha version. Here's what I've got:

  • The dates don't work: even with "Always available" checked, questions show up as expired with a default UTC date 1969. They do make it into the DB as set, however.
  • Feedback on answers gives me: warning: implode() [function.implode]: Invalid arguments passed in C:\xampp\htdocs\drupal\modules\quiz\multichoice.module on line 887.
  • Answers don't advance to the next question even when there's no feedback issue, and they don't give any indication of what's going on - so, for example, if I randomize the questions and answer the next one (of two), then it'll tell me that I already passed the quiz. So something's getting in.

Hope this helps!

mbutcher’s picture

I have just configured dev releases to automatically build from the new DRUPAL-6--2 development branch.

z allen: I think I just fixed the second issue you mentioned above. I think I also have the question advancing (the third you have listed above).

The first issue is still outstanding. I'll be working on it.

gongnam’s picture

StatusFileSize
new2.34 KB

Thank you for Drupal 6.x correspondence of quiz module.

I revised it partly.

Reference: http://drupal.org/node/227531

gongnam’s picture

It is an additional revision.

@@ -1680,7 +1692,8 @@ function quiz_questions($qid) {
  *  Array containing the form values.
  */
 function quiz_questions_form_submit($form, &$form_state) {
- 
+   // Load the node.
+  $quiz = node_load(arg(1));
   // Update quiz with selected question options.
   if (!quiz_update_questions($form_state['values']['question_status'], $form_state['values']['new_revision'])) {
     form_set_error('', t('Either no questions were selected, or there was a problem updating your @quiz. Please try again.', array('@quiz' => QUIZ_NAME)));
nirvanajyothi’s picture

Thank you for the port.

mbutcher’s picture

publian: I'm not sure I understand the node loading strategy your suggesting in the patch (#56). Why load nodes twice?

From the patch:

-function quiz_questions_form($context, $qid) {
+function quiz_questions_form($context, $node) {
   //$quiz = node_load(arg(1));
-  $quiz = node_load($qid);
+  $quiz = node_load($node->nid);

After a quick read-through, I like the rest of the patch. I'm not totally convinced of the value of the extra quiz_type_access_load() function, but I like to err on the side of caution.

gongnam’s picture

> Why load nodes twice?

It is not necessary to put a node twice here

-function quiz_questions_form($context, $qid) {
+function quiz_questions_form($context, $quiz) {
   //$quiz = node_load(arg(1));
-  $quiz = node_load($qid);

mbutcher’s picture

The patch at #56 plus several changes is committed.

Thanks, publian.

When contributing patches, please put the issue node ID and comment # in the patch name so I can keep track (check out the Drupal handbook patching page for details).

mbutcher’s picture

Alpha 1 is posted.

gongnam’s picture

StatusFileSize
new1.06 KB
new1.61 KB

I revise what cannot acquire numerical questions which I appointed in quiz_get_random_taxonomy_question_ids

mbutcher’s picture

publian: Thanks again! I just committed the patch from #63. It will be in the 6.x-2.0 Beta 1 release.

mbutcher’s picture

Status: Active » Fixed

Beta 1 has just been posted, which means the D6 port is now frozen to anything but bug fixes. And there's currently only one bug (#298046: Commenting on quiz causes error) left to fix before RC1. Consequently, I am marking this fixed, since the port itself (of all three modules) is now done and publicly available.

nirvanajyothi’s picture

Its really happening fast in here.Thanks mbutcher and all involved for the rc1.

Renee S’s picture

I can't seem to get the module to work.

* When I click "submit" on a question, nothing happens... unless it does, in which case it gives me the error I mentioned above (warning: implode() [function.implode]: Invalid arguments passed in C:\xampp\htdocs\drupal\modules\quiz\multichoice.module on line 887.)
* Still having a problem with the active date, it appears to only work if "Unlimited" is checked
* A question only shows up if I've posted two - and I see the second question, but not the first. An index error somewhere, perhaps?

mbutcher’s picture

Status: Fixed » Postponed (maintainer needs more info)

z allen: Can you tell give me information about (a) version of PHP, (b) version of Drupal, (c) database and version of database, and (d) version of Quiz? I'm guessing that you are running some version of XAMPP on Windows.

Also, you are submitting a question *that belongs to a quiz*, right? If you load just a question (outside of a quiz), it will not be evaluated when you click on the submit button.

Renee S’s picture

Hi mbutcher,

Yeah, XAMPP on Windows; PHP5.2, mySQL 5 - InnoDB tables. Soon to be moved to a Sun server when I've finished development.

And yeah, I create a quiz, create a question in that quiz, etc.

mbutcher’s picture

Status: Postponed (maintainer needs more info) » Fixed

z allen: I received another bug report (#3327419: [7.x] Allow to store live and sandbox credentials for easy switching) that sounded the same as this. Piecing together what you told me and what I got from that report, I figured out how to reproduce the bug, and then solve it.

Fix is checked in, and I'm about to release RC 2!

Thanks for the bug hunting.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Terry.Monnett’s picture

Title: Upgrade to Drupal 6 » Drupal 6 - db tables not created
Version: 6.x-2.x-dev » 6.x-3.x-dev
Category: feature » support

I've installed quiz 6.x-3.x-dev (after having the same problem with 6.x-2.1) and can't seem to get the database tables created. The long answer ones show up just fine, but the quiz and multichoice tables do not. Consequently, the
choices on multichoice questions do not get saved. Looking at my db, I see only two tables beginning with "quiz" - and they are both long answer tables.

I do have a prefix on my tables, but the long answer module doesn't seem to mind those at all.

I would appreciate any help that anyone can offer. I've searched through drupal.org for 2 days without coing up with a solution.

TIA,

Terry Monnett
The Ohio State University

optalgin’s picture

Title: Drupal 6 - db tables not created » Upgrade to Drupal 6

Sorry for not giving any useful information here
The subject of this thread is "Upgrade to Drupal 6"
If you don't mind, I changed it back...

Terry.Monnett’s picture

I don't mind at all - I thought I was posting a new thread, but re-posted it under support request.

Sorry for the mixup.