-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55fe468
commit 6541fae
Showing
24 changed files
with
106 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# coding: utf8 | ||
# -*- coding: utf-8 -*- | ||
|
||
import sys | ||
import os | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# coding: utf8 | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from ednet import AD | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import sys | ||
import os | ||
import subprocess | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import tempfile | ||
import time | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,63 @@ | ||
# coding: utf8from ednet import Studentfrom ednet import AD@auth.requires_membership('Students')def changepassword(): form = SQLFORM.factory( Field('old_password', 'password'), Field('new_password', 'password', requires=[IS_NOT_EMPTY(),IS_STRONG(min=6, special=1, upper=1, error_message='minimum 6 characters, and at least 1 uppercase character, 1 lower case character, 1 number, and 1 special character')]), Field('confirm_new_password', 'password', requires=IS_EXPR('value==%s' % repr(request.vars.get('new_password', None)), error_message="Password fields don't match")), submit_button="Change Password").process() user_id="empty" user_id =Student.GetUserIDFromUsername(auth.user.username) if (form.accepted): old_pw = request.vars.get('old_password') pw = request.vars.get('new_password', '') user_id = Student.GetUserIDFromUsername(auth.user.username) curr_password = Student.GetPassword(user_id) if (curr_password != old_pw): response.flash = "Incorrect old password!" elif (pw != ""): ret = Student.SetPassword(user_id, pw) if (ret != ""): response.flash = ret else: response.flash = "Password Changed." # + ret + " - " + AD.GetErrorString() elif (form.errors): response.flash = "Unable to set new password" return dict(form=form)@auth.requires_membership('Students')def index(): ret = "" return dict(message=ret) def guidtest(): from ednet import SequentialGUID l = list() l.append("GUID AS STRING") l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) l.append("GUID AT END") l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) return locals() | ||
# -*- coding: utf-8 -*- | ||
|
||
from ednet.student import Student | ||
# from ednet.ad import AD | ||
|
||
|
||
def index(): | ||
ret = "" | ||
return dict(message=ret) | ||
|
||
|
||
@auth.requires_membership('Students') | ||
def changepassword(): | ||
# response.view = "student/changepassword.html" | ||
form = SQLFORM.factory( | ||
Field('old_password', 'password'), | ||
Field('new_password', 'password', requires=[IS_NOT_EMPTY(), IS_STRONG(min=6, special=1, upper=1, | ||
error_message='minimum 6 characters, and at least 1 uppercase character, 1 lower case character, 1 number, and 1 special character')]), | ||
Field('confirm_new_password', 'password', requires=IS_EXPR('value==%s' % repr(request.vars.get('new_password', None)), | ||
error_message="Password fields don't match")), | ||
submit_button="Change Password").process() | ||
user_id = "empty" | ||
user_id = Student.GetUserIDFromUsername(auth.user.username) | ||
if form.accepted: | ||
old_pw = request.vars.get('old_password') | ||
pw = request.vars.get('new_password', '') | ||
user_id = Student.GetUserIDFromUsername(auth.user.username) | ||
curr_password = Student.GetPassword(user_id) | ||
if curr_password != old_pw: | ||
response.flash = "Incorrect old password!" | ||
elif pw != "": | ||
ret = Student.SetPassword(user_id, pw) | ||
if ret != "": | ||
response.flash = ret | ||
else: | ||
response.flash = "Password Changed." # + ret + " - " + AD.GetErrorString() | ||
elif form.errors: | ||
response.flash = "Unable to set new password" | ||
return dict(form=form) | ||
|
||
|
||
def guidtest(): | ||
from ednet.sequentialguid import SequentialGUID | ||
l = list() | ||
l.append("GUID AS STRING") | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AS_STRING)) | ||
l.append("GUID AT END") | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) | ||
l.append(SequentialGUID.NewGUID(SequentialGUID.SEQUENTIAL_GUID_AT_END)) | ||
return locals() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# try something like | ||
|
||
#from ednet.ad import AD | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# coding: utf8 | ||
# -*- coding: utf-8 -*- | ||
|
||
import uuid | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# coding: utf8 | ||
# -*- coding: utf-8 -*- | ||
import os | ||
from ednet.ad import AD | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Web2py settings | ||
from gluon import * | ||
from gluon import current | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from gluon import * | ||
from gluon import current | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
###### CanvasAPIClass | ||
from gluon import * | ||
from gluon import current | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from gluon import * | ||
from gluon import current | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__VERSION__ = "0.0.1" | ||
# -*- coding: utf-8 -*-__VERSION__ = "0.0.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
###### SequentialGUID | ||
import os | ||
import datetime | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from gluon import * | ||
from gluon import current | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import re | ||
import uuid | ||
import threading | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from gluon import * | ||
from gluon import current | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import sys | ||
|
||
MODULE_LIST = ["ednet.info", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
{{ extend 'layout.html' }}<h1>Student Resources</h1><ul><li><a href="{{=URL('student','changepassword')}}">Change Your Password</a></li></ul> | ||
{{ extend 'layout.html' }} | ||
|
||
<h1>Student Resources</h1> | ||
|
||
<ul> | ||
<li><a href="{{=URL('student','changepassword')}}">Change Your Password</a></li> | ||
</ul> |