<commit_before><?php

/**
 * EvaluationSimple
 *
 * @uses AppModel
 * @package   CTLT.iPeer
 * @author    <NAME> <<EMAIL>>
 * @copyright 2012 All rights reserved.
 * @license   MIT {@link http://www.opensource.org/licenses/MIT}
 */
class EvaluationSimple extends AppModel
{
    public $name = 'EvaluationSimple';
    public $actsAs = array('Traceable');

    public $belongsTo = array(
        'Event' => array(
            'className' => 'Event',
            'foreignKey' => 'event_id'
        ),
    );

    /**
     * getEvalMarkByGrpEventIdEvaluatorEvaluatee
     *
     * @param bool $grpEventId group event id
     * @param bool $evaluator  evaluator
     * @param bool $evaluatee  evaluatee
     *
     * @access public
     * @return void
     */
    function getEvalMarkByGrpEventIdEvaluatorEvaluatee($grpEventId=null, $evaluator=null, $evaluatee=null)
    {
        //return $this->find('grp_event_id='.$grpEventId.' AND evaluator='.$evaluator.' AND evaluatee='.$evaluatee);
        return $this->find('first', array(
            'conditions' => array('grp_event_id' => $grpEventId, 'submitter_id' => $evaluator, 'evaluatee' => $evaluatee)
        ));
    }

    /**
     * getResultsByEvaluator
     * gets simple_evaluation_mark objects for a specific assignment and evaluator
     *
     * @param bool $grpEventId group event id
     * @param bool $evaluator  evaluator
     *
     * @access public
     * @return void
     */
    function getResultsByEvaluator($grpEventId=null, $evaluator=null)
    {
        //return $this->find('all', 'grp_event_id='.$grpEventId.' AND evaluator='.$evaluator);
        return $this->find('all', array(
            'conditions' => array('grp_event_id' => $grpEventId, 'submitter_id' => $evaluator)
        ));
    }

    /**
     * getResultsByEvaluatee
     * gets simple_evaluation_mark objects for a specific assignment and evaluator
     *
     * @param bool $grpEventId       group event id<commit_msg>Revert use of submitter_id in eval simple.<commit_after><?php

/**
 * EvaluationSimple
 *
 * @uses AppModel
 * @package   CTLT.iPeer
 * @author    <NAME> <<EMAIL>>
 * @copyright 2012 All rights reserved.
 * @license   MIT {@link http://www.opensource.org/licenses/MIT}
 */
class EvaluationSimple extends AppModel
{
    public $name = 'EvaluationSimple';
    public $actsAs = array('Traceable');

    public $belongsTo = array(
        'Event' => array(
            'className' => 'Event',
            'foreignKey' => 'event_id'
        ),
    );

    /**
     * getEvalMarkByGrpEventIdEvaluatorEvaluatee
     *
     * @param bool $grpEventId group event id
     * @param bool $evaluator  evaluator
     * @param bool $evaluatee  evaluatee
     *
     * @access public
     * @return void
     */
    function getEvalMarkByGrpEventIdEvaluatorEvaluatee($grpEventId=null, $evaluator=null, $evaluatee=null)
    {
        //return $this->find('grp_event_id='.$grpEventId.' AND evaluator='.$evaluator.' AND evaluatee='.$evaluatee);
        return $this->find('first', array(
            'conditions' => array('grp_event_id' => $grpEventId, 'evaluator' => $evaluator, 'evaluatee' => $evaluatee)
        ));
    }

    /**
     * getResultsByEvaluator
     * gets simple_evaluation_mark objects for a specific assignment and evaluator
     *
     * @param bool $grpEventId group event id
     * @param bool $evaluator  evaluator
     *
     * @access public
     * @return void
     */
    function getResultsByEvaluator($grpEventId=null, $evaluator=null)
    {
        //return $this->find('all', 'grp_event_id='.$grpEventId.' AND evaluator='.$evaluator);
        return $this->find('all', array(
            'conditions' => array('grp_event_id' => $grpEventId, 'evaluator' => $evaluator)
        ));
    }

    /**
     * getResultsByEvaluatee
     * gets simple_evaluation_mark objects for a specific assignment and evaluator
     *
     * @param bool $grpEventId       group event id
{'fraction_non_alphanumeric': 0.13087674714104194, 'fraction_numerical': 0.0020330368487928843, 'mean_word_length': 2.7485714285714287, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5606809', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1237, 'n_words': 269}