diff --git a/routes/train.js b/routes/train.js index 6cd8c0a1..7fa9cc65 100644 --- a/routes/train.js +++ b/routes/train.js @@ -57,7 +57,7 @@ module.exports = (app, mongo) => { { username: req.user.username }, { $set: { rating: req.user.rating } } ); - res.redirect('/' /* + req.body.subject + '/chooseUnits'*/); + res.redirect('/homepage' /* + req.body.subject + '/chooseUnits'*/); }); app.post('/selQ', (req, res, next) => { diff --git a/views/private/homepage.ejs b/views/private/homepage.ejs index 7d208a32..64cf4c7f 100644 --- a/views/private/homepage.ejs +++ b/views/private/homepage.ejs @@ -93,14 +93,14 @@ borderColor: "rgba(40, 240, 110, 1)", fill: false, borderWidth: 5 - }, /*{ + }, { label: "ESS", data: ratingData["ESS"], backgroundColor: "rgba(184, 150, 191, 1)", borderColor: "rgba(184, 150, 191, 1)", fill: false, borderWidth: 5 - },*/ { + }, { label: "USABO", data: ratingData["USABO"], backgroundColor: "rgba(113, 16, 1, 1)", @@ -210,7 +210,14 @@ No rating <% } %> - + +

ESS: + <% if (user.rating.ess > 0) { %> + <%= Math.max(user.rating.ess, 0) %> + <% } else { %> + No rating + <% } %> +

USABO: <% if (user.rating.usabo > 0) { %> @@ -257,12 +264,23 @@ Bio icon + +

+
+
+
+ ESS icon +
+
+

Train for USABO!

+
- USABO icon + USABO icon
+
Train Now! diff --git a/views/private/stats.ejs b/views/private/stats.ejs index 4ddd247b..9b5d3f11 100644 --- a/views/private/stats.ejs +++ b/views/private/stats.ejs @@ -121,7 +121,7 @@ // render rating tracker charts - ["Physics", "Chemistry", "Biology", /*"ESS", */"USABO"].forEach((subject) => { + ["Physics", "Chemistry", "Biology", "ESS", "USABO"].forEach((subject) => { var ctxTracker = document.getElementById("ratingTrackerChart-" + subject); @@ -432,7 +432,7 @@ Change Biology Proficiency - +
diff --git a/views/private/train/chooseSubject.ejs b/views/private/train/chooseSubject.ejs index 814713cc..bb85974b 100644 --- a/views/private/train/chooseSubject.ejs +++ b/views/private/train/chooseSubject.ejs @@ -41,11 +41,10 @@
- + USABO Icon
ESS
-

Coming Soon!

- + Train Now!