Beispiel #1
0
 def __init__(self):
     self.newStudent_interest = Student_interest()
     self.newCourse_interest = Course_interest()
     self.newInterest = Interest()
     self.newCourse = Course()
     self.newStudent_subscription = Student_subscription()
     self.newStudent = Student()
     self.newInstructor = Instructor()
     self.newLesson = Lesson()
Beispiel #2
0
    def __init__(self):
        if 'instructor' not in session:
            return redirect(url_for('instructor_login'))

        self.newInstructor = Instructor()
        self.newStudent_interest = Student_interest()
        self.newCourse_interest = Course_interest()
        self.newInterest = Interest()
        self.newCourse = Course()
        self.newStudent_subscription = Student_subscription()
Beispiel #3
0
	def  __init__(self):
		if 'student' not in session:
			return redirect(url_for('index'))

		self.newStudent_interest = Student_interest()
		self.newCourse_interest = Course_interest()
		self.newInterest = Interest()
		self.newCourse = Course()
		self.newStudent_subscription = Student_subscription()
		self.newStudent = Student()
		self.newInstructor = Instructor()
		self.newLesson = Lesson()
		self.newStudent_question = Student_question()
		self.newQuestion_response = Question_response()
Beispiel #4
0
    def __init__(self):
        if 'instructor' in session:
            self.loggedIn = True

        self.newStudent_interest = Student_interest()
        self.newCourse_interest = Course_interest()
        self.newInterest = Interest()
        self.newCourse = Course()
        self.newStudent_subscription = Student_subscription()
        self.newStudent = Student()
        self.newInstructor = Instructor()
        self.newLesson = Lesson()
        self.newStudent_question = Student_question()
        self.newQuestion_response = Question_response()
Beispiel #5
0
	def  __init__(self):
		if 'instructor' in session:
			self.loggedIn = True
		else:
			return redirect(url_for('instructor_login'))

		self.newStudent_interest = Student_interest()
		self.newCourse_interest = Course_interest()
		self.newInterest = Interest()
		self.newCourse = Course()
		self.newStudent_subscription = Student_subscription()
		self.newStudent = Student()
		self.newInstructor = Instructor()
		self.newLesson = Lesson()
		self.newStudent_question = Student_question()
		self.newQuestion_response = Question_response()
		self.uploadFolder = 'static/images/courses_cover_photos'
		self.allowedExtensions = set(['png', 'jpg', 'jpeg', 'gif', 'psd'])
Beispiel #6
0
def index():
    form = LoginForm()
    data = {}
    data['loggedIn'] = False
    data['form'] = form
    #data['password'] = bcrypt.hashpw('rita123'.encode('utf-8'), bcrypt.gensalt())

    if 'student' in session:
        data['loggedIn'] = True
        data['student'] = session['student']
        newStudent_interest = Student_interest()
        newStudent_subscription = Student_subscription()
        student_interests = newStudent_interest.get_student_interests(
            session['student']['name'])
        if student_interests.count() > 0:
            return redirect(url_for('dashboard'))
        else:
            return redirect(url_for('select_interests'))

    return render_template("index.html", data=data)
Beispiel #7
0
	def  __init__(self):
		self.newStudent_interest = Student_interest()
		self.newCourse_interest = Course_interest()
		self.newInterest = Interest()
		self.newCourse = Course()
		self.newStudent_subscription = Student_subscription()