<commit_before><?php

require_once 'SwatDB/SwatDB.php';
require_once 'SwatDB/SwatDBClassMap.php';
require_once 'Swat/SwatDate.php';
require_once 'Swat/SwatTableStore.php';
require_once 'Swat/SwatDetailsStore.php';
require_once 'Admin/pages/AdminIndex.php';
require_once 'Admin/AdminTitleLinkCellRenderer.php';
require_once 'CME/CME.php';
require_once 'CME/dataobjects/CMEProviderWrapper.php';
require_once 'CME/dataobjects/CMEEvaluationReportWrapper.php';

/**
 * @package   CME
 * @copyright 2011-2014 silverorange
 * @license   http://www.opensource.org/licenses/mit-license.html MIT License
 */
class CMEEvaluationReportIndex extends AdminIndex
{
	// {{{ protected properties

	/**
	 * @var array
	 */
	protected $reports_by_quarter = array();

	/**
	 * @var CMEProviderWrapper
	 */
	protected $providers;

	/**
	 * @var SwatDate
	 */
	protected $start_date;

	// }}}
	// {{{ protected function getUiXml()

	protected function getUiXml()
	{
		return 'CME/admin/components/EvaluationReport/index.xml';
	}

	// }}}

	// init phase
	// {{{ protected function initInternal()

	protected function initInternal()
	{
		parent::initInternal();

		$this->ui->loadFromXML($this->getUiXml());

		$this->initStartDate();
		$this->initProviders();
		$this->initReportsByQuarter();
		$this->initTableViewColumns();
	}

	// }}}
	// {{{ protected function initStartDate()

	protected function initStartDate()
	{
		$oldest_date_string = SwatDB::queryOne(
			$this->app->db,
			'select min(complete_date) from InquisitionResponse
			where complete_date is not null
				and inquisition in (select evaluation from CMECredit)'
		);

		$this->start_date = new SwatDate($oldest_date_string);
	}<commit_msg>Evaluations are in the front matter table, not the credit table<commit_after><?php

require_once 'SwatDB/SwatDB.php';
require_once 'SwatDB/SwatDBClassMap.php';
require_once 'Swat/SwatDate.php';
require_once 'Swat/SwatTableStore.php';
require_once 'Swat/SwatDetailsStore.php';
require_once 'Admin/pages/AdminIndex.php';
require_once 'Admin/AdminTitleLinkCellRenderer.php';
require_once 'CME/CME.php';
require_once 'CME/dataobjects/CMEProviderWrapper.php';
require_once 'CME/dataobjects/CMEEvaluationReportWrapper.php';

/**
 * @package   CME
 * @copyright 2011-2014 silverorange
 * @license   http://www.opensource.org/licenses/mit-license.html MIT License
 */
class CMEEvaluationReportIndex extends AdminIndex
{
	// {{{ protected properties

	/**
	 * @var array
	 */
	protected $reports_by_quarter = array();

	/**
	 * @var CMEProviderWrapper
	 */
	protected $providers;

	/**
	 * @var SwatDate
	 */
	protected $start_date;

	// }}}
	// {{{ protected function getUiXml()

	protected function getUiXml()
	{
		return 'CME/admin/components/EvaluationReport/index.xml';
	}

	// }}}

	// init phase
	// {{{ protected function initInternal()

	protected function initInternal()
	{
		parent::initInternal();

		$this->ui->loadFromXML($this->getUiXml());

		$this->initStartDate();
		$this->initProviders();
		$this->initReportsByQuarter();
		$this->initTableViewColumns();
	}

	// }}}
	// {{{ protected function initStartDate()

	protected function initStartDate()
	{
		$oldest_date_string = SwatDB::queryOne(
			$this->app->db,
			'select min(complete_date) from InquisitionResponse
			where complete_date is not null
				and inquisition in (select evaluation from CMEFrontMatter)'
		);

		$this->start_date = new SwatDate($oldest_date_string);
	}
{'fraction_non_alphanumeric': 0.14152319813247738, 'fraction_numerical': 0.0046688065363291505, 'mean_word_length': 4.610474631751227, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '5992819', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1119, 'n_words': 208}