Skip to content

Commit

Permalink
[InstrumentStatus_ControlPanel] Fix casing of variable name (#6119)
Browse files Browse the repository at this point in the history
Reverses changes from #4928 that renames $ValidityEnabled to $validityEnabled and $ValidityRequired to $validityRequired. The variabes are UpperCamerCase elsewhere on Loris. This removes the following error that does not allow the Validity flags to render in instruments' control panels

PHP Notice:  Undefined property: NDB_BVL_Instrument_aosi::$validityEnabled in /var/www/loris/php/libraries/NDB_BVL_InstrumentStatus_ControlPanel.class.inc on line 101
PHP Notice:  Undefined property: NDB_BVL_Instrument_aosi::$validityRequired in /var/www/loris/php/libraries/NDB_BVL_InstrumentStatus_ControlPanel.class.inc on line 102
  • Loading branch information
zaliqarosli authored Feb 27, 2020
1 parent f66db40 commit 3c256b6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions php/libraries/NDB_BVL_InstrumentStatus_ControlPanel.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ use LORIS\StudyEntities\Candidate\CandID;
class NDB_BVL_InstrumentStatus_ControlPanel extends NDB_BVL_InstrumentStatus
{
public $tpl_data;
public $validityEnabled;
public $validityRequired;
public $ValidityEnabled;
public $ValidityRequired;
protected $instrument;
/**
* Construct a controller for the instrument status control panel
Expand Down Expand Up @@ -98,8 +98,8 @@ class NDB_BVL_InstrumentStatus_ControlPanel extends NDB_BVL_InstrumentStatus

$this->instrument = $instrument;

$this->validityEnabled = $instrument->validityEnabled;
$this->validityRequired = $instrument->validityRequired;
$this->ValidityEnabled = $instrument->ValidityEnabled;
$this->ValidityRequired = $instrument->ValidityRequired;

// generate the subtest list
$list = $instrument->getSubtestList();
Expand All @@ -122,7 +122,7 @@ class NDB_BVL_InstrumentStatus_ControlPanel extends NDB_BVL_InstrumentStatus
= $this->_displayDataEntry();

// generate the validity flag buttons
if ($this->validityEnabled == true) {
if ($this->ValidityEnabled == true) {
$this->tpl_data['access']['validity'] = $this->_displayValidity();
}

Expand Down Expand Up @@ -224,7 +224,7 @@ class NDB_BVL_InstrumentStatus_ControlPanel extends NDB_BVL_InstrumentStatus
$showLink = true;
$Validity = $this->getValidityStatus();
if ($Validity == null
&& $this->instrument->validityRequired == true
&& $this->instrument->ValidityRequired == true
&& $this->getAdministrationStatus() != 'None'
) {
$showLink = false;
Expand Down

0 comments on commit 3c256b6

Please sign in to comment.