This module creates a questions and answers area similar to StackOverflow and Yahoo Answers.
Admins can Create Sections, which can then have different Question and Answers. Both Questions and Answers are fieldable allowing the admin to specify which fields. e.g. - Admin creates a two sections, Cars and Boats. Questions/Answer in the Cars Section can have totally different fields than those in the Boats section.
Sections also have the ability to limit by role, users that are able to ask a question and users that are able to answer a question. Users also have the ability to vote on answers by way of the voting api, as well as the ability to chose the best answer.
Project page: http://drupal.org/sandbox/jadams/1748094
GIT link: http://git.drupal.org/sandbox/jadams/1748094
GIT clone: git clone --recursive --branch 7.1-1.1 http://git.drupal.org:sandbox/jadams/1748094.git qa
Comments
Comment #1
d2ev commentedhi... you have a lot of things to check here http://ventral.org/pareview/httpgitdrupalorgsandboxjadams1748094
1. qa.module :
You have functions that have only one line of code.. try to optimize it
2. It is very difficult to go through your code now. But don't forget to delete variable you have defined in your module in unistall() hook.
3. you have some empty and i hope some misplaced files like qa_answer.inc, qa_question.inc, qa_section.inc
Comment #2
j.adams commentedI apologize. It seems that gave you an older version that was very rough. But I went through and made all the needed adjustments as well as making sure that it is all up to drupal code standards. Thanks!
Comment #3
aritra.ghosh commentedHii,
Please work on following issues:
1. Remove "version" from the info file, it will be added by drupal.org packaging automatically.
2. Remove minor issues pointed out by drupal code sniffer.
Manual Review:
There are some sections like this in the module file:
3. Do you plan to reuse them at some point of time later? apparently you are not implementing any logic in there for now except for calling functions like entity_delete(). Are those required to be in seperate functions?
4. Similarly there are lots of functions with only 2-3 lines of code. Please try to optimise these.
Thanks,
Aritra
Comment #4
codycraven commentedAritra,
Regarding #3 and 4:
As a module developer I find functions like ENTITY_TYPE_save() intuitive based on the way Drupal core operates, see: node_load(); node_delete(); and, although longer, having the same naming convention, node_save().
For that reason I think these short wrapper functions do have reason enough to belong, as they will save me, and other outside developers, time from hunting trying to figure out whether the module it utilizing Entity API or some custom function with a non-intuitive name for saving the entities.
Comment #5
j.adams commentedI agree with codycraven. Those functions while simple are needed and provide an easy to use solution for developers not familiar with the entity api. I also verified with coder-review that there were no formatting issues.
Comment #6
j.adams commentedComment #7
petreej commentedHi,
I got this error after installing the module, you might be missing dependencies in your info file.
Fatal error: Class 'panels_display' not found in sites/all/modules/questions___answers/panels/pages/question.inc on line 51
Also, you have a lot of issues with coding standards as seen here:
http://ventral.org/pareview/httpgitdrupalorgsandboxjadams1748094
Regards,
Pete
Comment #8
sinasalek commentedHave you tried Answers module?
Comment #9
jpstrikesback commentedI get the following error upon enabling the module:
Fatal error: Class 'panels_display' not found in /home/sdf6c30372b8ea5d/www/sites/default/modules/1748094/panels/pages/section.inc on line 51
Comment #10
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application.
I'm a robot and this is an automated message from Project Applications Scraper.