When | Mood | Music |
2013-04-19 19:16:00 |
OK, I’ve got as far as test 2 and History/culture lesson 2 – that’s enough to demonstrate my web-programming, ahem, skills. In place of language lesson 3, there’s a page exhorting students to buy the dead-tree-format dictionary and take the course for real.
Test 2 uses AJAX/JSN to pull the questions out of the database. This is un-necessarily complex for this context, but possibly worthwhile if I was to have lots of questions, and a script that pulled 20 random questions from this pile. Of course, the actual reason for using AJAX/JSON is to get the marks available for doing so.
it’s taken me until now to deal with the situation where a student has passed test 1, but then logs out and returns at a later date. To prevent non-linear progress, the list of lessons in the left sidebar had no links to actual lessons, apart from lesson 1. Then a student would have to go to lesson 1, then from there to test 1, and could only proceed to history/culture lesson 1 by passing test 1 (or by hacking the URL). Access to lesson 2 was only from history/culture lesson 1, and so on.
I realised today that the list of lessons needed to be augmented such that links would be in place if the student had passed relevant lessons. So it was fairly simple to make the side-bar code a PHP file (it had been a single HTML file, included into every relevant page) and then include PHP nuggets calling PHP scripts that echoed enlarged fonts, with links if relevant scores in the DB were >19. (Yes, PHP’s woeful arithmetic bug struck again. Using if (score=20) didn’t work yet again.
(Aarrgghh, I’ve just realised if (score==20) may well have worked! If so, I apologise to PHP!)
So just the admin functions (contact us, amend and delete accounts) to go…