<commit_before><?php
require_once "../../config.php";
require_once "peer_util.php";

use \Tsugi\Core\LTIX;

headerJson();

// Sanity checks
$LTI = LTIX::requireData();
if ( ! $USER->instructor ) die("Requires instructor");
$p = $CFG->dbprefix;

$assn = loadAssignment($LTI);
$assn_json = null;
$assn_id = false;
if ( $assn === false ) {
    die("Not a peer-graded assignment");
} else {
    $assn_json = json_decode($assn['json']);
    $assn_id = $assn['assn_id'];
}
<commit_msg>Caught stragglers<commit_after><?php
require_once "../../config.php";
require_once "peer_util.php";

use \Tsugi\Core\LTIX;
use \Tsugi\UI\Output;

Output::headerJson();

// Sanity checks
$LTI = LTIX::requireData();
if ( ! $USER->instructor ) die("Requires instructor");
$p = $CFG->dbprefix;

$assn = loadAssignment($LTI);
$assn_json = null;
$assn_id = false;
if ( $assn === false ) {
    die("Not a peer-graded assignment");
} else {
    $assn_json = json_decode($assn['json']);
    $assn_id = $assn['assn_id'];
}

{'fraction_non_alphanumeric': 0.20362903225806453, 'fraction_numerical': 0.0, 'mean_word_length': 4.5474860335195535, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3340482', 'n_tokens_mistral': 390, 'n_tokens_neox': 388, 'n_words': 75}