more better well factoredness
This commit is contained in:
@ -17,14 +17,14 @@ class Item(BaseModel):
|
||||
def irf(self, solver_run, theta):
|
||||
return ItemResponseFunction(solver_run.irt_model).calculate(b_param=self.b_param,theta=theta)
|
||||
|
||||
def get_attribute(self, id, value):
|
||||
def get_attribute(self, ref_attribute):
|
||||
for attribute in self.attributes:
|
||||
if attribute.id == id and attribute.value == value:
|
||||
if attribute.id == ref_attribute.id and attribute.value == ref_attribute.value:
|
||||
return attribute.value
|
||||
return False
|
||||
|
||||
def attribute_exists(self, id, value):
|
||||
def attribute_exists(self, ref_attribute):
|
||||
for attribute in self.attributes:
|
||||
if attribute.id == id and attribute.value == value:
|
||||
if attribute.id == ref_attribute.id and attribute.value == ref_attribute.value:
|
||||
return True
|
||||
return False
|
Reference in New Issue
Block a user