PaferaPy Async 0.1
ASGI framework focused on simplicity and efficiency
Loading...
Searching...
No Matches
classgrade.py
Go to the documentation of this file.
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3
4import pafera.db
6
7from pafera.validators import *
8
9# *********************************************************************
11 """The Pafera Learning System is designed to separate student
12 performance into class participation grades, review grades, and
13 persistence grades. This class tracks these grades for each student
14 to be easily compared.
15 """
16
17 _dbfields = {
18 'rid': ('INTEGER', 'PRIMARY KEY NOT NULL',),
19 'userid': ('INT', 'NOT NULL', BlankValidator()),
20 'classid': ('INT', 'NOT NULL', BlankValidator()),
21 'classscore': ('INT', 'NOT NULL DEFAULT 0',),
22 'reviewscore': ('INT', 'NOT NULL DEFAULT 0',),
23 'persistencescore': ('INT', 'NOT NULL DEFAULT 0',),
24 'finalscore': ('INT', 'NOT NULL DEFAULT 0',),
25 'numhomework': ('INT16', 'NOT NULL DEFAULT 0',),
26 'homeworkcompleted': ('INT16', 'NOT NULL DEFAULT 0',),
27 'classpercent': ('INT16', 'NOT NULL DEFAULT 0',),
28 'reviewpercent': ('INT16', 'NOT NULL DEFAULT 0',),
29 'persistencepercent': ('INT16', 'NOT NULL DEFAULT 0',),
30 'flags': ('INT16', 'NOT NULL DEFAULT 0',),
31 }
32 _dbindexes = ()
33 _dblinks = [
34 ]
35 _dbdisplay = ['userid', 'classid', 'finalscore']
36 _dbflags = 0
37
38 # -------------------------------------------------------------------
39 def __init__(self):
40 super().__init__()
The Pafera Learning System is designed to separate student performance into class participation grade...
Definition: classgrade.py:10
def __init__(self)
Initialize all fields at creation like a good programmer should.
Definition: classgrade.py:39
Base class for all database models.
Definition: modelbase.py:20
Throws an exception on blank values.
Definition: validators.py:43
Definition: db.py:1