PaferaPy Async 0.1
ASGI framework focused on simplicity and efficiency
Loading...
Searching...
No Matches
Classes | Functions | Variables
learn.card Namespace Reference

Classes

class  learn_card
 Represents a flashcard, which is the basic unit that the Pafera Learning System is based upon. More...
 

Functions

def GetAllCards (g, card)
 This function returns all child cards given a parent card. More...
 
def GetCardTitles (g, lessonids)
 This is a convenience function to get all titles for a given set of cardids. More...
 
def UpdateAllowedCards (g, obj)
 In order to facilitate teachers being able to create and sell courses on our website, we check which cards a student is able to see and deny access to anyone who has not joined the proper course. More...
 

Variables

int CARD_ANSWER = 0x20
 
int CARD_ASIDE = 0x8
 
int CARD_CHILD = 0x1
 
int CARD_COURSE = 0x1
 
int CARD_LESSON = 0x4
 
int CARD_LINK_EXAM_PROBLEM = 0x4
 
int CARD_LINK_PROBLEM = 0x1
 
int CARD_LINK_QUIZ_PROBLEM = 0x2
 
int CARD_LINK_TEST_PROBLEM = 0x3
 
int CARD_PRIVATE = 0x40
 
int CARD_PROBLEM = 0x10
 
dictionary CARD_TYPES
 
int CARD_UNIT = 0x2
 

Function Documentation

◆ GetAllCards()

def learn.card.GetAllCards (   g,
  card 
)

This function returns all child cards given a parent card.

Definition at line 102 of file card.py.

◆ GetCardTitles()

def learn.card.GetCardTitles (   g,
  lessonids 
)

This is a convenience function to get all titles for a given set of cardids.

Useful for selecting child cards.

Definition at line 117 of file card.py.

◆ UpdateAllowedCards()

def learn.card.UpdateAllowedCards (   g,
  obj 
)

In order to facilitate teachers being able to create and sell courses on our website, we check which cards a student is able to see and deny access to anyone who has not joined the proper course.

This function updates allowed cards for teachers and students.

Definition at line 79 of file card.py.

Variable Documentation

◆ CARD_ANSWER

int learn.card.CARD_ANSWER = 0x20

Definition at line 18 of file card.py.

◆ CARD_ASIDE

int learn.card.CARD_ASIDE = 0x8

Definition at line 16 of file card.py.

◆ CARD_CHILD

int learn.card.CARD_CHILD = 0x1

Definition at line 22 of file card.py.

◆ CARD_COURSE

int learn.card.CARD_COURSE = 0x1

Definition at line 13 of file card.py.

◆ CARD_LESSON

int learn.card.CARD_LESSON = 0x4

Definition at line 15 of file card.py.

◆ CARD_LINK_EXAM_PROBLEM

int learn.card.CARD_LINK_EXAM_PROBLEM = 0x4

Definition at line 29 of file card.py.

◆ CARD_LINK_PROBLEM

int learn.card.CARD_LINK_PROBLEM = 0x1

Definition at line 26 of file card.py.

◆ CARD_LINK_QUIZ_PROBLEM

int learn.card.CARD_LINK_QUIZ_PROBLEM = 0x2

Definition at line 27 of file card.py.

◆ CARD_LINK_TEST_PROBLEM

int learn.card.CARD_LINK_TEST_PROBLEM = 0x3

Definition at line 28 of file card.py.

◆ CARD_PRIVATE

int learn.card.CARD_PRIVATE = 0x40

Definition at line 19 of file card.py.

◆ CARD_PROBLEM

int learn.card.CARD_PROBLEM = 0x10

Definition at line 17 of file card.py.

◆ CARD_TYPES

dictionary learn.card.CARD_TYPES
Initial value:
1= {
2 1: 'English',
3 2: 'Chinese',
4 3: 'Russian',
5}

Definition at line 31 of file card.py.

◆ CARD_UNIT

int learn.card.CARD_UNIT = 0x2

Definition at line 14 of file card.py.