<commit_before><?PHP // $Id$

/// Load libraries
    require_once('../../config.php');
    require_once('locallib.php');

/// Parameters
    $orderid  = optional_param('order', 0, PARAM_INT);
    $courseid = optional_param('course', SITEID, PARAM_INT);
    $userid   = optional_param('user', 0, PARAM_INT);

/// Only site users can access to this page
    require_login($courseid);

    if (isguest()) {
        error("Guests cannot use this page.");
    }

/// Load strings. All strings should be defined here. locallib.php uses these strings.
    $strs = get_strings(array('user','status','action','delete','time','course','confirm','yes','no','all','none','error'));
    $authstrs = get_strings(array('paymentmanagement','orderid','void','capture','refund','delete',
                'authcaptured','authorizedpendingcapture','capturedpendingsettle','capturedsettled',
                'settled','refunded','cancelled','expired','tested',
                'transid','settlementdate','notsettled','amount',<commit_msg>Don't use $courseid in require_login(). User may want to see old orders. Course enrolment is not required.<commit_after><?PHP // $Id$

/// Load libraries
    require_once('../../config.php');
    require_once('locallib.php');

/// Parameters
    $orderid  = optional_param('order', 0, PARAM_INT);
    $courseid = optional_param('course', SITEID, PARAM_INT);
    $userid   = optional_param('user', 0, PARAM_INT);

/// Only site users can access to this page
    require_login(); // Don't use $courseid! User may want to see old orders.

    if (isguest()) {
        error("Guests cannot use this page.");
    }

/// Load strings. All strings should be defined here. locallib.php uses these strings.
    $strs = get_strings(array('user','status','action','delete','time','course','confirm','yes','no','all','none','error'));
    $authstrs = get_strings(array('paymentmanagement','orderid','void','capture','refund','delete',
                'authcaptured','authorizedpendingcapture','capturedpendingsettle','capturedsettled',
                'settled','refunded','cancelled','expired','tested',
                'transid','settlementdate','notsettled','amount',
{'fraction_non_alphanumeric': 0.1793103448275862, 'fraction_numerical': 0.0018390804597701149, 'mean_word_length': 4.107981220657277, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4520997', 'n_tokens_mistral': 653, 'n_tokens_neox': 623, 'n_words': 135}