<commit_before><?php

require_once('../config.php');
//require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/calendar/lib.php');
require_once($CFG->libdir.'/bennu/bennu.inc.php');

$username = required_param('username', PARAM_TEXT);
$authtoken = required_param('authtoken', PARAM_ALPHANUM);

if (empty($CFG->enablecalendarexport)) {
    die('no export');
}
global $DB;
//Fetch user information
if (!$user = $DB->get_record('user', array('username' => $username), 'id,password')) {
   //No such user
    die('Invalid authentication');<commit_msg>MDL-27192 Global scope does not need global usage<commit_after><?php

require_once('../config.php');
//require_once($CFG->dirroot.'/course/lib.php');
require_once($CFG->dirroot.'/calendar/lib.php');
require_once($CFG->libdir.'/bennu/bennu.inc.php');

$username = required_param('username', PARAM_TEXT);
$authtoken = required_param('authtoken', PARAM_ALPHANUM);

if (empty($CFG->enablecalendarexport)) {
    die('no export');
}

//Fetch user information
if (!$user = $DB->get_record('user', array('username' => $username), 'id,password')) {
   //No such user
    die('Invalid authentication');
{'fraction_non_alphanumeric': 0.20448662640207074, 'fraction_numerical': 0.004314063848144953, 'mean_word_length': 5.9879518072289155, 'pattern_counts': {'":': 0, '<': 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': '1752330', 'n_tokens_mistral': 395, 'n_tokens_neox': 395, 'n_words': 66}