Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made all the necessary changes according to the recent timetable #142

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2885cec
Add testing scripts
AetherPrior Jun 14, 2020
b0d6a7f
Finishing touches
AetherPrior Jun 15, 2020
8194b68
Make ready for deploy
AetherPrior Aug 14, 2020
86f4040
Fix 11th hour
AetherPrior Aug 14, 2020
04d9b22
Update CONTRIBUTING.md
hvj7 Aug 20, 2020
b1c8182
Update README.md
hvj7 Aug 20, 2020
638d22d
Multiple Updates for Corona sem
AetherPrior Aug 14, 2020
8744e77
Show create page
AetherPrior Aug 16, 2020
2f71697
Merge pull request #6 from AetherPrior/Scripts
Aviral14 Oct 13, 2020
11ee9f2
add various ui changes
arcane810 Oct 13, 2020
63e66b5
support 11th hour in timetable preview
arcane810 Oct 13, 2020
294acff
Merge pull request #7 from arcane810/ui-changes
AetherPrior Oct 14, 2020
4469377
Update README.md
hvj7 Oct 24, 2020
401b921
Spacing and Resizing
hvj7 Oct 24, 2020
958d087
Adding Borders
hvj7 Oct 24, 2020
0ae6cee
Merge pull request #10 from HarshvardhanJha1/readme
Aviral14 Oct 24, 2020
3864b52
Change in orientation
AetherPrior Oct 14, 2020
45b4709
Prettier and padding
AetherPrior Oct 14, 2020
253b79e
Update timetable
hvj7 Jan 11, 2021
ebe35cc
Change color on HELForm
hvj7 Jan 11, 2021
0be49a9
Redesign Create Timetable Tab
hvj7 Jan 11, 2021
bc63d2e
Add Scrollbar
hvj7 Jan 11, 2021
483570f
Merge pull request #11 from HarshvardhanJha1/redesign
Aviral14 Jan 11, 2021
9933818
Update Images
hvj7 Jan 11, 2021
543f99c
Generic timetable update *sigh*
AetherPrior Jan 12, 2021
143eb60
Update commit *sigh*
AetherPrior Aug 17, 2021
e64ce36
Fix tt.json
AetherPrior Aug 17, 2021
7b89663
Fix logout bug, Change helform slots
AetherPrior Aug 17, 2021
4c6c566
Merge pull request #13 from crux-bphc/logout-fix
AetherPrior Aug 17, 2021
a55c76e
Applied timetable changes of 19 Aug 2021
arjav2002 Aug 19, 2021
2237ef6
Merge pull request #15 from arjav2002/master
arjav2002 Aug 19, 2021
928132a
Applied timetable changes of 19 Aug 2021
arjav2002 Aug 19, 2021
1cb7a37
conflicts fixed
arjav2002 Aug 19, 2021
9f61325
fixed formatting error
arjav2002 Aug 19, 2021
aad61a7
Middle click easter egg, TT updates
AetherPrior Aug 19, 2021
a4fd1d9
TT Bump
AetherPrior Jan 12, 2022
0515ff2
Merge pull request #18 from crux-bphc/maintenance_Sem2_2021_22
AetherPrior Jan 12, 2022
f4d5524
made timetable changes
amrataansh Jan 23, 2022
eb9201e
TimeTable Changes
amrataansh Jan 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ psd
thumb
sketch

Scripts
.vscode
client/package-lock.json
package-lock.json
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": false
}
21 changes: 9 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
# Contributing Guidelines

This Project Uses the 'Git' Workflow.There are separate master/release and dev branches.The features which you work on get merged with dev once they are reviewed.The dev branch is merged with master/release branch at the end of each sprint.

We love contributions and would be glad to help you make good patches. That out of the way, an average contribution would involve the following:

