Skip to content

Commit

Permalink
refactor: remove dead code
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jan 30, 2019
1 parent e719c8a commit 91205dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 0 additions & 2 deletions inc/fields.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ public static function isVisible($id, $fields) {
}

// TODO: find the best behavior if the question does not exists
$conditionQuestion = new PluginFormcreatorQuestion();
$conditionQuestion->getFromDB($condition['field']);
$conditionField = $fields[$condition['field']];

switch ($condition['operator']) {
Expand Down
8 changes: 7 additions & 1 deletion inc/question_condition.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ public function export($remove_uuid = false) {
return $condition;
}

/**
* get show / hide conditions for a question
*
* @param int $questionId
* @return array
*/
public function getConditionsFromQuestion($questionId) {
global $DB;

Expand Down Expand Up @@ -271,4 +277,4 @@ public function getConditionHtml($form_id, $questionId = 0, $isFirst = false) {

return $html;
}
}
}

0 comments on commit 91205dc

Please sign in to comment.