Yes Moodle can run quizzes, compute statistics, and export the results in Excel format.
You are talking about extreme loads. Be aware that you would be the first people to try to run Moodle quizzes at this sort of load, so expect problems. They are probably surmountable, but since no-one has tried it, no one can tell you for sure.
Whatever you do, you must perform extensive load testing before putting this in front of students.
Generally, you can expect three peaks in the load, which are when problems are most likely.
1. When everyone logs in.
2. When everyone starts their test.
3. When everyone clicks 'submit all and finish'.
You will find it much easier if you can spread the load out in some way. The worst thing you can do is have someone stand at the font of a big hall and say 'Start now'. That will guarantee that every student hits the start button at exactly the same time, which maximises the chance that the server will crash.
Since you only want to use Moodle to run You can massively improve performance by completely stripping Moodle down to the bare bones.
1. Uninstall all the modules except quiz and forum.
2. Uninstall as many blocks as possible.
3. Ensure all filters are turned off.
4. Do not create any courses. Instead put the quiz on the site
front page.
5. Delete all the roles except Administrator and Logged in User.
6. Add the necessary capabilities to the Logged in User Role, so any logged in user can attempt the quiz.
7. Remove all the capabilities from the Admin role except moodle/site:doanything.
8. Remove as many capabilities as possible from the Logged in User role as possible, so they just have the ones needed to see the front page and do the quiz.
9. Remove as many blocks as possible from the front page, if you were not able to uninstall them at step 2. above.
10. Uninstall any question types you are not using. (That is, everything but multiple choice.)
These should dramatically speed up you Moodle site for taking quizzes.
In terms of some key database tables, you are aiming for to get them down to this many rows:
course 1
course_categories 1
course_modules 1 or 2
quiz 1
role 2
role_capabilities ~10
role_assignments 1 (administrator)
context ideally 3 or 4, but this may not be possible.
user ~10000
question (just the ones you are using)
question_categories 1
Once you have done all that, start load-testing. As I say, no-one has tried this before, so you will almost certainly find some potential quick performance wins in the quiz code, if you have a developer available. Post patches in the tracker, and keep talking to me (I am the maintainer of the quiz module) and it will probably be possible to get your patches reviewed and incorporated into the official Moodle distribution.
With a developer on hand, there are other ways of stripping down your site that start to look like nasty hacks, but might be worth it for the extra performance. For example;
11. Eliminate the code that updates the user_last_access table.
12. Change the add_to_log function so that it does not do anything.
13. Since you know that certain tables only have very few rows, change functions that normally load data from those tables to use hard-coded values rather than connecting to the database.
14. If you will not be using the Moodle gradebook, rip out the code that updates the scores stored there.
If you do get a good load-testing set-up, there are some questions that it would be really useful to have answers to:
A. Do my suggestions 1-10 above actually make a significant difference?
B. Which works better, putting all the questions in the quiz on one page, or splitting them up?
C. Does the choice of database engine (
MySQL or
Postgres) make a significant difference?
D. Which PHP accelerator works best in this case?
So, in summary, this project would be a big step into the unknown. Therefore, it is essential you budget for plenty of load-testing. However, it is a very interesting project to see if Moodle is capable of working at these loads, so you would probably find lots of people in the Moodle community interested in what you are doing, and able to offer advice and help.