Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Online Quiz

For my A level computing coursework i'm creating a web based application which displays 25 random multiple choice economics questions. The student logs in and answers them. The program will then analyse the data and suggest to the teacher what topics students are weakest on and then it suggests a lesson plan to do, with the data displayed in a graph. The lesson would suggest what Youtube videos to watch what topics to do etc.. The program will graph student's progress as well. The questions will always need to be random economics questions and the quiz may need to support images. How will i even combat this ? I know a bit of php, mysql, html, css. What language is it best to do this in ? Jquery javascript ?

1 Answer

Since you are doing quizzes (and don't want students to be able to see/reverse engineer answers), I would recommend utilizing a server side language such as PHP, Ruby, etc. You could do everything you speak of with just HTML, CSS, and Javascript, but the downside is that every student would have every single part of the problem on their computer since it is being completely ran client side, of course. There are other tricks that some people might suggest to do such as obfuscating the Javascript, but there are plenty of free de-obfuscation programs available online that will revert your work right back to its original state. You could write your code in a minified style, where variable names are "_xf", for example, instead of "studentAnswer".

Personally, I would recommend doing a mini server and having the students connect to it.

hi, thanks for the advice, i'm thinking of doing the project in ruby, but how will i get it to link to a database for the questions ? The program has to generate new data, so when the student's answer the questions from the quiz i will analyse the data and produce graphs, will i be able to do this in ruby ? Also there will be class codes for different classes so then when students sign up they can join that class.

Personally, I've done no work in Ruby. I've done some work in PHP but have little experience with MySQL. I'd recommend probably doing the Ruby course on here and doing some searching online. I know it is possible to make graphs with Ruby from the search phrase I put in: "use ruby to generate graphs". Search engines make your life a whole lot simpler haha :)

Good luck with your project!