From aa02089d1601dfc6d56badca695d42f9dd216ce0 Mon Sep 17 00:00:00 2001 From: AbhiByreddy <54539671+ThunderBird260@users.noreply.github.com> Date: Sun, 3 Mar 2024 14:44:34 -0500 Subject: [PATCH 1/2] Co-authored-by: Pranav Ramesh --- src/components/groups/studentView.jsx | 12 +- .../assignments/[code]/submissions/[id].jsx | 140 +++++++++--------- 2 files changed, 75 insertions(+), 77 deletions(-) diff --git a/src/components/groups/studentView.jsx b/src/components/groups/studentView.jsx index 93fee9f7..ead8e81f 100644 --- a/src/components/groups/studentView.jsx +++ b/src/components/groups/studentView.jsx @@ -11,12 +11,12 @@ import request from '@/utils/request'; import StudentNav from '@/components/groups/studentNav'; const defaultImages = [ - 'https://robohash.org/pranavramesh', - 'https://robohash.org/laphatize', - 'https://robohash.org/stevewilkers', - 'https://robohash.org/rickast', - 'https://robohash.org/picoarc', - 'https://robohash.org/jasoncalcanis', + '/DefaultKana.png', + '/CuteKana.png', + '/FancyKana.png', + '/ConfusedKana.png', + '/TophatKana.png', + ]; export default function StudentView({ group }) { diff --git a/src/pages/assignments/[code]/submissions/[id].jsx b/src/pages/assignments/[code]/submissions/[id].jsx index f3d232dd..1a309553 100644 --- a/src/pages/assignments/[code]/submissions/[id].jsx +++ b/src/pages/assignments/[code]/submissions/[id].jsx @@ -84,7 +84,7 @@ export default function id() { }); setLoading(false); - } catch(err) { + } catch (err) { console.log(err); } } @@ -106,7 +106,7 @@ export default function id() { async function getJson() { try { let jwt = getCookie(); - if(!jwt) { + if (!jwt) { console.log("User is not authenticated"); return; } @@ -114,7 +114,7 @@ export default function id() { let url = `${process.env.NEXT_PUBLIC_TERM_URL}get/json?jwtToken=${jwt}&assignmentID=${assignment.id}&uid=${uid}`; let requestOptions = { method: 'GET' }; let response = await fetch(url, requestOptions); - if(!response.ok) { + if (!response.ok) { console.log('Error fetching kana log'); return; } @@ -131,27 +131,27 @@ export default function id() { result = await reader.read(); } - if(!data) { + if (!data) { console.log('Error parsing kana log'); return; } let events = data.events; - for(let i = 0; i < events.length; i++) { + for (let i = 0; i < events.length; i++) { events[i].seconds = convert(events[i].timestamp); } setKanaError(true); setKanaLog(events); // [] - } catch(err) { + } catch (err) { console.log(err); } } useEffect(() => { - if(!loading) { + if (!loading) { getJson(); console.log("penguins") console.log(router.query.key) @@ -302,13 +302,6 @@ export default function id() {
- - Return Home - -
@@ -316,7 +309,7 @@ export default function id() {

{ submission && assignment ? {submission.user.firstName} {submission.user.lastName}'s Submission - : ... Submission + : ... Submission }

@@ -333,11 +326,16 @@ export default function id() { )}
- + + Return Home +

- { submission ? submission.grade : '00' }% + {submission ? submission.grade : '00'}%

@@ -410,7 +408,7 @@ export default function id() { >

{item.header} @@ -442,61 +440,61 @@ export default function id() { - - -
- - -
-
- - -
-
- - Penalty Explanation - -
-

- When configuring this assignment, you requested that attempting to guess locations was prohibited. - Typically, the student wouldn't have been penalized for changing to a directory that doesn't exist. But, because they attempted to cd into a folder that they knew wasn't there after running ls, it can be assumed that they were attempting to guess the location. As a result I gave a 5 point penalty. -

- - -

Was my penalty appropriate?

- - - -

Do you have any feedback? The AI will try to improve its grading strategy.

- - + + +
+ + +
+
+ + +
+
+ + Penalty Explanation + +
+

+ When configuring this assignment, you requested that attempting to guess locations was prohibited. + Typically, the student wouldn't have been penalized for changing to a directory that doesn't exist. But, because they attempted to cd into a folder that they knew wasn't there after running ls, it can be assumed that they were attempting to guess the location. As a result I gave a 5 point penalty. +

+ + +

Was my penalty appropriate?

+ + + +

Do you have any feedback? The AI will try to improve its grading strategy.

+ + + +
+
+
+
+
+
-
-
- - - -
-
-
-
+ +

From 6617bbe1717693d45a33add76168ad5da33941c5 Mon Sep 17 00:00:00 2001 From: Pranav Ramesh Date: Tue, 5 Mar 2024 23:38:35 -0500 Subject: [PATCH 2/2] Hide terminals for /practice --- src/pages/challenges/[id].jsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/pages/challenges/[id].jsx b/src/pages/challenges/[id].jsx index d25326cb..426485d3 100644 --- a/src/pages/challenges/[id].jsx +++ b/src/pages/challenges/[id].jsx @@ -507,7 +507,7 @@ export default function Challenge() {
-

+

{' '} Challenge Description{' '}

@@ -518,7 +518,7 @@ export default function Challenge() { onClick={likeChallenge} className="card-body m-1 flex rounded-md bg-neutral-800 px-10 py-2 hover:bg-neutral-700" > -

+

{likeCount}

@@ -555,8 +555,8 @@ export default function Challenge() {
@@ -581,9 +581,9 @@ export default function Challenge() { Submit Flag @@ -591,6 +591,10 @@ export default function Challenge() {
+ +
+

Public terminals are temporarily unavaliable. Some challenges that require pre-configured enviroments may not be solvable.

+
-
+
{' '} @@ -713,8 +717,8 @@ export default function Challenge() {
}
-
-

Comments

+
+

Comments