Logo Search packages:      
Sourcecode: uligo version File versions  Download package

def uligo::PbmRecord::store (   self,
  correct 
)

After a problem has been answered, this function is called to update the list. 

Definition at line 277 of file uligo.py.

00277                             :
        """ After a problem has been answered, this function is called to update the list. """
        if self.handleCurrent < 0 or self.modeVar.get() == 2:            
            return
        i = self.handleCurrent
        self.pbmsAsked = self.pbmsAsked + 1
        newEntry = (self.list[i][0], self.list[i][1]+1, self.pbmsAsked,   # update no. of times asked,
                    self.list[i][3]+correct, self.list[i][4]+1-correct)   # and no. of right/wrong answers
        
        self.list[i:i+1] = []   # delete old entry
        if correct:             # and insert new one
            self.list.append(newEntry)
            self.noRight = self.noRight + 1
        else:
            l = randint(self.noOfPbms/2, 2*self.noOfPbms/3)
            self.list.insert(l, newEntry)
            self.noWrong = self.noWrong + 1


    def saveToDisk(self):


Generated by  Doxygen 1.6.0   Back to index