Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Adding question types with a .php plug-in

Adding question types with a .php plug-in 2 Jahre 5 Monate her #78171

  • Marsip
  • Marsips Avatar
  • Fresh Lemon
  • Beiträge: 2
  • Dank erhalten: 1
  • Karma: 0

I've successfully used LimeSurvey for a bunch of surveys. It's a great project and I must commend developers.

But I would like to be able to customize LimeSurvey with my own question types, without changing the core of the application. It would be great if there was an API for adding new question types in an orderly fashion.

I have checked 2.0a3 source code. The file /limesurvey200a3-build120315/limesurvey/application/helpers/common_helper.php starts with getQuestionTypeList() function, which has a comment "Edit this if you are adding a new question type".

If I edit the application, then simple upgrades are out of the question, since they would break my patches. The new question types are really specific since they connect to a client database an read their product descriptions, so I can't contribute them upstream.

With a 2.0 rewrite I'd suggest a more modular system (such as Joomla's) for adding user defined question types, that would survive minor version upgrades. It would also create a more vibrant community. I will be happy to contribute my more general question types.

The name of the question type would have to be longer than 1 character, however. I suggest "vendor.qtype" naming. The API would also have to take care of saving question settings and offer the plugin code a way to render the question. But those are technical issues that are not that hard to solve.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Ladezeit der Seite: 0.120 Sekunden
Donation Image