From 53e63ab1d62e6b080b839a63eb27c62a2074eda6 Mon Sep 17 00:00:00 2001 From: Charles Severance Date: Thu, 4 Jan 2024 16:26:05 -0500 Subject: [PATCH] Add tries --- src/Grades/GradeUtil.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Grades/GradeUtil.php b/src/Grades/GradeUtil.php index ba2f3d06..a6359be3 100644 --- a/src/Grades/GradeUtil.php +++ b/src/Grades/GradeUtil.php @@ -16,7 +16,7 @@ public static function gradeLoadAll() { // Get basic grade data $stmt = $PDOX->queryDie( "SELECT R.result_id AS result_id, R.user_id AS user_id, - grade, note, R.json AS json, R.note as note, R.updated_at AS updated_at, displayname, email + grade, note, R.json AS json, R.note as note, R.updated_at AS updated_at, R.created_at AS created_at, displayname, email FROM {$p}lti_result AS R JOIN {$p}lti_user AS U ON R.user_id = U.user_id WHERE R.link_id = :LID @@ -57,7 +57,7 @@ public static function gradeLoad($user_id=false) { // Get basic grade data $stmt = $PDOX->queryDie( "SELECT R.result_id AS result_id, R.user_id AS user_id, - grade, note, R.json AS json, R.note as note, R.updated_at AS updated_at, displayname, email + grade, note, R.json AS json, R.note as note, R.updated_at AS updated_at, R.created_at AS created_at, displayname, email FROM {$p}lti_result AS R JOIN {$p}lti_user AS U ON R.user_id = U.user_id WHERE R.link_id = :LID AND R.user_id = :UID @@ -76,6 +76,7 @@ public static function gradeShowInfo($row, $url='grades.php') { } echo("Name: ".htmlent_utf8($row['displayname'])."
\n"); echo("Email: ".htmlent_utf8($row['email'])."
\n"); + echo("Started at: ".htmlent_utf8($row['created_at'])."
\n"); echo("Last Submission: ".htmlent_utf8($row['updated_at'])."
\n"); echo("Score: ".htmlent_utf8($row['grade'])."
\n"); echo("

\n"); @@ -123,8 +124,8 @@ public static function loadGradesForCourse($user_id, $context_id) global $CFG, $PDOX; $p = $CFG->dbprefix; $sql = - "SELECT R.result_id AS result_id, L.title as title, L.link_key AS resource_link_id, - R.grade AS grade, R.note AS note, R.updated_at AS updated_at + "SELECT R.result_id AS result_id, L.title as title, L.link_key AS resource_link_id, + R.grade AS grade, R.note AS note, R.updated_at AS updated_at, R.created_at AS created_at FROM {$p}lti_result AS R JOIN {$p}lti_link as L ON R.link_id = L.link_id LEFT JOIN {$p}lti_service AS S ON R.service_id = S.service_id