Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
nishant0708 committed Oct 13, 2024
1 parent 3aa1078 commit ab1570e
Showing 3 changed files with 7 additions and 17 deletions.
7 changes: 0 additions & 7 deletions src/CompletedEditor/CompletedEditor.jsx
Original file line number Diff line number Diff line change
@@ -46,11 +46,9 @@ const CompletedEditor = ({ question, onOutput }) => {
};
}, []);


const handleRunClick = async () => {
const code = editorRef.current.getValue();
setUserCode(code);


const needsInputModal = (code) => {
switch (question?.compilerReq) {
@@ -102,14 +100,11 @@ const CompletedEditor = ({ question, onOutput }) => {
const output = res.data.stdout || res.data.stderr;
setUserOutput(output);
onOutput(output);


} catch (err) {
const errorOutput =
"Error: " + (err.response ? err.response.data.error : err.message);
setUserOutput(errorOutput);
onOutput(errorOutput);

} finally {
setLoading(false);
}
@@ -127,14 +122,12 @@ const CompletedEditor = ({ question, onOutput }) => {
const output = res.data.output || res.data.stderr;
setUserOutput(output);
onOutput(output);

} catch (err) {
const errorOutput =
"Error: " + (err.response ? err.response.data.error : err.message);
setUserOutput(errorOutput);
onOutput(errorOutput);
console.log(userOutput);

} finally {
setLoading(false);
}
Original file line number Diff line number Diff line change
@@ -69,11 +69,11 @@ const CompletedPaperStudentDashboard = () => {
// Function to handle card click
const handleCardClick = (studentId) => {
if (questionId) {
if(getAttemptionStatus(studentId) === "Attempted"){
if (getAttemptionStatus(studentId) === "Attempted") {
navigate(`/Evaluation/${questionId}`, {
state: { studentId, paperId }, // Correctly pass both studentId and paperId in a single state object
});
}else{
} else {
console.error("Paper not Attempted by student");
}
} else {
13 changes: 5 additions & 8 deletions src/Profile/profile.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@



/* Profile container */
.profile-card {
background-color: #282828;
@@ -25,7 +22,7 @@
object-fit: cover;
border: 5px solid rgb(255, 255, 255);
margin-top: -90px;
box-shadow: 10px 15px 60px rgba(255, 255, 255, .1);
box-shadow: 10px 15px 60px rgba(255, 255, 255, 0.1);
}

.profile-plus-icon {
@@ -62,7 +59,7 @@
}

.profile-edit-button {
background-color: #4CAF50;
background-color: #4caf50;
color: black;
border: none;
padding: 10px 20px;
@@ -125,7 +122,7 @@
}

.profile-modal-buttons button {
background-color: #4CAF50;
background-color: #4caf50;
color: black;
border: none;
padding: 10px 20px;
@@ -199,8 +196,8 @@
background-color: #c9302c;
}

.profile-edit-password-button{
background-color: #4CAF50;
.profile-edit-password-button {
background-color: #4caf50;
color: black;
border: none;
padding: 10px 20px;

0 comments on commit ab1570e

Please sign in to comment.