PaferaPy Async 0.1
ASGI framework focused on simplicity and efficiency
|
In the Pafera Learning System, we handle homework and classwork by issuing challenges to students. More...
Public Member Functions | |
def | __init__ (self) |
Initialize all fields at creation like a good programmer should. More... | |
def | Analyze (self, g) |
Calculates all scores and saves statistics for this challenge. More... | |
def | GetNumRemainingAttempts (self, g) |
Returns the number of remaining tries available to the current user. More... | |
![]() | |
def | __cmp__ (self, o) |
Comparing means simply subracting the database ids. More... | |
def | __eq__ (self, o) |
Two objects are equivalent if their models are the same and their IDs are the same. More... | |
def | __hash__ (self) |
We take the easy route where the hash for an object is just its database ID. More... | |
def | __init__ (self) |
Initialize all fields at creation like a good programmer should. More... | |
def | __repr__ (self) |
Simply outputs the toJSON() function with the model name. More... | |
def | __str__ (self) |
Simply calls the toJSON() function. More... | |
def | CheckPassword (self, field, password) |
This special function checks to see if the password matches the hash stored in the field. More... | |
def | GetACL (self, db) |
Since we store ACLs as a database lookup, be sure to use these getters and setters if you plan on using ACLs. More... | |
def | HasSameValues (self, o) |
While operator = only checks class and ids, this checks every field to see if two objects or an object and a dict have the same values. More... | |
def | OffsetTime (self, timeoffset) |
Change all datetime fields to the new time offset. More... | |
def | Set (self, **kwargs) |
We use this method instead of direct attribute access in order to keep track of what values have been changed. More... | |
def | SetAccess (self, access) |
Special security functions that are useful only if you have enabled security in _dbflags for the model. More... | |
def | SetACL (self, db, acl) |
ACLs in Pafera are defined as a set of rules similar to cascading style sheets. More... | |
def | SetGroup (self, groupid) |
Special security functions that are useful only if you have enabled security in _dbflags for the model. More... | |
def | SetOwner (self, ownerid) |
Special security functions that are useful only if you have enabled security in _dbflags for the model. More... | |
def | SetPassword (self, field, password) |
This special function hashes the password before saving the field. More... | |
def | ToJSON (self, fields='') |
Converts this object into a format suitable for inclusion in JSON. More... | |
def | UpdateFields (self, fieldnames) |
This is a convenience method to update fields without going through the Set() method. More... | |
Public Attributes | |
challenge | |
challengetype | |
previousresults | |
results | |
![]() | |
d | |
dbaccess | |
dbacl | |
dbaclid | |
dbgroup | |
dbowner | |
id | |
Additional Inherited Members | |
![]() | |
list | SECURE_FIELDS |
In the Pafera Learning System, we handle homework and classwork by issuing challenges to students.
Points are then calculated based upon how the students did, and grades are automatically assigned by the system.
There are a variety of challenges available, so check challenges.js to see what they are and test them to see what you can do with them.
Problems for challenges can be assigned by adding lessons, individual problems, or can be added straight from their study list.
Upon a challenge ending, the next time that you visit /learn/home.html, student scores will be automatically calculated and applied to their grades. You can then see such statistics as the average score, what percentage of students passed, which problems were often answered incorrectly, and such in the analysis section.
Definition at line 39 of file challenge.py.
def learn.challenge.learn_challenge.__init__ | ( | self | ) |
Initialize all fields at creation like a good programmer should.
Reimplemented from pafera.modelbase.ModelBase.
Definition at line 106 of file challenge.py.
def learn.challenge.learn_challenge.Analyze | ( | self, | |
g | |||
) |
Calculates all scores and saves statistics for this challenge.
Typically, this will be done automatically for you after endtime has passed.
Definition at line 132 of file challenge.py.
def learn.challenge.learn_challenge.GetNumRemainingAttempts | ( | self, | |
g | |||
) |
Returns the number of remaining tries available to the current user.
As a side effect, all previous results will be available in obj.previousresults as learn_challengeresult objects.
Definition at line 110 of file challenge.py.
learn.challenge.learn_challenge.challenge |
Definition at line 141 of file challenge.py.
learn.challenge.learn_challenge.challengetype |
Definition at line 154 of file challenge.py.
learn.challenge.learn_challenge.previousresults |
Definition at line 118 of file challenge.py.
learn.challenge.learn_challenge.results |
Definition at line 148 of file challenge.py.