ICS4U Test 1 (Alternate) - HTML / JS / PHP

This test has three tasks. It is due at the end of the period.

All of your work will be stored in the folder:

/students/studentFolder/XXXXXX/t1alt/

That folder already contains html.html, js.html, php.php (all empty) and camera.jpg. Put your work in those files.

TaskFileWeight
1 - HTMLhtml.html50%
2 - JavaScriptjs.html25%
3 - PHPphp.php25%

Each task is marked on its own Level 1 to 4 scale based on what works. Code commenting, formatting and variable/function naming will move the mark up or down.

Task 1 - HTML (50%)

Rebuild the page in the picture as closely as you can in html.html. The image is camera.jpg.

Things the picture cannot show you:

Task 2 - JavaScript (25%)

Rebuild the demo in js.html. Clicking Resize must call a function you write. Try the demo several times with different numbers to see everything it does.

Task 3 - PHP (25%)

Rebuild the demo in php.php. Reload the demo a few times and watch what changes.

$equipment = [
    ["Tripod", rand(0, 3)],
    ["Camera bag", rand(0, 3)],
    ["Zoom lens", rand(0, 3)],
    ["Flash", rand(0, 3)],
    ["Memory card", rand(0, 3)],
    ["Light reflector", rand(0, 3)]
];

Reminder: print_r($equipment); prints the whole array so you can see what is inside it.