The Language Tests module allows language teachers to create tests and offer them to their students. In turn, the students can join the teacher's group and take tests. The results will be available to the teacher. Now it is possible to create 9 types of tests: Drop-down lists, Input fields, Radios and checkboxes, Drag-and-drop words, Wordsearch, Crossword, Matcher (requires Raphaël library), Select explanation, Type the word.
Test samples can be found on the demo site at http://langtests.vernex.ru
Link to the project page: http://drupal.org/sandbox/ecm/1398998
Direct link to the git repository: git clone --branch 7.x-1.x-dev http://git.drupal.org/sandbox/ecm/1398998.git langtests
It's for Drupal 7.
UPD: In contrast to the Quiz module, this module is intended solely for language tests, and therefore has a different set of test types, which takes into account the language teaching needs. Another difference is the ability to create private groups of students and make the tests available only for the group.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | 0001-Fixed-1399684-21-created-testtype.wsr_.js_.patch | 10.25 KB | FranciscoLuz |
| #21 | wrs.png | 21.99 KB | ed@moskvin.ca |
| #6 | review.txt | 83.74 KB | darrell_ulm |
Comments
Comment #1
klausiWhat are the differences to the quiz module? Please add that to the project page.
Comment #2
ed@moskvin.ca commentedThe differences to the Quiz module added to the description.
Comment #2.0
ed@moskvin.ca commentedThe differences to the Quiz module added to the description.
Comment #3
rade commentedThe branch name should follow Drupal's naming conventions (so it should be 7.x-1.x). Please see http://drupal.org/node/1015226
manual review of branch 7.x-1.x-dev:
.install file
Also, get a review bonus and we'll get back to you sooner.
Comment #4
ed@moskvin.ca commentedFixed.
Comment #5
ed@moskvin.ca commentedFixed.
Rasmus, thank you very much for reviewing!
Comment #6
darrell_ulm commentedHello, first off used the online auto scanner. Found some issues. These are included in the attached file. Feel free to run the scanner yourself to resolve issues.
For Drupal coding conventions please refer to:
http://drupal.org/coding-standards#comment
http://drupal.org/node/1354
100s of style errors in the attached file.
Looks like you have some of the theme stuff in there, and looks like an interesting mod.
Got time (not at lunch!) to do a more complete install-run-test review below at http://drupal.org/node/1399684#comment-5672690
Comment #7
patrickd commenteddo NOT wrap text in hook_menu functions with t()!
minor issues, switching back.
Comment #8
darrell_ulm commented@patrickd There were hundreds of issues with the
Review of the 7.x-1.x branch:I didn't know that all of these were totally minor such as these found:
+1182: [critical] Potential problem: drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar.Again thanks for the new information.
I am surprised with the security issue,tag issues, and the 100s of formatting issues this should not be set to needs work - your call, glad to be learning the process. Thanks again.Comment #9
patrickd commentedyes, but if you have a look at the critical line:
drupal_set_message(t('Please, !login or !reg before attempting to join the group.', array('!login' => l('log in', 'user'), '!reg' => l(t('register'), 'user/register'))), 'error');you can see that it's a false positive.
And as the review process is mainly about licensing and security we can't force applicants to follow standarts 100%
regarding the lines of code of this module, it's not surprising that there are so many errors flagged.
Comment #10
darrell_ulm commentedGood points, very interesting & thank you. I can test this mod if you think it is near release. Menu callback titles default to t(). from Drupal 6 unless redefining the t() callback function itself. True.
Another point, could use some documentation, and as said in above comments http://drupal.org/node/1399684#comment-5453002 by @klausi, still use a comparison to the Quiz module, it appears from the code and installing and running it to be a subset of the Quiz module. There appear to be a few different types of questions for this module, like the crossword compared to the quiz module, others are more similar.
Installing & testing it. Notes:
Needs documentation!
Was able to create some of the sample tests, like the crossword etc. Some of them worked well enough, and some others did not.
Error link: On page: admin/langtests/2 ( or admin/langtests/1 etc. the [Back to Tests] link is incorrect and gives:
Not Found The requested URL /admin/langtests was not found on this server.and a link of admin/langtests?render=overlay. admin/langtests also does not work. Looks like /admin/langtests just put in as absolute path rather than relative.Error link: On page: admin/langtests/testitem/edit/2 the Cancel button does the same thing as [Back to Tests] Above.
On a type the word test I got this error when trying to view the test:
When I actually took my test of 3 questions I got the error above on the word test, and then at the very end received this:
Note: could keep testing the module, however, it is my belief that these probably should be looked at.
Also.
On code review I still get:
langtests.install
Reference: http://api.drupal.org/api/drupal/includes%21install.inc/function/st/7
testtype.wsr.inc
Could cause issues with markup validation. Still
*does* work and is standard for HTML5 working draft.
Line 195: in most cases, replace the string function with the drupal_ equivalent string functions
$prefix = substr($raw_task, 0, $pos);From http://api.drupal.org/api/drupal/includes%21unicode.inc/function/drupal_...
Comment #11
ed@moskvin.ca commentedFixed. There are no warnings in auto scanner report now, except one false positive.
Comment #12
ed@moskvin.ca commentedHmm... I couldn't find any t() functions in my hook_menu implementation...
Comment #13
patrickd commented@ecm there never were any, but darrellulm suggested to do so, that's the reason for my statement
Comment #14
darrell_ulm commentedJust want to state I crossed that statement out hours after I posted it in http://drupal.org/node/1399684#comment-5671444 so hope your browser is showing those issues crossed out
like these words.The larger concern of course are simply the run-time errors because of the implications of that type of error as shown in http://drupal.org/node/1399684#comment-5672690 which I am sure at this point you have investigated. I tested more in depth in http://drupal.org/node/1399684#comment-5672690 because I didn't want to let it stand with my earlier 15 minute lunch break test.
Also, I should say, the module is interesting and I do like the new and different types of quizes, such as the novel type of crossword test question. It is an ambitious module and has good aims, so keep up the good work.
Comment #15
ed@moskvin.ca commentedFixed.
And the same problem was with "Select explanation" and "Matcher" tests. All fixed.
Comment #16
ed@moskvin.ca commentedNow I use get_t() function to be on the safe side.
Comment #17
ed@moskvin.ca commentedAn automated review was made again — everything looks fine.
@patrickd and @darrellulm: Thank you very much for your work!
Comment #18
prashantgoel commentedplease visit http://ventral.org/pareview/httpgitdrupalorgsandboxecm1398998git for the list of errors that are being generated.
Comment #19
ed@moskvin.ca commentedFixed. Everything looks fine again.
Comment #20
alexiswatson commentedHi ecm!
Automated review looks great. Manual review:
Looks like a very ambitious project that's well on its way. Kudos!
Comment #21
ed@moskvin.ca commentedFixed.
Now use the Libraries API.
Fixed. But actually the correct value is 8.
I have to send translated strings into the script (see testtype.wrs.inc:216, 234, 237, 238, 323), therefore, it seems to me that it's impossible to put the script in a separate file.
Remained unchanged.
In fact it is the test author's responsibility. Maybe he or she wants to arrange words on diagonals... Besides, it is difficult to move the mouse fast enough to select cells diagonally.
Remained unchanged.
I've been unable to repeat this error (see screenshot attached). Please describe the details which way you received this result.
Remained unchanged so far.
You flatter me. :-)
David, thanks a lot for the manual review!
Comment #22
FranciscoLuz commentedHi ecm,
In regards to your response to davidwatson, I quote:
I have rolled out a patch for you on what I believe davidwatson meant you to do.
Take a read at http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_a... to learn more of what drupal_add_js can do.
I did a manual review on your code and it looks good to me. Once you apply the patch I will RTBC this issue.
Comment #23
ed@moskvin.ca commentedFrancisco, thank you very much for the lesson! I'll be aware of this method.
Now all of the javascript code moved to separate files.
Comment #24
maahedev commentedCheck this link for the part of the errors
http://ventral.org/pareview/httpgitdrupalorgsandboxecm1398998git
Comment #25
ed@moskvin.ca commentedFixed. No more missed full stops at the end of comments.
Please note, 7 error messages in the JS files — they are all false positives.
Comment #26
herom commentedwow, that is a LOT of code. you should definitely get a Review Bonus to get faster reviews.
well, i looked it up a bit, and here's my review:
One thing i noticed is that the admin can not edit or delete the other users' tests. I guess there should be more access levels and permissions throughout the code. Like, almost any other content or stuff has two levels of access, "edit own" and "edit any", "delete own" and "delete any", and so on; one for the normal author, and one for the admin user.
And, for every test created, there are two flags, "Enabled" and "Public", which i feel have the same purpose. What is their difference? why has this redundancy been created?
Also, right now, if the raphael-min.js file is not included in the libraries, this error is shown when starting a test:
Warning: file_get_contents(sites/all/libraries/raphael/raphael-min.js): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1488 of /var/www/drupal/local/includes/locale.inc).It would be more clear, if you checked for the js file before "drupal_add_js"-ing it, and showed a more meaningful error message, like "Your test need the raphael-min.js file, please include it according to Language Tests README." or something similar.
I'll try to give you another review as soon as i have the time.
Comment #27
ed@moskvin.ca commentedHerom, thank you for review.
"Enabled" tests are available for students in the teacher's group only. Whereas "enabled" && "public" tests are available for everyone.
I think your comments on two levels of access and raphael-min.js are very valuable. I'll try to find some time to make these changes soon.
Comment #28
herom commentedHere's another review, as I promised:
You shouldn't use hook_init to add css or js files to your module.
Source: hook_init api docs
another thing i noted, inside your hook_help code, is the use of urls in translatable texts. This is not good.
Because you can't change the url, without the translators having to translate the strings again.
The general rule is to keep the markup, but put the url as parameter, for example: t('<a href="@url">text</a>', ...)
also, fix strings like the t('Now you can create 9 types of tests:'); which means we have to translate the string, again, each time you add a new type of test; Add the number as a parameter to t().
For more information on using t(), check here:
http://drupal.org/node/322774
Comment #29
herom commentedComment #30
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #30.0
klausiMoved master -> 7.x-1.x-dev