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/Gradebook/ |
Upload File : |
<? // Gradebook/GradeForm.phpinc // Display Grade form. if (da()) debugTrackBegin(); #d_Var("\$eInfo[$eId]['critical']",$eInfo[$eId]['critical'],'d'); #d_Var('$sInfo['.$sId.']',$sInfo[$sId],'d'); #d_Var("\$eInfo[$eId]",$eInfo[$eId],'d'); #d_Var("\$gradeRow",$gradeRow,'d'); // Calculate late submission. if ( isset($gradeRow['lastModified']) && $gradeRow['lastModified'] ) { $dateToUse = $gradeRow['lastModified']; } else { $dateToUse = false; } if ( !isset($sInfo[$sId]['shortname']) ) { $sInfo[$sId]['shortname'] = str_replace(array("-","'"," "),"",userName($sInfo[$sId]['userId'])); #d_Var('$sInfo['.$sId.']',$sInfo[$sId],'d'); } ?> <fieldset><legend>Grade</legend> <? /** / d_Var('$gradeRow',$gradeRow,'d') /**/ ?> <form name="form_grade_<?=$gId?>" id="form_grade_<?=$gId?>" action="<?=$_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data"> <input name="f_uuid" id="f_uuid_<?=$gId?>" type="hidden" value="<?=uuid()?>"> <input name="f_form" id="f_form_<?=$gId?>" type="hidden" value="form_grade"> <input type="hidden" name="f_classId" value="<?=quot($f_classId)?>"> <input type="hidden" name="f_sId" value="<?=quot($sId)?>"> <input type="hidden" name="f_uId" value="<?=quot($uId)?>"> <input type="hidden" name="f_eId" value="<?=quot($eId)?>"> <input type="hidden" name="f_lId" value="<?=quot($lId)?>"> <input type="hidden" name="f_gId" id="id_gId_<?=$gId?>" value="<?=$gId?>"> <input type="hidden" name="f_task" id="id_task_<?=$gId?>" value=""> <table> <? if (isset($grade_Error)) { ?> <tr><td></td><td class="error"><?=$grade_Error?></td></tr> <? } ?> <tr> <td class="right">Grade:</td> <td><input type="text" class="number3" name="f_grade" id="id_grade_<?=$gId?>" value="<?=quot($grade)?>" onClick="this.select();"> /<?=$eInfo[$eId]['points']?> points <input type="button" name="f_task" value="View lab" onClick="viewLab();"> <input type="button" name="f_task" id="GradeButton_<?=$gId?>" value="Grade <?=$eInfo[$eId]['points']?>" onClick="DisableButtons(); setGrade(<?=$eInfo[$eId]['points']?>,<?=$gId?>);"> <input type="button" name="f_task" id="GradeButton_<?=$gId?>" value="Calc grade" onClick="CalcGrade(<?=$eInfo[$eId]['points']?>,<?=$gId?>);" onMouseOver="ttShow('Calculate grade from comments.');" onMouseOut="ttHide();"> <input type="button" name="f_task" id="id__first_grade_button_<?=$gId?>" value="Grade" onClick="DisableButtons(); submitForm(this,<?=$gId?>);"> <? if ( $comment ) { ?> <input type="button" name="f_task" value="xC & grade <?=$eInfo[$eId]['points']?>" onClick="DisableButtons(); document.getElementById('id_comment_<?=$gId?>').value = ''; setGrade(<?=$eInfo[$eId]['points']?>,<?=$gId?>); document.getElementById('id_grade_button_<?=$gId?>').click();" title="Copy comments to internal, clear comments, and submit grade as <?=$eInfo[$eId]['points']?> points."> <input type="button" name="f_task" value="xC" onClick="document.getElementById('id_comment_<?=$gId?>').value = ''; document.getElementById('id_comment_<?=$gId?>').focus();" title="Clear comments."> <input type="button" name="f_task" value="cIxC" onClick="clearComment(<?=$gId?>); document.getElementById('id_comment_<?=$gId?>').focus();" title="Copy comments to internal and clear comments."> <input type="button" name="f_task" value="xI" onClick="document.getElementById('id_internal_<?=$gId?>').value = '';" title="Clear internal comments."> <? } if ( $grade != 'ng' ) { ?> <input type="button" name="f_task" id="Submitted_<?=$gId?>" value="Set ng" onClick="DisableButtons(); document.getElementById('id_grade_<?=$gId?>').value = 'ng'; submitForm(this,<?=$gId?>);" title="Mark as not graded but submitted (ng)."> <? } if ( $grade != 'ns' ) { ?> <input type="button" name="f_task" id="NotSubmitted_<?=$gId?>" value="Set ns" onClick="DisableButtons(); document.getElementById('id_grade_<?=$gId?>').value = 'ns'; submitForm(this,<?=$gId?>);" title="Mark as not-submitted (ns)."> <? } ?> <input type="button" name="f_task" id="Grade0_<?=$gId?>" value="Ask grade 0" onClick="DisableButtons(); gradeZeroRequestSubmission(<?=$gId?>);"> <? // Get student image. $query = " SELECT studentprofileImage FROM `studentprofile` JOIN `user` ON user.userId = studentprofile.userId WHERE user.userStudentId = '".$sId."' "; #d_Var('studentprofileInfo',$query,'dq'); $studentprofileInfo = query_info($query); #d_Var('$studentprofileInfo',$studentprofileInfo,'d'); if ( $studentprofileInfo ) { $studentprofileImage = '/uploads/StudentProfile/'.$sId.'/'.$studentprofileInfo['studentprofileImage']; } else { $studentprofileImage = ''; } // onMouseOver="document.getElementById('div_studentprofileImage').style.display='block';" onMouseOut="document.getElementById('div_studentprofileImage').style.display='none';" ?> <img src="<?=$studentprofileImage?>" height="50" onClick="divHideShow('div_studentprofileImage');"> <div id="div_studentprofileImage" class="hidden"><img src="<?=$studentprofileImage?>" style="max-height:600px;max-width:600px;"></div> <span id="CalcType" class="hidden bold attention nowrap">Calc type is ...</span> </td> </tr> <? // Check for uploaded files. // C:\Data_WWW\CstRidgewaterEdu\uploads\20153\MMDT1021\21\00192295\Lab01 // $_SESSION['DIRECTORY_ROOT'] == 'C:/Data_WWW/CstRidgewaterEdu/' #d_Var("\$f_classSection",$f_classSection,'d'); // Check for valid class section. if ( !$f_classSection ) { $evalDownloadURL = 'uploads/'.$_SESSION['YRTR']['User'].'/'.$f_course.'/'; $evalUploadDirectory = $_SESSION['DIRECTORY_ROOT'].$evalDownloadURL; // Get list of directories. #d_Var("file_exists($evalUploadDirectory)",file_exists($evalUploadDirectory),'d'); if ( file_exists($evalUploadDirectory) ) { if ( $handle = opendir($evalUploadDirectory) ) { while ( false !== ( $file = readdir($handle) ) ) { #d_Var($file." filetype",filetype($evalUploadDirectory.$file),'d'); if ( filetype($evalUploadDirectory.$file) == 'dir' && $file != '.' && $file != '..' ) { $f_classSection = $file; $evalDownloadURL = 'uploads/'.$_SESSION['YRTR']['User'].'/'.$f_course.'/'.$f_classSection.'/'.$sId.'/'.$eInfo[$eId]['title'].'/'; $evalUploadDirectory = $_SESSION['DIRECTORY_ROOT'].$evalDownloadURL; #d_Var("file_exists($evalUploadDirectory)",file_exists($evalUploadDirectory),'d'); if ( file_exists($evalUploadDirectory) ) { if ( $handle2 = opendir($evalUploadDirectory) ) { while ( false !== ( $file = readdir($handle2) ) ) { if ( filetype($evalUploadDirectory.$file) != 'dir' ) { $fileArray[] = $file; } } closedir($handle2); #printVar('$fileArray',$fileArray); } } } } closedir($handle); } } } else { $evalDownloadURL = 'uploads/'.$_SESSION['YRTR']['User'].'/'.$f_course.'/'.$f_classSection.'/'.$sId.'/'.$eInfo[$eId]['title'].'/'; $evalUploadDirectory = $_SESSION['DIRECTORY_ROOT'].$evalDownloadURL; $evalDownloadURL = '/'.$evalDownloadURL; #printVar("\$eInfo[$eId]",$eInfo[$eId]); #printVar('$evalUploadDirectory',$evalUploadDirectory); // C:/Data_WWW/CstRidgewaterEdu/uploads/20153/MMDT1021/21/00192295/Lab01 // C:/Data_WWW/CstRidgewaterEdu/uploads/20153/CST1021/1/00056522/Lab01 $fileArray = array(); #d_Var("\$evalUploadDirectory",$evalUploadDirectory,'d'); #d_Var("\$evalDownloadURL",$evalDownloadURL,'d'); #d_Var("file_exists($evalUploadDirectory)",file_exists($evalUploadDirectory),'d'); if ( file_exists($evalUploadDirectory) ) { if ( $handle = opendir($evalUploadDirectory) ) { while ( false !== ( $file = readdir($handle) ) ) { if ( filetype($evalUploadDirectory.$file) != 'dir' ) { $fileArray[] = $file; } } closedir($handle); #printVar('$fileArray',$fileArray); } } } $dateParts = explode(' ',$eInfo[$eId]['due']); $dateDue = valid_date($dateParts[0]); // Throw away time. #d_Var('$dateDue',$dateDue,'d'); #d_Var('$fileArray',$fileArray,'d'); if ( count($fileArray) ) { ?> <tr> <td class="right">Files:</td><td> <? $filesToShow = array('txt','png','jpg','gif'); foreach ( $fileArray as $file ) { ?><a href="<?=$evalDownloadURL?>/<?=$file?>?uuid=<?=uuid()?>"><?=$file?></a><? $ext = strtolower(substr($file,-3)); if ( in_array($ext,$filesToShow) ) { $filepath = $evalUploadDirectory.'/'.$file; showBegin(''); if ($ext == 'txt') { ?><pre class="copyText"><? require($filepath); ?></pre><? } else { #d_Var('$_SESSION',$_SESSION,'d'); $filepath = '/'.str_replace($_SESSION['DIRECTORY_ROOT'],'',$filepath); ?><img class="submitted" src="<?=$filepath?>" alt="<?=$file?>"><? } showEnd(); } ?> <? } $dueDate = valid_date($dateDue); ?><br> Due on: <?=$dueDate?>. <? #d_Var("\$gradeRow['lastModified']",$gradeRow['lastModified'],'d'); if ( isset($gradeRow['lastModified']) && $gradeRow['lastModified'] ) { $dateParts = explode(' ',$gradeRow['lastModified']); $submittedDate = valid_date($dateParts[0]); // Throw away time. if ( isset($dateParts[1]) ) { $time = ' at '.valid_time($dateParts[1]); } else { $time = ''; } ?> Submitted on: <?=$submittedDate.$time?>. <? } // Calculate late submission. #d_Var('$dateToUse',$dateToUse,'d/'); if ( $dateToUse ) { $dateParts = explode(' ',$dateToUse); $dateToUse = valid_date($dateParts[0]); // Throw away time. #d_Var('$dateToUse',$dateToUse,'d'); $dateDiff = strtotime($dateToUse) - strtotime($dateDue); #d_Var('$dateDiff',$dateDiff,'d'); $dayDiff = intval($dateDiff / (60 * 60 * 24)); #d_Var('$dayDiff',$dayDiff,'d'); if ( $dayDiff > 0 ) { if ( $dayDiff > 1 ) { $pld = 's'; } else { $pld = ''; } $weeksLate = intval( ($dayDiff-1) / 7); if ( $weeksLate > 1 ) { $plw = 's'; } else { $plw = ''; } ?> <span class="info">Late: <?=$dayDiff?> day<?=$pld?><? if ( $weeksLate >=1) { ?> (<b> <?=$weeksLate?> week<?=$plw?></b> )<? } ?>.</span> <? } } if ( isset($gradeRow['gradeGradedOn']) && $gradeRow['gradeGradedOn'] ) { $dateParts = explode(' ',$gradeRow['gradeGradedOn']); $date = valid_date($dateParts[0]); // Throw away time. if ( isset($dateParts[1]) ) { $time = ' at '.valid_time($dateParts[1]); } else { $time = ''; } ?><br> Graded on: <?=$date.$time?>. <? } } else { $dateNow = date("Y-m-d"); #d_Var('$dateNow',$dateNow,'d'); $dateDiff = strtotime($dateNow) - strtotime($dateDue); #d_Var('$dateDiff',$dateDiff,'d'); $dayDiff = intval($dateDiff / (60 * 60 * 24)); #d_Var('$dayDiff',$dayDiff,'d'); if ( $dayDiff > 0 ) { if ( $dayDiff > 1 ) { $pld = 's'; } else { $pld = ''; } $weeksLate = intval($dayDiff / 7); if ( $weeksLate > 1 ) { $plw = 's'; } else { $plw = ''; } ?> </td> </tr> <tr> <td class="right"></td><td> <? ?> This assignment is <b><?=$dayDiff?> day<?=$pld?></b><? if ( $weeksLate >=1) { ?> (<b><?=$weeksLate?> week<?=$plw?></b>) late.<? } ?> <? } } if ( stripos($comment,'Not submitted.') === false && stripos($comment,'Not graded.') === false ) { $commentText = $comment; } else { $commentText = ''; } if ( stripos($internal,'Not submitted.') === false && stripos($internal,'Not graded.') === false ) { $internalText = $internal; } else { $internalText = ''; } ?> </td> </tr> <tr> <td class="right">Attachment:</td> <td><input type="file" name="attachment" onMouseOver="ttShow('Select a file to upload.');" onMouseOut="ttHide();"></td> </tr> <tr> <td class="right">Comment:</td> <td><textarea class="resize" name="f_comment" id="id_comment_<?=$gId?>" style="width:100%;" onKeyUp="textareaResize(this);"><?=htmlView($commentText)?><? echo "\n"; ?></textarea></td> </tr> <tr> <td class="right">Internal comment:</td> <td><textarea class="resize" name="f_internal" id="id_internal_<?=$gId?>" style="width:100%;" onKeyUp="textareaResize(this);"><?=htmlView($internalText)?><? echo "\n"; ?></textarea></td> </tr> <tr> <td class="center" colspan="2"> <input type="button" name="f_task" id="id_grade_button_<?=$gId?>" value="Grade" onClick="DisableButtons(); submitForm(this,<?=$gId?>);"> <? if ( $commentText ) { ?> <input type="button" name="f_task" value="Clear comment & grade" onClick="DisableButtons(); clearComment(<?=$gId?>); document.getElementById('id_grade_button_<?=$gId?>').click();" title="Copy comments to internal, clear comments, and submit grade."> <? } ?> <input type="button" value="Close" onClick="DisableButtons(); window.close(); return false;"> <input type="hidden" name="emailGradeCheck" value="1"> <input type="checkbox" name="emailGrade" value="1"<?=$_SESSION['emailGrade']?>> Email grade. </td> </tr> <tr> <td colspan="2"> <span class="copyText"><?=$sInfo[$sId]['shortname']?></span> Replacement codes:<br> <strong>=e:</strong> <?=GradeCommentCodeReplace_e($eInfo[$eId]['title'],$f_course,$eInfo[$eId]['points'],$grade,"=e")?><br> <strong>=p:</strong> <?=GradeCommentCodeReplace_p($eInfo[$eId]['title'],$f_course,"=p")?><br> <!-- cut-and-paste text --> cut-and-paste text:<br> You are missing some of the files required for =p.<br> =e<br> Your screenshot <?=$f_course?>-<?=str_replace(" ","0",$eInfo[$eId]['title'])?>-<?=str_replace(" ","",$sInfo[$sId]['shortname'])?>.png was wrong for =p.<br> =e<br> You are missing the file for =p.<br> =e<br> </td> </tr> </table> </form> </fieldset> <style type="text/css"> textarea.resize { min-height:50px; } </style> <? /** / ?> <script type="text/javascript"> // Gradebook/GradeForm.phpinc:192. var allTextareas = document.forms[0].getElementsByTagName("textarea"); for (var i=0; i<allTextareas.length; i++) { textareaResize(allTextareas[i]); } </script> <? /**/ ?> <? #d_Var("\$sInfo[$sId]",$sInfo[$sId],'d'); if (da()) debugTrackEnd(); ?>