Commit b81b048a authored by Daniel W Bond's avatar Daniel W Bond
Browse files

fixed teh merge problemz

parents b13f9347 3ae2dc5c
Advisor
===
# Advisor
SRCT Advisor is a dynamic web application that lets users create, compare, and save course trajectories towards graduation. Not intended as a replacement for formal academic advising.
SRCT Advisor is a dynamic web application that lets users create, compare, and
share course trajectories towards graduation. (Not intended as a replacement for
formal academic advising.)
On Contributing
---
## On Contributing
Advisor is still in its very early states and needs all the help it can get. Even if you don't feel like you can be helpful the more technical aspects, we definitely need designers, technical writers, and testers.
Advisor is still in its very early states and needs all the help it can get.
Even if you don't feel like you can be helpful the more technical aspects, we
definitely need designers, technical writers, and testers.
There are many things that can be done with this project (see the "To Do" section), but sometimes it's the small things that count, so don't be afraid of contributing just a small spelling mistake.
There are many things that can be done with this project (see the "To Do"
section), but sometimes it's the small things that count, so don't be afraid of
contributing just a small spelling mistake.
If you need help at all please contact and SRCT member. We want people to contribute, so if you are struggling, or just want to learn we are more than willing to help.
If you need help at all please contact and SRCT member. We want people to
contribute, so if you are struggling, or just want to learn we are more than
willing to help.
The project lead for this project is **Daniel Bond**. *dbond2@gmu.edu*
Please visit the [SRCT Wiki](http://wiki.srct.gmu.edu/) for more information on this and other SRCT projects, along with other helpful links and tutorials.
Please visit the [SRCT Wiki](http://wiki.srct.gmu.edu/) for more information
on this and other SRCT projects, along with other helpful links and tutorials.
Setup
---
## Setup
To get started, you'll need the following installed:
* [Python 2.7.3](http://www.python.org/download/)
* [Django 1.6](https://www.djangoproject.com/download/)
* [Git](http://git-scm.com/book/en/Getting-Started-Installing-Git/)
* [Pip](http://www.pip-installer.org/en/latest/installing.html)
* [virtualenv](http://www.virtualenv.org/en/latest/index.html#installation)
Type the following commands in your terminal (if you're on Windows, [Cygwin](http://www.cygwin.com/) is recommended, or you can install a [virtual machine](https://www.virtualbox.org/wiki/Downloads) and install a distribution of [Linux](http://www.ubuntu.com/download/desktop) to it (select the 32 bit version).
Type the following commands in your terminal (if you're on Windows,
[Cygwin](http://www.cygwin.com/) is recommended, or you can install a
[virtual machine](https://www.virtualbox.org/wiki/Downloads) and install a
distribution of [Linux](http://www.ubuntu.com/download/desktop) to it (select
the 32 bit version).
(also, ssh keys...)
``bash``
``git clone http://git.gmu.edu/srct/advisor.git``
``cd advisor``
``mkdir ~/.virtualenvs``
``virtualenv ~/.virtualenvs/advisor``
``source ~/.virtualenvs/advisor/bin/activate``
``pip install -r requirements.txt``
create the database
``python manage.py schemamigration trajectories --initial``
``python manage.py syncdb`` (the username and password are just for your machine-- you can set it as merely "me" and "password" if you like)
``python manage.py syncdb`` (the username and password are just for your
machine-- you can set it as merely "me" and "password" if you like)
``python manage.py runserver``
Next, open your web broswer of choice, and go to http//:127.0.0.1:8000/. You won't see too much. You'll need to add the courses and programs to the database.
Next, open your web broswer of choice, and go to http//:127.0.0.1:8000/. You
won't see too much. You'll need to add the courses and programs to the database.
I've written some documentation in the docs folder about using the admin
interface and creating some models. Use the same username and password you set
up when you did the `syncdb` command.
## How Advisor Works
### Models
Model fields are pretty well commented up, but here's a high-level view on how
everything comes together.
#### Courses
Each Course has basic information (name, department, credits), but more
importantly has prerequisites and corequisites. Prereqs and Coreqs can accept
null values or lists of other courses. This is how we know whether a student may
take a class.
#### CourseCollections
A CourseCollection is a section of required courses in a program. Usually,
programs require that a student must take some of these courses and some of
those. CourseCollections are a list of all possible courses and the number of
which are required, from all to just one.
#### Programs
A Program is list of CourseCollections, representing a major, minor, or general
education requirements. All majors take a gened course.
#### Students
Students have the standard user fields, their well as all of their planned
trajectories, and a big ol' list of all of the courses they have completed.
#### Trajectories
I've written some documentation in the docs folder about using the admin interface and creating some models. Use the same username and password you set up when you did the `syncdb` command.
Trajectories represent a student's paths to graduation, represented structurally
as a tree. A student's existing courses (or if null, their anticipated first
semester of classes) represents the root of the tree, and a student's potential
paths towards graduation with different majors representing different branches
out. Each subsequent trajectory represents a subsequent semester. This makes it
simple to represent students' changes to their trajectories and their different
pathways out to different major options. Each takes a trajectory
"previousCourses", which represents the node's immediate predecessor.
To-do
---
Already completed courses are kept in a bulk list with each student, and
potential courses are adjusted accordingly.
**First orders of business**
What users save and see as "trajectories" on their home page are each discrete
path to each end node on the branches, e.g. Art History Path I, Art History Path
II. Modification is therefore as simple as addition of a few new pointers. Each
trajectory is also associated with a specific list of programs.
*Matters of Functionality*
* how do you make coreqs work? right now it assumes that a coreq has to come first, but that's obviously not how they work
* there are going to be some issues if you can name a trajectory, but each sememester is actually a trajectory...
* Display when the student is going to graduate, and accept the semester number for trajectories
Trajectories also track their distance from the root, providing the user with
the number of semesters until graduation.
### Templates
#### index
This is where students can create a new trajectory. If students haven't yet
already selected the classes they've taken, they can select those classes here.
#### create
Based on the information passed in from the 'index' page, this page shows
which classes a student is allowed to take the subsequent semester,
depending on the prereqs and coreqs. It will use ajax to allow the student
to select their classes and have their next allowed classes returned until
they have completed their program.
#### student
This template acts as a dashboard for each student, showing their saved
trajectories, allows them to adjust the classes they've taken, etc.
Later along, it will have some social features, like following public
trajectories or seeing what classes their "friends" are taking.
#### trajectory / course
These templates just display a trajectory or a course on their own for
inspection. Trajectories can be made public and shared.
#### compare
This page allows students to compare side-by-side up to three trajectories,
of their own or others that are public. Analytics are preformed over the
selected trajectories and displayed, showing, for instance, which has the
most courses, which has the most courses 300+, and more.
#### analysis
This template (to be created in further on) shows which classes are the most
popular, how long on average each completed trajectory takes, popular classes
for certain parts of a major, and more.
I'd like the site to also have a separate app for taking the classes that a
student wants to take for a given semester, and when that semester rolls by,
it'd perform something along the lines of gmu.schedulizer.com for them,
along with the aforementioned social aspects.
#### login
I'd like this page to have a bit more information, since this is the page
that students will eventually be directed to if they haven't logged in. It
might talk about some of the features and such.
## To-do
### First orders of business
#### Matters of Functionality
* coreqs are listed with each model already, but there must be javascript on the
page preventing students from selecting a course without selecting another in
order for that to mean anything
* Add support for APs, and fix the "login required" stuff
* Javascript to count the number of credits selected
*Forms and Views*
* some sort of javascript on the comparison page
* Forms on the index and create pages need to submit information
* Forms on index and create pages also need to expand to an additional fields; also needs to take into consideration the max available, show alerts
* does the create page need to reload in between submissions? ajax or a new page? **different page for now, that might actually be "better"**
#### Forms and Views
* JavaScript on the comparison page so that selected trajectories are loaded
immediately
* Analytic functions for comparing trajectories and some corresponding d3
visualization
* Forms on the index and create pages need to submit **actually** information
* Forms on index and create pages also need to expand to an additional fields;
also needs to take into consideration the max available, show alerts
* Create page requires AJAX, allowing for continual reloading until program(s)
are completed, then redirect to a student's main page.
* LDAP auth/login
* comparison page needs some lovely analytics on the compared trajectories for the user
* comparison page needs some lovely analytics on the compared trajectories for
the user
* polishing, like privacy policy
*Database and Webscraping*
#### Database and Webscraping
* scraping the site to populate the database
* moving over to mysql
* scraping of catalog.gmu.edu for the database (this also means that with a single command everyone can be working on the same database :3)
* autocomplete js for the course name field (after a user puts in the department abbreviation and the course name (note unlike bookshare this information needn't be editable)
* scraping of catalog.gmu.edu for the database (this also means that with a
single command everyone can be working on the same database :3)
* autocomplete js for the course name field (after a user puts in the department
abbreviation and the course name (note unlike bookshare this information needn't
be editable)
* map "Second Semester Junior" and the like to numbers for the graduation feature
**Pipe Dreams**
### Pipe Dreams
* Making trajectories "public" within the system, so that they can be shared with other students.
* Making trajectories "public" outside of the system, so that they can be shared on social and messaging sites.
* Making trajectories "public" within the system, so that they can be shared
with other students.
* Making trajectories "public" outside of the system, so that they can be shared
on social and messaging sites.
* Support departments to create sample trajectories for their students.
* Identifying if courses are available in the semester desired, and if so, getting professor information, CRNs, and what have you.
* An integrated "schedulizer"-type app for the classes that you've selected you want for that semester.
* Make sure that the loginrequired works as initially intended, that you only need to sign in in order to save or compare trajectories... this way prospective students can put their potential trajectories together
NOTE: A lot of musings about how the project will work are in a text file alongside the views and models. Please see if you can follow at all what I'm talking about.
* Identifying if courses are available in the semester desired, and if so,
getting professor information, CRNs, and what have you.
* An integrated "schedulizer"-type app for the classes that you've selected you
want for that semester.
About GMU SRCT
---
## About GMU SRCT
......@@ -12,15 +12,15 @@ body {
min-height: 100%;
height: auto;
/* Negative indent footer by its height */
margin: 0 auto -25px;
margin: 0 auto -30px;
/* Pad bottom by footer height */
padding: 0 0 25px;
padding-top: 25px;
padding: 0 0 30px;
padding-top: 30px;
}
/* Set the fixed height of the footer here */
#footer {
height: 60px;
height: 30px;
background-color: #f5f5f5;
text-align: center;
}
{% extends 'layouts/base.html' %}
{% block title %}
{% endblock %}
{% block content %}
{% endblock %}
......@@ -24,25 +24,29 @@ GMU Advisor
<fieldset>
<legend>Select your courses(s).</legend>
<div class="form-group">
<label for "departmentAbbr" class="col-sm-2">Department Abbreviation</label>
<div class="col-sm-1">
<input type="text" class="form-control" id="Program" placeholder="ENGH">
</div>
<label for "courseNumber" class="col-sm-1">Course Number</label>
<div class="col-sm-1">
<input type="text" class="form-control" id="Program" placeholder="302">
</div>
<!-- Name loads automatically -->
<label for "name" class="col-sm-1">Name</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="Program" placeholder="Advanced Composition">
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary">+</button>
</div>
<!-- not sure how to have a zillion of these fields keep on appearing -->
</div>
{% if courses %}
<div class="alert alert-info">Do you need to update the courses you've already taken?</div>
{% else %}
<div class="form-group">
<label for "departmentAbbr" class="col-sm-2">Department Abbreviation</label>
<div class="col-sm-1">
<input type="text" class="form-control" id="Program" placeholder="ENGH">
</div>
<label for "courseNumber" class="col-sm-1">Course Number</label>
<div class="col-sm-1">
<input type="text" class="form-control" id="Program" placeholder="302">
</div>
<!-- Name loads automatically -->
<label for "name" class="col-sm-1">Name</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="Program" placeholder="Advanced Composition">
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary">+</button>
</div>
<!-- not sure how to have a zillion of these fields keep on appearing -->
</div>
{% endif %}
<legend>Select your program(s).</legend>
<div class="form-group">
......
......@@ -26,6 +26,18 @@ class Course(BaseModel):
courseDescription = models.TextField()
credits = models.IntegerField()
# catalog year for the course
catalogYear = models.DateField()
# needs to be associated with a student, may not belong here
isCompleted = models.BooleanField(False)
def isUpperClass:
if courseNumber > 300:
return True:
else:
return False
# available next semester?
# CRN
# section number
......@@ -54,6 +66,13 @@ class CourseCollection(BaseModel):
# how many of those are required
numReq = models.IntegerField()
# function to determine if there is a difference between this and last year
# not everything changes-- should be able to multiple reference to one thing
# catalog year for the coursecollection
catalogYear = models.DateField()
# if the course collection's numreq is met
isCompleted = models.BooleanField(False)
class Program(BaseModel):
......@@ -68,8 +87,15 @@ class Program(BaseModel):
programType = models.CharField(max_length = 25)
# is BA, BS, Honors
degreeType = models.CharField(max_length = 25)
# all majors must take a gened program, null for minors, geneds
# CHECK VIEWS, MAKE SURE I DIDN'T ALREADY SOMEHOW ACCOUNT FOR THIS
degreeType = models.ManyToManyField('Program', null=True)
# catalog year for the Program
catalogYear = models.DateField()
# if all coursecollections' and gened requirements are satisfied, then the
# program is completed
isCompleted = models.BooleanField(False)
class Meta:
......@@ -85,11 +111,11 @@ class Program(BaseModel):
class Student(models.Model):
user = models.OneToOneField(User)
# does User have a slug field?
alreadyTaken = models.ManyToManyField('Course', null=True)
# all of the student's trajectories
trajectory = models.ManyToManyField('Trajectory', null=True)
# aka username, etc should all be here
......@@ -120,6 +146,10 @@ class Trajectory(BaseModel):
# def getPreviousTrajectory(Trajectory):
# return Trajectory
# the program(s) that this trajectory is completing
whichPrograms = models.ManyToManyField('Program',)
# whether or not the trajectory can be seen by others
isPublic = models.BooleanField()
# semesters since entering college
......
......@@ -109,10 +109,11 @@ def enoughCourses(coursesTaken):
# page render functions
# this is where all users not signed in are redirected
def login(request):
return render(request, 'login.html', {
#@login_required
def index(request):
courses = [] # student's courses
return render(request, 'index.html', {
"courses" : courses
},
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment