I logged this as patch needs work as I am still new with Drupal (coding the drupal way), and I moved a few items around and added some functions. So you may not like the naming scheme (I'm not sure if I do either) of those functions I added and there is one spot that I didn't quite understand why it wasn't working as intended.
Anyway on to what this does. This changes up how the Quiz Results are managed per say. Before when you clicked "Quiz Results" in the admin it would take you to a page that listed ALL the results for every test taken. I didn't think this was filtered good enough and could make the user frustrated when looking through the results in grading one specific Test. I created another layer per say. So now when a user goes to "Quiz Results" I have listed the Quiz Titles. From there you would click on the Quiz Title and that listing would show all the test results filtered by that Quiz ID. Then thats back to your regular view with "View | Delete" actions to view the actual test results or delete the test itself.
I also added in a breadcrumb trail to help with back peddling.
Anyway check it out and I can make any changes you need me to before I submit a final patch (If your intrested in this approach).
Also when making this patch it still had the changes I did for actions. I stripped those out and submitted this without those changes in this patch so hopefully I didn't mess anything up when I edited the patch file.
Later
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | quiz_339473_5.patch | 3.72 KB | iLLin |
| #4 | quiz_339473_4.patch | 3.79 KB | iLLin |
| quiz_module_admin_view_v_1.patch | 2.54 KB | iLLin | |
| quiz_admin_admin_view_v_1.patch | 3.57 KB | iLLin |
Comments
Comment #1
mbutcher commentedThe patch is failing against the current 3.x dev branch -- probably because of all of the patches that I have added. Can you regenerate it for me?
Matt
Comment #2
mbutcher commentedOops... let me be more specific -- only quiz_module_admin_view_v_1.patch is failing. The other applied.
Comment #3
iLLin commentedYea I will do that first thing in the morning.
Comment #4
iLLin commentedOk here is the admin file and I figured out how to add more than one file to a patch =).
Comment #5
iLLin commentedOh wait thats the admin_inc_file. Here is the module file.
Comment #6
mbutcher commentedThis patch has been applied and has been (sorta) tested. I'm now checking it in.
A recent issue (#340573: A couple of Questions and a few thoughts) requested a way to do mass deletions of old quizzes. What do you think about changing the delete link to a checkbox and adding an actions menu at the top (like on the main 'content' list under Administer > Content managment > Content)?
That would allow mass deletions pretty conveniently.
iLLin: Thanks for another high-quality patch.
Comment #7
mbutcher commentedOops... forgot to close this out.
Also, I re-arranged the menu structure to group all of the admin screens under a top-level quiz category. You will probably want to clear the cache when testing the newest version of the module.
Comment #8
iLLin commentedYea I saw that, I will look into the regular delete all options that drupal does and make it identical.
Comment #9
iLLin commentedOh also could probably add "status" options as another addon later. Like if you are manually grading quizzes. You could assign a status of completed, in work...w/e. Then mass update those too. Just thinking out loud.
Comment #10
mbutcher commentedOoh... status... that will be an important one for Quiz 3.x, since we are now allowing question types that are not automatically scored.
We should probably come up with a term less generic than "status". Already, Drupal uses "status" for publishing status and Quiz uses status as the term to describe whether a question is on a quiz or not. (e.g. status: Always, Never, Random)
Today I am working on long answer scoring, so I will check to see what we can do on this particular issue.
Matt
Comment #11
mbutcher commentedIn _quiz_get_quizzes() there is a select statement that looks like this:
I'm having trouble figuring out what the INNER JOIN {quiz_node_properties} does there. Leaving it like that results in duplicate entries when I have multiple VIDs (versions) for a quiz, but then the next while loop just removes all of the duplicates.
Any reason I couldn't just get away with this query?
Comment #12
mbutcher commentedOh, I see that _quiz_get_results() used to have that same thing in there until I just recently removed it for the same reason. So I suppose if you had modeled the new function on that one....
Still, if you have any insight into why that extra inner join is a Good Thing (TM), let me know. There are some things about the construction of this module that I still don't quite understand.
Comment #13
iLLin commentedYea I noticed that too and this is why it did that. It did its query on the node which would be the quiz. Lets say you have 5 quizzes and 20 results for each quiz. Well by querying the node your result would be 5. But your trying to get ALL your results. So you join the properties table which is the results (I think) which would give you Duplicates. So your title shows up and your results for the WHOLE quiz node show up.
I think the better approach would have been to query the results and join the node to get the title and other relevant information.
Does that make sense? I noticed that but I didn't want to change that just in case that was the "right" way you wanted that done.
Also am I wrong in 'assuming' that? :) Let me know!
Comment #14
mbutcher commentedThe quiz_nodes_properties table stores one line per quiz version. Quizzes use the versioning system so that if a quiz is changed after a user takes the quiz, that person's score won't also be changed.
(Scenario: You add a new question to the quiz. Suddenly, anyone who already took the quiz automatically missed the new question.)
I tweaked some queries and it seems to be working fine on my local copy. Next time you take a look, let me know if I broke anything.
Comment #15
raycascellaThis is fixed in the 7.x-5.x branch. Everything was switched to entities, so all results are exposed to views.