I finally got time to finalize the installation script (was 3 months overdue) of my sample application which i created in Oracle ADF using JDeveloper 11g PS2.
Feel free to play with it identify bugs and report to me :) and I hope it would help you to learn ADF as well.
Download Application : Quiz Application version 1.0
also download Readme
Introduction:
Quiz application allows the logged in users to take random quiz from the list questions stored in the database, No of questions to ask the Admin user can set in the profile after completion of the quiz it displays the score report.
Installation:
- Open the Quiz Application in JDeveloper PS2.
- Expand the Database project.
- Right click the install.sql and run in SQL*Plus.
- Enter sys account password.
- Change your database settings in the Application Resource connection settings.
Running the Application:
- Run the main.jspx file in the ViewController Project.
- Log in as demo or admin (default user created in ADF security).
- Mark your choices you feel is correct (only one choice supported).
- Press “End Quiz” button on the last question.
- See the report and “Try Again” to go back to home page.
User Roles
- “Demo” user can only take part in quiz.
- “Admin” user can enter, modify the quiz questions and mark the correct choices.
- “Admin” can also take quiz
Known limitations (would enhance in next update):
- Currently only one correct choice per question supported.
- There is no time limit on per question (option available to set in the quiz profile).
- No history review of the quiz takers.
- Register as new user option (you can create more users in ADF security)
Happy JDeveloping,
Baig
very good example.but I need to know what is the purpose of login.html and Error.html Pages.I noticed that you use a popup window to made the user logged in,so I think that these two pages are useless? aren't they? or you use them in some way in your Application?
ReplyDeleteHi,
ReplyDeleteLogin.html and error generated automatically by ADF security. i am not using them but instead i created my own custom login window.
I have another notice,although I made many quizes both in admin or demo.I noticed that in the table of quiz_mst(Quiz master) the column of user_name is empty and also TOTAL_CORRECT_CHOICES column is always has a zero value?
ReplyDeleteYou are free to change the app upto your requirements.
ReplyDeleteI could not get the application module to be running. AM using jdeveloper 11g release 2 version. It is throwing up an exception (oracle.jbo.DMLException) JBO-27200: JNDI failure. Unable to lookup Data Source at context jdbc/QuizDS.
ReplyDeleteCould you help me with this?
Hi Das,
ReplyDeleteChange the JDBC properties in Application module configuration to JDBC URL if you want to run the application in Integrated weblogic else create a data source with the same JNDI name in weblogic.
Search this blog how to create data source
ZB
Thanks it Worked... I changed it to JDBC URL in the AppModule/
ReplyDeleteHow you you can a validation where the admin or the applicant can select only one correct choice in the answers (considering the question one correct answer) ?
Das,
ReplyDeleteYou can modify the code as per your requirement :)
ZB
This comment has been removed by the author.
DeleteI was asking... How to add that validation such that only one choice can be selected ?
ReplyDeleteIf you can help by writing the code for the bean here, it will be of great help.
Thanks
DJ
Hi Baig.
ReplyDeleteIt's a good example.
But I can't run your project.
I have this error:
Caused by: java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00201: identifier 'QUIZ_PKG.GENERATE_QUIZ' must be declared
ORA-06550: line1, column 7:
PL/SQL: Statement ignored
Could you help me?
thanks.
Hi,
DeletePlz make sure you have generated objects in the database schema.
Z
Hi Baig,
ReplyDeleteThanks for sharing the information. All your posts are very informative and very helpful.
I am working on a similar use case and could not figure out how to implement a part. Based on the user response on the current question, can we programmatically hide or display next set of questions based on some logic. Eg: For 3rd question, if i chose one specific answer, the application must not display the next 2 questions? How can we implement it?
Hi,
DeleteYou can set the view criteria programmatically based on your selection. You might need to change database model a bit.
Zeeshan
can you provide the documentation for this app please
ReplyDeleteHi,
DeleteThe source code is available but i think it is good for who is starting in ADF. I might have lot of bad practices there :)
Zeeshan
Hi can you please provide the steps.So that it would be helpful for beginners.
ReplyDeleteThere are lot of examples and tutorials in this blog go through it.
Delete