UWFlow / rmc

Flow is a website that lets you plan courses with friends.
https://uwflow.com
MIT License
233 stars 73 forks source link

Changing course catalog url to work for graduate level courses #326

Open AllenHW opened 6 years ago

AllenHW commented 6 years ago

For example: https://uwflow.com/course/cs684

screen shot 2018-08-07 at 2 06 58 am

Clicking on the link 'www.adm.uwaterloo.ca' takes it to http://www.adm.uwaterloo.ca/cgi-bin/cgiwrap/infocour/salook.pl?level=under&sess=1189&subject=CS&cournum=684

But level should be 'grad' for the link to work: http://www.adm.uwaterloo.ca/cgi-bin/cgiwrap/infocour/salook.pl?level=grad&sess=1189&subject=CS&cournum=684

AllenHW commented 6 years ago

I'm having trouble testing the change because backfilling data with make init_data is giving the error:

PYTHONPATH=.. python data/aggregator.py courses
Traceback (most recent call last):
  File "data/aggregator.py", line 381, in <module>
    mongoengine.connect(c.MONGO_DB_RMC)
  File "/root/.virtualenv/rmc/local/lib/python2.7/site-packages/mongoengine/connection.py", line 162, in connect
    return get_connection(alias)
  File "/root/.virtualenv/rmc/local/lib/python2.7/site-packages/mongoengine/connection.py", line 126, in get_connection
    raise ConnectionError("Cannot connect to database %s :\n%s" % (alias, e))
mongoengine.connection.ConnectionError: Cannot connect to database default :
could not connect to localhost:27017: [Errno 111] Connection refused
make: *** [init_data] Error 1

I'm the using Jeff's Docker container, and had run make shell_in_docker and make local - Flow homepage ran successfully on http://localhost:5000/ I had also run mongod --config config/mongodb_local.conf which would stop on:

(rmc) root@70bea721f3e8:/rmc# mongod --config config/mongodb_local.conf
Tue Aug  7 06:10:11.555 [initandlisten] MongoDB starting : pid=94 port=27017 dbpath=./mongodb 64-bit host=70bea721f3e8
Tue Aug  7 06:10:11.555 [initandlisten] db version v2.4.14
Tue Aug  7 06:10:11.555 [initandlisten] git version: 05bebf9ab15511a71bfbded684bb226014c0a553
Tue Aug  7 06:10:11.555 [initandlisten] build info: Linux ip-10-154-253-119 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49
Tue Aug  7 06:10:11.555 [initandlisten] allocator: tcmalloc
Tue Aug  7 06:10:11.555 [initandlisten] options: { config: "config/mongodb_local.conf", dbpath: "./mongodb", journal: "true", rest: "true" }
Tue Aug  7 06:10:11.562 [initandlisten] journal dir=./mongodb/journal
Tue Aug  7 06:10:11.564 [initandlisten] recover : no journal files present, no recovery needed
Tue Aug  7 06:10:11.704 [websvr] admin web console waiting for connections on port 28017
Tue Aug  7 06:10:11.704 [initandlisten] waiting for connections on port 27017

for at least 10 minutes.

AyushK1 commented 5 years ago

Hi @AllenHW! Thanks for contributing. Are you still having trouble with testing?