<commit_before><?php
class EvaluationRubricDetail extends AppModel
{
  var $name = 'EvaluationRubricDetail';
  var $actsAs = array('Traceable');
  
  var $belongsTo = array('EvaluationRubric' =>array(
										'className' => 'EvaluationRubric',
									 	'foreignKey' => 'evaluation_rubric_id'
									 			   )
						);
  
	function getByEvalRubricIdCritera($rubricId=null, $criteriaNum=null){
//	  $sql = 'evaluation_rubric_id='.$rubricId;
//	  if ($criteriaNum != null) {
//	    $sql .= ' AND criteria_number='.$criteriaNum;
//	  }
//		return $this->find($sql);
            /*$conditions = array('evaluation_rubric_id' => $rubricId);
            if ($criteriaNum != null)
                $conditions = array('criteria_number' => $criteriaNum);
            return $this->find('first', array(
                'conditions' => $condtions
            ));*/
		if($criteriaNum != null)
			return $this->find('first', array('conditions'=>array('evaluation_rubric_id'=>$rubricId , 'criteria_number'=>$criteriaNum)));
		else $this->find('first', array('conditions'=>array('evaluation_rubric_id'=>$rubricId)));	
	}
	
	function getAllByEvalRubricId($rubricId=null, $criteriaNum=null){
//	  $sql = 'evaluation_rubric_id='.$rubricId;
//	  if ($criteria != null) {
//	    $sql .= ' AND criteria_number='.$criteria;
//	  }
//		return $this->find('all',$sql);
            /*$conditions = array('evaluation_rubric_id' => $rubricId);
            if ($criteriaNum != null)
                $conditions = array('criteria_number' => $criteriaNum);
            return $this->find('all', array(
                'conditions' => $condtions*/
			if($criteriaNum != null)
				return $this->find('all', array('conditions'=>array('evaluation_rubric_id'=>$rubricId, 'criteria_number'=>$criteriaNum)));
			else return $this->find('all', array('conditions'=>array('evaluation_rubric_id'=> $rubricId)));
	}	
}

?><commit_msg>(1) Removed weird condition on functions in evaluation_rubric_detail model<commit_after><?php
class EvaluationRubricDetail extends AppModel
{
  var $name = 'EvaluationRubricDetail';
  var $actsAs = array('Traceable');
  
  var $belongsTo = array('EvaluationRubric' =>array(
										'className' => 'EvaluationRubric',
									 	'foreignKey' => 'evaluation_rubric_id'
									 			   )
						);
  
	function getByEvalRubricIdCritera($rubricId=null, $criteriaNum=null){
//	  $sql = 'evaluation_rubric_id='.$rubricId;
//	  if ($criteriaNum != null) {
//	    $sql .= ' AND criteria_number='.$criteriaNum;
//	  }
//		return $this->find($sql);
            /*$conditions = array('evaluation_rubric_id' => $rubricId);
            if ($criteriaNum != null)
                $conditions = array('criteria_number' => $criteriaNum);
            return $this->find('first', array(
                'conditions' => $condtions
            ));*/
          return $this->find('first', array('conditions'=>array('evaluation_rubric_id'=>$rubricId , 'criteria_number'=>$criteriaNum)));
		
	}
	
	function getAllByEvalRubricId($rubricId=null){
//	  $sql = 'evaluation_rubric_id='.$rubricId;
//	  if ($criteria != null) {
//	    $sql .= ' AND criteria_number='.$criteria;
//	  }
//		return $this->find('all',$sql);
            /*$conditions = array('evaluation_rubric_id' => $rubricId);
            if ($criteriaNum != null)
                $conditions = array('criteria_number' => $criteriaNum);
            return $this->find('all', array(
                'conditions' => $condtions*/
          return $this->find('all', array('conditions'=>array('evaluation_rubric_id'=> $rubricId)));
	}	
}

?>
{'fraction_non_alphanumeric': 0.17623984309330346, 'fraction_numerical': 0.0002801905295601009, 'mean_word_length': 3.1559953434225845, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 52, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2750991', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1140, 'n_words': 181}