We have developed this module separate from the current quiz module for several reasons. Initially, we tried for two months to correct the ajax issues blocking us from using the current quiz module and found the problem could not be solved without rewriting the module. As the case, we have put in a tremendous amount of work toward this module and have centered it around jQuery and AHAH so it can be easily integrated with jQuery Mobile in the coming future. Many features for our module planned include the rest of the standard question types, new types of questions developed by our adjunct psychologist, and the integration learning management functionalities for the community.
The need to moderate incoming modules is understood, however a monopoly over a module type limits innovation and diverse thinking within the community. As mentioned, we tired to fix the long standing ajax issues with the quiz module but we did not find it within our ability. It should be noted, within the Drupal community there are many modules that achieve the same function. Our quiz module is unique in that it is architected specifically for client side processing with jQuery and AHAH, the admin UI offers a different approach to managing the module, and we are developing it in such a way so it can be rapidly retrofitted to new versions of Drupal. These factors will only add the diverse Drupal community and attract future eLearning projects to Drupal. We have put in a lot of work. Please accept this module in to the Drupal community.
screenshot is attached
http://72.29.86.203/~myappsc/
This is test location here you can see the functionalities.Please login as admin/admin
and takes the links jqquiz settings for admin side and take quiz link for user side
http://drupalcode.org/sandbox/cgireeshs/1542866.git
It is mainly developed for drupal 6.x versions,suppose to do for drupal 7.x and drupal 8.x also.
Please review my codes and let me know the comments asap.
Thanks,
Gireesh
Comments
Comment #1
patrickd commentedwelcome,
I'd rather see you joining forces with the maintainers of the existing quiz module then creating a module that provides same functionality but is using ajax, are there reasons not to do so?
You are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
As installation and usage instructions are quite important for us to review, please take a moment to make your project page follow the tips for a great project page. Also create a README.txt that follows the guidelines for in-project documentation.
We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.
regards
Comment #2
cgireeshs commentedHi,
We have developed this module separate from the current quiz module for several reasons. Initially, we tried for two months to correct the ajax issues blocking us from using the current quiz module and found the problem could not be solved without rewriting the module. As the case, we have put in a tremendous amount of work toward this module and have centered it around jQuery and AHAH so it can be easily integrated with jQuery Mobile in the coming future. Many features for our module planned include the rest of the standard question types, new types of questions developed by our adjunct psychologist, and the integration learning management functionalities for the community.
The need to moderate incoming modules is understood, however a monopoly over a module type limits innovation and diverse thinking within the community. As mentioned, we tired to fix the long standing ajax issues with the quiz module but we did not find it within our ability. It should be noted, within the Drupal community there are many modules that achieve the same function. Our quiz module is unique in that it is architected specifically for client side processing with jQuery and AHAH, the admin UI offers a different approach to managing the module, and we are developing it in such a way so it can be rapidly retrofitted to new versions of Drupal. These factors will only add the diverse Drupal community and attract future eLearning projects to Drupal. We have put in a lot of work. Please accept this module in to the Drupal community.
Thanks,
Gireesh
Comment #3
brazorf commentedHello there cgireeshs
Branching
You are still developing under the master branch, please refer to patrickd links for a better branching model.
Coding standard - Indenting and Whitespace
Here you can find the coding standard best practices: http://drupal.org/coding-standards#indenting
Because of different OS used by developers, code could display really bad if you use non-standard tabbing and spacing.
Coding standard - Naming conventions
Here you can find some naming conventions info: http://drupal.org/coding-standards#naming
I refer to most of the jqquiz.page.inc function names, that are hard to read and understand. Furthermore, may i ask why to replicate several functions with different name but few (or none at all) differences?
You're still using the ?> in your .module file, check it out.
Finally, i'd like to suggest this. When it comes to big code files, such as yours, may be the best practice to separate menu callbacks (like jqquiz_add, jqquiz_edit, etc.) into a separate file; furthermore, for better code readability and maintenance, i would implement the markup in theme templates. See http://api.drupal.org/api/drupal/developer%21hooks%21core.php/function/h... (check out the template argument) and http://api.drupal.org/api/search/6/preprocess for more info: you can theme and preprocess your custom templates.
Comment #4
cgireeshs commentedhello brazorf,
i am working on the versions not on the master.i have worked on master first time.I am new to this git.i have updated the files to branch 6.x.i will updates other corrections.
Thanks,
Gireesh
Comment #5
cgireeshs commentedHi,
can you tell me which editor is using.
Comment #6
cgireeshs commentedUpdated the files please review my changes
Comment #7
cgireeshs commentedBranching
Created new branches and now working in branches
Coding standard - Indenting and Whitespace
Updated the intending and spacing
Coding standard - Naming conventions
Updated the naming conventions and function names in page.inc
and Removed the ?> in your .module file
Coding is separated the with different section.
Comment #8
brazorf commentedHello there,
i still can see some indenting issue. I'm working with a plain text editor (PSPad). Anyway, i would suggest you the pareview online tool: http://ventral.org/pareview. It could really help you find a lot of things.
Next, about function naming conventions. To achieve the best readability of your code, you should use lowercase characters, and you should separate the words with a single underscore. For example, your
function jqquiz_callbackcategory()should be something like
function jqquiz_callback_category()and so on.
In my opinion there is still something more to do: run pareview on your module, fix according to its suggesions, then submit a new review request and i'll be glad to get deeper into your code.
You're almost done, keep on the good work :)
Comment #9
cgireeshs commentedHi,
Thank you for your great comments and suggestions,i will correct it accordingly.
Gireesh
Comment #10
cgireeshs commentedHi there,
I have updated the function name declarations as per the drupal standards,Please check
Gireesh
Comment #11
xenyo commentedInstalled Module on local and did a quick review, some comments;
1. GUI icon images are missing in module, should maybe add some default ones in module.
2. Blank page if Start Quiz when installed.
3. User Interface Suggestion: Consider adding message lower in the forms as there is no indication of whether form is saved or not without scrolling back up.
4. jqquiz_gui.page.inc - file is missing
5. Your CSS is very generic and loaded on all pages, will break themes.
Comment #12
rohitjalmi commentedhow to i install this module locally?
from where i can download this module?
Comment #13
cgireeshs commentedHi there,
I am working on the files will commit the latest updates soon.
Gireesh
Comment #14
rohitjalmi commentedi got one .rar file from this link "http://drupalcode.org/sandbox/cgireeshs/1542866.git/tree/708aacc1cfe8be4..."
can i use it?
Comment #15
cgireeshs commentedHi Rohith,
yes you can try with that.still development going on there
Gireesh
Comment #16
rohitjalmi commentedone more thing i would like to ask is whethr this module is dependent on any other module?
Comment #17
Milena commentedHello, I've looked at your 6.x-1.x branch.
Automated review
Please fix issues found with automated review: http://ventral.org/pareview/httpgitdrupalorgsandboxcgireeshs1542866git
Documentation
You do not provide README.txt file.
Your project page is not very detailed, please have a look at the tips for a great project page, you may also use HTML-tags for better structure.
It would be good to add information about differences between your module and quiz module for example.
.info file
Consider changing your name to jQuery Quiz or something similar. It's not a bug, just some thoughts.
.install file
Hook implementations should contain Implementation of hook_schema().
I belive some of the fields should not be empty.
For example title field from {jqquiz} or quiz_created. Check what fields you need for sure. Other modules might have add something to your tables so it's better to set all of required fields as not null.
Consider adding foreign keys (question_id from {jqquiz_question_options} for example).
.module file
hook_help()
After each case should be a break.
Is following element really needed?
hook_perm()
Consider adding additional permission for taking a quiz. It will be good if site owner would like to show quizes only for some groups of people.
jqquiz_init()
Add prefix to all of your .css and .js files.
hook_menu()
Adding a quiz, editing it should have it's own permissions. Thats give more granular control over site content.
In your settings you have:
'access arguments' => array('administer jquery quiz configuration'),
And in settings/config:
'access arguments' => array('administer quiz configuration'),
_jqquiz_is_int()
You have very strange structures there.
(string) (int) $valueWhy such code? Use is_int or is_numeric instead.
_jqquiz_is_plain()
You are adding really unneccessary placeholder function. Just use check_plain in your code (you don't pass argument by reference, so the main idea is doing check_plain() in my opinion).
hook_data_alter() and hook_ajax_data_alter()
They look the same to me. Place theirs code in another function and call it from these hooks.
jqquiz_form()
'#value' => '<br><div id="ahah-example-new-row-wrapper2" style="clear: both;"></div>',Styles should be placed in stylesheets.
Always use t() function when you show some texts.
jqquiz_category_edit()
Some texts are not outputed through t().
_jqquiz_user_access()
You do not define permissions used in this function.
Overall
Use theme functions instead of this awful HTML code inside your module.
Use one type of quotes following http://drupal.org/coding-standards#quotes
I do not understand why I'm seeing startquiz page while I haven't added any quiz yet. What's more it generates Fatal Error!
Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/drupal.org/jqquiz/jqquiz_gui.page.inc'
Remove any commented code.
Remove any variables you are using with hook_uninstall() and variable_del().
Security issues
Use drupal_get_token() and drupal_valid_token() for checking security.
See also: http://drupalscout.com/knowledge-base/protecting-your-drupal-module-agai...
Summary
It's only small part of the review. There are some other issues I spotted. It is really good that you want to provide such functionality, but you should consider taking second view at your module at first.
There are some handful resources you can find about writing proper code and some other things:
I hope you will find them useful if you don't know them yet.
It is probably discouraging for new reviewers (like me - I was scared when I saw such amount of code ;)) to review your module due to so much code. So you probably should have apply for review bonus to get it reviewed sooner by more advanced users.
Good luck with your module application :)
Comment #18
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
Comment #18.0
klausiupdated