public static function getTeacherAttributeValue($teacher, $attribute){
$result = '';
switch($attribute){
case '1': //capacity
$result = AttributeValue::model()->findByAttributes(array('teacher'=>$teacher, 'attribute'=>$attribute))->value;
break;
case '2': //trainer's students
$result = TeacherHelper::getTrainerStudents($teacher);
break;
case '3': //consultant_modules
$result = TeacherHelper::getConsultantModules($teacher);
break;
case '4':// leader's projects
$result = TeacherHelper::getLeaderProjects($teacher);
break;
case '6'://leader's modules
$result = TeacherHelper::getLeaderModules($teacher);
break;
case '7'://author's modules
$result = TeacherHelper::getLeaderModules($teacher);
break;
case '8'://leader's capacity
$result = AttributeValue::model()->findByAttributes(array('teacher'=>$teacher, 'attribute'=>$attribute))->value;
break;
default:
$result = AttributeValue::model()->findByAttributes(array('teacher'=>$teacher, 'attribute'=>$attribute))->value;
}
return $result;
}