From 557ab86e94aad5a39f39b4e93a1a03fd078cf249 Mon Sep 17 00:00:00 2001 From: SrijaC2 Date: Mon, 15 Apr 2024 19:58:40 +0530 Subject: [PATCH 1/2] added redirect to ESPL --- Client/index.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Client/index.js b/Client/index.js index 9da684b9..158bede7 100644 --- a/Client/index.js +++ b/Client/index.js @@ -2952,11 +2952,12 @@ app.get("/tutorials/:courseId", checkSignIn, async (req, res, next) => { body.courseName = "Invalid Course"; } if (req.params.courseId === "IARE_EPSL"){ - res.render("labQuestionsTut", { - imgUsername: req.cookies.username, - data: body, - datatimer: bodytimer, - }); + // res.render("labQuestionsTut", { + // imgUsername: req.cookies.username, + // data: body, + // datatimer: bodytimer, + // }); + res.redirect("Topics") } else if (req.params.courseId === "IARE_JL"){ res.render("labQuestionsTut1", { imgUsername: req.cookies.username, @@ -2965,7 +2966,8 @@ app.get("/tutorials/:courseId", checkSignIn, async (req, res, next) => { }); } else { - res.render("questionsTut", { + + res.render("questionsTut", { imgUsername: req.cookies.username, data: body, datatimer: bodytimer, From 29cc9f5b552c5e90964ca6f841068e8a9072065b Mon Sep 17 00:00:00 2001 From: SrijaC2 Date: Tue, 16 Apr 2024 14:52:12 +0530 Subject: [PATCH 2/2] added additional page for EPSL --- Client/index.js | 11 +++++------ Client/views/labs.ejs | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Client/index.js b/Client/index.js index 158bede7..09a393c3 100644 --- a/Client/index.js +++ b/Client/index.js @@ -2952,12 +2952,11 @@ app.get("/tutorials/:courseId", checkSignIn, async (req, res, next) => { body.courseName = "Invalid Course"; } if (req.params.courseId === "IARE_EPSL"){ - // res.render("labQuestionsTut", { - // imgUsername: req.cookies.username, - // data: body, - // datatimer: bodytimer, - // }); - res.redirect("Topics") + res.render("labQuestionsTut", { + imgUsername: req.cookies.username, + data: body, + datatimer: bodytimer, + }); } else if (req.params.courseId === "IARE_JL"){ res.render("labQuestionsTut1", { imgUsername: req.cookies.username, diff --git a/Client/views/labs.ejs b/Client/views/labs.ejs index d5ab8b35..16768337 100644 --- a/Client/views/labs.ejs +++ b/Client/views/labs.ejs @@ -259,7 +259,7 @@ sem:'II SEM lABORATORY', title: 'Exercises for Essentials of Problem Solving Laboratory', description: '', - link: '/tutorials/IARE_EPSL/Topics', + link: '/tutorials/IARE_EPSL', bgColor: '#fef2f2' } // Add more feature objects here