1. Fork this repository in your account.
2. Clone it on your local machine.
3. Add a new remote using `git remote add upstream https://github.com/Dryft-bits/ChronoFactorem.git`.
4. Mark the feature as 'Taken' on Pivotal Tracker on which you want to work.
5. Create a new feature branch with `git checkout -b my-feature`.
6. Make your changes.
7. Commit your changes (See [Guidelines](#commit-message-guidelines)).
8. Rebase your commits with `upstream/dev`:
3. Add a new remote using `git remote add upstream https://github.com/crux-bphc/ChronoFactorem`.
4. Create a new feature branch with `git checkout -b my-feature`.
5. Make your changes.
6. Commit your changes (See [Guidelines](#commit-message-guidelines)).
7. Rebase your commits with `upstream/master`:
- `git checkout master`
- `git fetch upstream dev`
- `git fetch upstream master`
- `git reset --hard FETCH_HEAD`
- `git checkout my-feature`
- `git rebase dev`
9. Resolve any merge conflicts, and then push the branch with `git push origin my-feature`.
10. Create a Pull Request detailing the changes you made and wait for review/merge.
- `git rebase master`
8. Resolve any merge conflicts, and then push the branch with `git push origin my-feature`.
9. Create a Pull Request detailing the changes you made and wait for review/merge.

It might seem a little complicated at a glance, but the fundamental concept is simple: we want to ensure that your changes are always made on top of the latest changes to the project and thus, we can easily merge your code. If you are facing any troubles, create a PR as you usually would and we would merge it manually. :)

Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# ChronoFactorem
A MERN stack Web App that allows students to create draft time tables
<br></br>
<kbd><img src="https://user-images.githubusercontent.com/46719471/97092039-1d586000-165e-11eb-9741-2164a67fb8bd.png"></kbd>
<br></br>
<kbd><img src="https://user-images.githubusercontent.com/46719471/104231680-54782980-5475-11eb-8ed7-470c37d97c80.png"></kbd>
<br></br>
<kbd><img src="https://user-images.githubusercontent.com/46719471/104232144-eb44e600-5475-11eb-9283-ca3a346292e3.png"></kbd>
<br></br>
<kbd><img src="https://user-images.githubusercontent.com/46719471/104232279-1fb8a200-5476-11eb-8de4-79d04aa0064c.png"></kbd>

# Contributing
See Contributing.md

# Project Team
# Original Team
+ [Harshvardhan Jha](https://github.com/HarshvardhanJha1) (Product Owner + Developer)
+ [Aviral Agarwal](https://github.com/Aviral14) (Scrum Master + Developer)
+ [Kushagra Gupta](https://github.com/Kushagra-0801) (Developer)
Expand Down
11 changes: 11 additions & 0 deletions Scripts/Courses.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import json
import random
courses = None
with open("../client/src/Timetable.json",'r') as f:
courses = (json.load(f)).keys()
_data = []
with open('./data/courses.json','w+') as f:
for i in courses:
data = {"courseId":i,"count":{"$numberInt":str(random.randint(0,300))}}
_data.append(data)
json.dump(_data,f)
46 changes: 46 additions & 0 deletions Scripts/Helform.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import json
import random

with open(
'../client/src/Timetable.json'
) as f:
timetable = json.load(f)

data = []

for course in timetable:
if course.startswith('GS') or course.startswith('HSS') or course in [
'BITS F214', 'BITS F385', 'BITS F399'
]:
data.append({
'courseName': course.lower(),
'studentsInterestedInSlot': {
'0': {
'$numberInt': str(random.randint(1, 30))
},
'1': {
'$numberInt': str(random.randint(1, 30))
},
'2': {
'$numberInt': str(random.randint(1, 30))
},
'3': {
'$numberInt': str(random.randint(1, 30))
},
'4': {
'$numberInt': str(random.randint(1, 30))
},
'5': {
'$numberInt': str(random.randint(1, 30))
},
'6': {
'$numberInt': str(random.randint(1, 30))
},
'7': {
'$numberInt': str(random.randint(1, 30))
},
}
})

with open('./data/HEL_MOCK_DATA.json', 'w+') as f:
json.dump(data, f)
33 changes: 33 additions & 0 deletions Scripts/Login_mock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import json
import random
from datetime import datetime, timedelta, timezone

data = []

START_ID = 0x5edfc6a5d4a4f36e20f98e8b

START_USER = 0x5ee5fc309e6606d76e9c0e83
END_USER = 0x5ee5fc309e6606d76e9c1000

for id_ in range(100):
#id_ = START_ID + id_
user = random.randint(START_USER, END_USER)
delta = timedelta(days=random.randint(0, 180),
seconds=random.randint(0, 86400))
creation_date = datetime.now(tz=timezone.utc) - delta
seconds = (creation_date -
datetime(1970, 1, 1, tzinfo=timezone.utc)).total_seconds()
data.append({
'userId': {
'$oid': f"{user:x}"
},
'createdAt': {
'$date': {
'$numberLong': f"{int(seconds)}{random.randint(1,999):03}"
}
},
})
data.sort(key=lambda x: x["createdAt"]["$date"]['$numberLong'])

with open('./data/login.json', 'w') as f:
json.dump(data, f)
29 changes: 29 additions & 0 deletions Scripts/Students.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import json
import names
import random
false = False
true = True
#listOfUsernames = ["Mike Hunt", "Ben Dover", "Phil M'Crack", "Mike Oxlong", "Hue Janus", "Jennah Tillias", "Ivan Tufaq", "Mike Hock"]
branch = ["CS","ECE","EEE","ENI","PHY","CHEM","ECO","BIO","CHE","CE","CHEM","PHA"]
courses = None
with open("../client/src/Timetable.json",'r') as f:
courses = (json.load(f)).keys()
year = [1,2,3,4,5]
jsonlist = []
with open('./data/students.json','w+') as f:
for i in range(0,10):
jsonStudent = {"branch":["CHEM"],"interestedCourses":[{"BIO F111":{"$numberInt":"1"}}],"name":"fdjkdfkj","email":"[email protected]","submittedForm":true,"year":{"$numberInt":"2"}}
courseInt = random.sample(courses,random.randint(1,5))
interestedCourses = [{c: {'$numberInt:': str(random.randint(1,4))}} for c in courseInt]
jsonStudent['branch'] = [random.choice(branch)]
jsonStudent['year'] = { '$numberInt': random.choice(year)}
jsonStudent['interestedCourses'] = interestedCourses
jsonStudent['submittedForm'] = random.choice([true, false])
jsonStudent['email']= "f2020"+"{:04d}".format(random.randint(1,1500))+"@hyderabad.bits-pilani.ac.in"
jsonStudent['name'] = names.get_full_name()
jsonlist.append(jsonStudent)
#jsonlist.append(json.dumps(jsonStudent))
json.dump(jsonlist,f)



46 changes: 46 additions & 0 deletions Scripts/Timetable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import copy
import json
from numpy.random import permutation
import random
from datetime import datetime, timedelta, timezone
true = True
tt = {"branch": ["CS"], "Courses": [{ "course": { "BIO F110": { "name": "Biology Laboratory", "sections": { "L1": { "instructors": ["Gireesha T Mohannath"], "sched": [{ "room": "A122", "days": ["F"], "hours": [{ "$numberInt": "4" }, { "$numberInt": "5" }] }] }, "L2": { "instructors": ["Minali Singh"], "sched": [{ "room": "A122", "days": ["Th"], "hours": [{ "$numberInt": "4" }, { "$numberInt": "5" }] }] }, "L3": { "instructors": ["Vidya Rajesh"], "sched": [{ "room": "A122", "days": ["T"], "hours": [{ "$numberInt": "4" }, { "$numberInt": "5" }] }] }, "L4": { "instructors": ["PIYUSH KHANDELIA"], "sched": [{ "room": "A122", "days": ["M"], "hours": [{ "$numberInt": "4" }, { "$numberInt": "5" }] }] }, "L5": { "instructors": ["Aishwarya Natarajan"], "sched": [{ "room": "A122", "days": ["W"], "hours": [{ "$numberInt": "4" }, { "$numberInt": "5" }] }] }, "L6": { "instructors": ["Anne Lohitha Alias Anuhya"], "sched": [{ "room": "A122", "days": ["T"], "hours": [{ "$numberInt": "7" }, { "$numberInt": "8" }] }] }, "L7": { "instructors": ["Vivek Sharma"], "sched": [{ "room": "A122", "days": ["M"], "hours": [{ "$numberInt": "7" }, { "$numberInt": "8" }] }] }, "L8": { "instructors": ["Aruku Dazo Vadeo"], "sched": [{ "room": "A122", "days": ["F"], "hours": [{ "$numberInt": "7" }, { "$numberInt": "8" }] }] }, "L9": { "instructors": ["Piyush Khandelia"], "sched": [{ "room": "A122", "days": ["W"], "hours": [{ "$numberInt": "7" }, { "$numberInt": "8" }] }] }, "L10": { "instructors": ["Bakhya Shree Gb"], "sched": [{ "room": "A122", "days": ["S"], "hours": [{ "$numberInt": "4" }, { "$numberInt": "5" }] }] }, "L11": { "instructors": ["Anne Lohitha Alias Anuhya"], "sched": [{ "room": "A122", "days": ["Th"], "hours": [{ "$numberInt": "7" }, { "$numberInt": "8" }] }] } }, "compre": { "date": "30/04", "session": "FN" } } }, "sections": ["L1"] }, { "course": { "HSS F222": { "name": "Linguistics", "sections": { "L1": { "instructors": ["PRANESH BHARGAVA"], "sched": [{ "room": "J120", "days": ["T", "Th", "S"], "hours": [{ "$numberInt": "3" }] }] } }, "compre": { "date": "06/05", "session": "AN" }, "midsem": { "date": "4/3", "time": "9.00 - 10.30AM" } } }, "sections": ["L1"] }], "isShared": true, "ownerId": { "$oid": "5edf76404d1ef40ffbc7835a" }, "name": "t4", "year": { "$numberInt": "2" }, "TimeTable": { "M": { "one": {}, "two": {}, "three": {}, "four": {}, "five": {}, "six": {}, "seven": {}, "eight": {}, "nine": {}, "ten": {} }, "T": { "one": {}, "two": {}, "three": { "courseCode": ["HSS F222"], "courseName": "Linguistics", "sectionRoom": "J120", "numHours": { "$numberInt": "1" }, "section": "L1" }, "four": {}, "five": {}, "six": {}, "seven": {}, "eight": {}, "nine": {}, "ten": {} }, "W": { "one": {}, "two": {}, "three": {}, "four": {}, "five": {}, "six": {}, "seven": {}, "eight": {}, "nine": {}, "ten": {} }, "Th": { "one": {}, "two": {}, "three": { "courseCode": ["HSS F222"], "courseName": "Linguistics", "sectionRoom": "J120", "numHours": { "$numberInt": "1" }, "section": "L1" }, "four": {}, "five": {}, "six": {}, "seven": {}, "eight": {}, "nine": {}, "ten": {} }, "F": { "one": {}, "two": {}, "three": {}, "four": { "courseCode": ["BIO F110"], "courseName": "Biology Laboratory", "sectionRoom": "A122", "numHours": { "$numberInt": "2" }, "section": "L1" }, "five": { "courseCode": ["BIO F110"], "courseName": "Biology Laboratory", "sectionRoom": "A122", "numHours": { "$numberInt": "2" }, "section": "L1" }, "six": {}, "seven": {}, "eight": {}, "nine": {}, "ten": {} }, "S": { "one": {}, "two": {}, "three": { "courseCode": ["HSS F222"], "courseName": "Linguistics", "sectionRoom": "J120", "numHours": { "$numberInt": "1" }, "section": "L1" }, "four": {}, "five": {}, "six": {}, "seven": {}, "eight": {}, "nine": {}, "ten": {} } }, "username": "fddfgd", "date": { "$date": { "$numberLong": "1591717314912" } }}
listOfUsernames = ["Mike Hunt", "Ben Dover", "Phil M'Crack", "Mike Oxlong", "Hue Janus", "Jennah Tillias", "Ivan Tufaq", "Mike Hock"]
branch = ["CS","ECE","EEE","ENI","PHY","CHEM","ECO","BIO","CHE","CE","CHEM","PHA"]
year = [1,2,3,4,5]

START_USER = 0x5ee5fc309e6606d76e9c0e83
END_USER = 0x5ee5fc309e6606d76e9c1000


fullarray = []
delta = timedelta(days=random.randint(0, 180),
seconds=random.randint(0, 86400))
creation_date = datetime.now(tz=timezone.utc) - delta
seconds = (creation_date -
datetime(1970, 1, 1, tzinfo=timezone.utc)).total_seconds()
for k in year:
branch = permutation(branch)
for j in branch:
listOfUsernames = permutation(listOfUsernames)
for i in listOfUsernames:
ttt = copy.deepcopy(tt)
ttt['branch'] = [j]
ttt['year'] = k
ttt['username'] = i
ttt['date'] = {
'date':{
'$numberLong': f"{int(seconds)}{random.randint(1,999):03}"
}
}
user = random.randint(START_USER,END_USER)
ttt['ownerId'] = {
"$oid": f'{user:x}'
}
fullarray.append(json.dumps(ttt))

with open('./data/ttfile.json','w+') as f:
for i in fullarray:
f.writelines(i+',')


6 changes: 6 additions & 0 deletions client/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": false
}
44 changes: 22 additions & 22 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.9.11",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.52",
"@testing-library/jest-dom": "^5.5.0",
"@testing-library/react": "^10.0.2",
"@testing-library/user-event": "^10.0.2",
"@types/number-to-words": "^1.2.0",
"axios": "^0.19.2",
"history": "^4.10.1",
"html2canvas": "^1.0.0-rc.5",
"js-cookie": "^2.2.1",
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.60",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@testing-library/user-event": "^13.2.1",
"@types/number-to-words": "^1.2.1",
"axios": "^0.21.1",
"history": "^5.0.1",
"html2canvas": "^1.3.2",
"js-cookie": "^3.0.0",
"materialize-css": "^1.0.0",
"number-to-words": "^1.2.4",
"react": "^16.13.1",
"react-axios": "^2.0.3",
"react-dom": "^16.13.1",
"react-redux": "^7.2.0",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.1",
"react-select": "^3.1.0",
"react": "^17.0.2",
"react-axios": "^2.0.5",
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3",
"react-select": "^4.3.1",
"react-select-tile": "^1.0.10",
"react-tabs": "^3.1.0",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"react-tabs": "^3.2.2",
"redux": "^4.1.1",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.3.0",
"use-axios-react": "^0.2.3",
"victory": "^34.1.3"
"victory": "^35.10.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
16 changes: 9 additions & 7 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ const App = () => {
<Provider store={store}>
<BrowserRouter history={history}>
<Navbar />
<Route exact path='/' component={Landing} />
<Route exact path='/checkloggedin' component={CheckLoggedIn} />
<SemiPrivateRoute exact path='/helform' component={HelForm} />
<PrivateRoute exact path='/Dashboard' component={Dashboard} />
<PrivateRoute exact path='/helData' component={HELData} />
<PrivateRoute exact path='/create' component={CreateTimeTable} />
<PrivateRoute exact path='/aboutUs' component={About} />
<Route exact path="/" component={Landing} />
<div className="body-wrapper">
<Route exact path="/checkloggedin" component={CheckLoggedIn} />
<SemiPrivateRoute exact path="/helform" component={HelForm} />
<PrivateRoute exact path="/Dashboard" component={Dashboard} />
<PrivateRoute exact path="/helData" component={HELData} />
<PrivateRoute exact path="/create" component={CreateTimeTable} />
<PrivateRoute exact path="/aboutUs" component={About} />
</div>
</BrowserRouter>
</Provider>
);
Expand Down
Loading