LimeSurvey API - Master branch

Deprecated

Table of Contents

application/core/LS_Twig_Extension.php
application/core/LSYii_Validators.php
application/extensions/bootstrap5/behaviors/TbWidget.php
application/extensions/bootstrap5/helpers/TbHtml.php
application/helpers/admin/export/Writer.php
application/helpers/common_helper.php
application/helpers/questionHelper.php
application/helpers/sanitize_helper.php
application/libraries/admin/pdf.php
application/models/Assessment.php
application/models/Participant.php
application/models/Permission.php
application/models/Plugin.php
application/models/QuestionTemplate.php
application/models/Survey.php
application/models/SurveyDynamic.php
application/models/SurveyLanguageSetting.php
application/models/TemplateManifest.php
application/models/TokenDynamic.php

LS_Twig_Extension.php

Line Element Reason
218 LS_Twig_Extension::getAllQuestionClasses()

must be removed when allow to broke template. Since it was in 3.0 , it was in API (and question.twig are surely be updated).

605 LS_Twig_Extension::flatEllipsizeText()

(4.0)

LSYii_Validators.php

Line Element Reason
186 LSYii_Validators::languageFilter()

Use languageCodeFilter() instead

226 LSYii_Validators::multiLanguageFilter()

Use multiLanguageCodeFilter() instead

TbWidget.php

Line Element Reason
44 TbWidget::copyId()

by TbWidget::resolveId

TbHtml.php

Line Element Reason
706 TbHtml::helpBlock()
2824 TbHtml::controlsRow()

BS3 only requires a div.row container for all inputs if you want a controls row

3219 TbHtml::imagePolaroid()

See

3537 TbHtml::stackedTabs()

Style does not exist in BS3

4898 TbHtml::addSpanClass()

Writer.php

Line Element Reason
90 Writer::getFullHeading()

common_helper.php

Line Element Reason
446 setupColumns()

Don't use anymore. Only usage left in printabel survey where it needs to be replaced

It returns an array with the following items: $wrapper['whole-start'] = Opening wrapper for the whole list $wrapper['whole-end'] = closing wrapper for the whole list $wrapper['col-devide'] = normal column divider $wrapper['col-devide-last'] = the last column divider (to allow for different styling of the last column $wrapper['item-start'] = opening wrapper tag for individual option $wrapper['item-start-other'] = opening wrapper tag for other option $wrapper['item-start-noanswer'] = opening wrapper tag for no answer option $wrapper['item-end'] = closing wrapper tag for individual option $wrapper['maxrows'] = maximum number of rows in each column $wrapper['cols'] = Number of columns to be inserted (and checked against)


Columns are a problem. Really there is no perfect solution to columns at the moment.

  • Using Tables is problematic semanticly.
  • Using inline or float to create columns, causes the answers flows horizontally, not vertically which is not ideal visually.
  • Using CSS3 columns is also a problem because of browser support and also because if you have answers split across two or more lines, and those answers happen to fall at the bottom of a column, the answer might be split across columns as well as lines.
  • Using nested unordered list with the first level of <LI>s floated is the same as using tables and so is bad semantically for the same reason tables are bad.
  • Breaking the unordered lists into consecutive floated unordered lists is not great semantically but probably not as bad as using tables.

Because I haven't been able to decide which option is the least bad, I have handed over that responsibility to the admin who sets LimeSurvey up on their server.

There are four options: 'css' using one of the various CSS only methods for rendering columns. (Check the CSS file for your chosen template to see how columns are defined.) 'ul' using multiple floated unordered lists. (DEFAULT) 'table' using conventional tables based layout. NULL blocks the use of columns

'ul' is the default because it's the best possible compromise between semantic markup and visual layout.

2373 HTMLEscape()

If you need this you are doing something wrong. Use CHTML functions instead.

2762 isCaptchaEnabled()

Use Survey::isCaptchaEnabled($screen) with a loaded survey model. This helper only receives the packed usecaptcha value, so it cannot guarantee inheritance has already been resolved.

questionHelper.php

Line Element Reason
38 questionHelper::getAttributesDefinitions()

used only as fall back method and for import/exports of LS v1 and for Survey Logic overview use QuestionAttribute::getQuestionAttributesSettings function to get attributes

sanitize_helper.php

Line Element Reason
478 sanitize_languagecode()

Use LSYii_Validators::languageCodeFilter

495 sanitize_languagecodeS()

Use LSYii_Validators::multiLanguageCodeFilter

pdf.php

Line Element Reason
519 pdf::intopdf()

Assessment.php

Line Element Reason
219 Assessment::insertRecords()

use model->attributes = $data && $model->save()

Participant.php

Line Element Reason
2278 Participant::checkforDuplicate()

Use Participant::model()->findByAttributes() instead.

Permission.php

Line Element Reason
273 Permission::setPermissions()

: usage only for global Permission currently

Plugin.php

Line Element Reason
233 Plugin::getActivateButton()
263 Plugin::getDeactivateButton()

QuestionTemplate.php

Line Element Reason
431 QuestionTemplate::getFolderName()

use QuestionTheme::getQuestionXMLPathForBaseType

447 QuestionTemplate::getTypeToFolder()

Survey.php

Line Element Reason
2239 Survey::replacePolicyLink()

replaced by private function in LSETwigViewRenderer

SurveyDynamic.php

Line Element Reason
117 SurveyDynamic::insertRecords()

Use setAttributes() and encryptSave()

379 SurveyDynamic::getButtons()

, use getGridButtons ,

SurveyLanguageSetting.php

Line Element Reason
226 SurveyLanguageSetting::attachmentsInfo()

TemplateManifest.php

Line Element Reason
1379 TemplateManifest::getAssetsToReplaceFormated()

Use getAssetsToReplaceFormatted() instead

TokenDynamic.php

Line Element Reason
975 TokenDynamic::getbuttons()

Search results