Skip to content

Commit

Permalink
Replace checks for b_ DB prefix with checks against $CFG->behat_prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
trampgeek committed Mar 5, 2024
1 parent 47e912e commit 956eb8c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .~lock.loadtestingresults2.ods#
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
,rjl83,RichardEliteX2,29.02.2024 14:47,file:///home/rjl83/.config/libreoffice/4;
2 changes: 1 addition & 1 deletion edit_coderunner_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ protected function add_sample_answer_field($mform) {
$mform->addHelpButton('sampleanswerattachments', 'sampleanswerattachments', 'qtype_coderunner');
// Unless behat is running, hide the attachments file picker.
// behat barfs if it's hidden.
if ($CFG->prefix !== "b_") {
if ($CFG->prefix !== $CFG->behat_prefix) {
$method = method_exists($mform, 'hideIf') ? 'hideIf' : 'disabledIf';
$mform->$method('sampleanswerattachments', 'attachments', 'eq', 0);
}
Expand Down
2 changes: 1 addition & 1 deletion renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ protected function build_results_table($outcome, qtype_coderunner_question $ques
if (isset($sandboxinfo['jobeserver'])) {
$jobeserver = $sandboxinfo['jobeserver'];
$apikey = $sandboxinfo['jobeapikey'];
if ($jobeserver == constants::JOBE_HOST_DEFAULT && $CFG->prefix !== 'b_') {
if ($jobeserver == constants::JOBE_HOST_DEFAULT && $CFG->prefix !== $CFG->behat_prefix) {
if ($apikey == constants::JOBE_HOST_DEFAULT_API_KEY) {
$fb .= get_string('jobe_warning_html', 'qtype_coderunner');
} else {
Expand Down

0 comments on commit 956eb8c

Please sign in to comment.