Exemple #1
0
def main ():
    
    print("\nGet current class details.")
    course = raw_input("Course Number / Class Name / CRN: ")
    print("\n")
    #course = 'cs374'

    # setup table 'section'
    term = mDB.setupDB()

    #print(not course.isdigit())
    # convert the input if user entered anything other than a CRN
    if(not course.isdigit()):
        course = mConverter.convert(course)

    # use the CRN to setup the tables for student and prereq and find the students in that section
    if(course.isdigit()):
        mFind.getStudentInfo(course, term)

    # if there is more than one section of a class, and we are unable to convert the 
    # input into a CRN, we will not build the tables for student and prereqs until we have specifics
    else: 
        print(course)
Exemple #2
0
def main():

    print("\nGet current class details.")
    course = raw_input("Course Number / Class Name / CRN: ")
    print("\n")
    #course = 'cs374'

    # setup table 'section'
    term = mDB.setupDB()

    #print(not course.isdigit())
    # convert the input if user entered anything other than a CRN
    if (not course.isdigit()):
        course = mConverter.convert(course)

    # use the CRN to setup the tables for student and prereq and find the students in that section
    if (course.isdigit()):
        mFind.getStudentInfo(course, term)

    # if there is more than one section of a class, and we are unable to convert the
    # input into a CRN, we will not build the tables for student and prereqs until we have specifics
    else:
        print(course)
Exemple #3
0
def classChooser():
    className = request.form['className']
    days = request.form['days']
    time = request.form['time']

    #print className
    # setup table 'section'
    #term = mDB.setupDB()
    term = '201610'  #mDB.setupDB()
    #_title = request.form['inputTitle'] #make this the course name
    # convert the input if user entered anything other than a CRN
    if (not className.isdigit()):
        className = mConverter.convert(className)
    #print className
    # use the CRN to setup the tables for student and prereq and find the students in that section
    if (className.isdigit()):
        myString = mFind.getClassInfo(className, term)
        myString2 = mFind.getStudentInfo(className, term, days, time)
        # if there is more than one section of a class, and we are unable to convert the
        # input into a CRN, we will not build the tables for student and prereqs until we have specifics
        print myString2
        return json.dumps(str(myString2))
    else:
        return json.dumps(className)
Exemple #4
0
def classChooser():
    className = request.form['className']
    days = request.form['days']
    time = request.form['time']

    #print className
    # setup table 'section'
    #term = mDB.setupDB()
    term = '201610'#mDB.setupDB()
    #_title = request.form['inputTitle'] #make this the course name
    # convert the input if user entered anything other than a CRN
    if(not className.isdigit()):
        className = mConverter.convert(className)
    #print className
    # use the CRN to setup the tables for student and prereq and find the students in that section
    if(className.isdigit()):
        myString = mFind.getClassInfo(className, term)
        myString2 = mFind.getStudentInfo(className, term, days, time)
        # if there is more than one section of a class, and we are unable to convert the 
        # input into a CRN, we will not build the tables for student and prereqs until we have specifics
        print myString2
        return json.dumps(str(myString2)) 
    else:
        return json.dumps(className)