<commit_before><?php

include 'select_orders.php';
include 'constants.php';

$start_date = "2014-01-01";
$end_date = "2014-01-30";

$selectOrders = new SelectOrders(DATABASE_HOST, DATABASE_USER, DATABASE_PWD, DATABASE_DEFAULT_DB);

$fields = array("student_first_name", "student_last_name", "grade", "teacher",
                "_billing_first_name", "_billing_last_name", "_billing_contactphone", 
                "_billing_email", "child_from_red");
$classnames = $selectOrders->getUniqueProducts($start_date, $end_date);
$allOrderIds = array();
foreach ($classnames as &$class) {
  $input = str_replace('&', '&#038;', $class);
  $orderIds = $selectOrders->getOrderIds($input, $start_date, $end_date);
  $allOrderIds = array_merge($allOrderIds, $orderIds);
  echo $class . ": number of students = " . count($orderIds) . "\n";

  // if there are more than 0 total orders for this class, go through and print out the class list 
  if(count($orderIds) > 0) {
    $order_dict = $selectOrders->getOrderMetaData($orderIds);
    generate_csv($order_dict, $class);
    generate_md($order_dict, $class);
    generate_attendance($order_dict, $class);
  }
}

/* $allEmails = array_unique($selectOrders->getOrderEmails($allOrderIds)); */
/* foreach($allEmails as &$email) { */
/*   echo $email . ","; */
/* } */


?><commit_msg>generate csv attendance sheet too<commit_after><?php

include 'select_orders.php';
include 'constants.php';

$start_date = "2014-01-01";
$end_date = "2014-01-30";

$selectOrders = new SelectOrders(DATABASE_HOST, DATABASE_USER, DATABASE_PWD, DATABASE_DEFAULT_DB);

$fields = array("student_first_name", "student_last_name", "grade", "teacher",
                "_billing_first_name", "_billing_last_name", "_billing_contactphone", 
                "_billing_email", "child_from_red");
$classnames = $selectOrders->getUniqueProducts($start_date, $end_date);
$allOrderIds = array();
foreach ($classnames as &$class) {
  $input = str_replace('&', '&#038;', $class);
  $orderIds = $selectOrders->getOrderIds($input, $start_date, $end_date);
  $allOrderIds = array_merge($allOrderIds, $orderIds);
  echo $class . ": number of students = " . count($orderIds) . "\n";

  // if there are more than 0 total orders for this class, go through and print out the class list 
  if(count($orderIds) > 0) {
    $order_dict = $selectOrders->getOrderMetaData($orderIds);
    generate_csv($order_dict, $class);
    generate_md($order_dict, $class);
    generate_attendance($order_dict, $class);
    generate_attendance_csv($order_dict, $class);
  }
}

/* $allEmails = array_unique($selectOrders->getOrderEmails($allOrderIds)); */
/* foreach($allEmails as &$email) { */
/*   echo $email . ","; */
/* } */


?>
{'fraction_non_alphanumeric': 0.16568047337278108, 'fraction_numerical': 0.015532544378698224, 'mean_word_length': 4.945054945054945, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 15, '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': '105424', 'n_tokens_mistral': 960, 'n_tokens_neox': 915, 'n_words': 182}