no effect by QuestionAttribute::model()->setQuestionAttribute(...)

Mehr
3 Jahre 3 Monate her #106667 von orvil
orvil erstellte das Thema no effect by QuestionAttribute::model()->setQuestionAttribute(...)
Hi,

need some help, please: currently I've tried to set some question attributes by using the API function "setQuestionAttribute", e.g.:
QuestionAttribute::model()->setQuestionAttribute($qid, 'hidden', 1)

where $qid is the question ID. Nevertheless, it takes no effekt, Attribute is not stored anyway. API function is called (tested this). Is there any call to do in front or afterwards? Could not find this in the documentation.

THX

Best regards/Beste Grüße,
O. Villani

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Monate her - 3 Jahre 3 Monate her #106669 von DenisChenu
DenisChenu antwortete auf das Thema: no effect by QuestionAttribute::model()->setQuestionAttribute(...)
Looking at code, seems setQuestionAttribute is bugy.

Update existing attribute, but not add attribute.
Working system seems to be in database.php line 526 and more, but we need the language too, we can find with survey language.

Maybe you can put this to bug report.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Letzte Änderung: 3 Jahre 3 Monate her von DenisChenu.

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Monate her #106682 von orvil
orvil antwortete auf das Thema: no effect by QuestionAttribute::model()->setQuestionAttribute(...)
Yes, you are right, tried this. Once an attribute is set, it can be altered by setQuestionAttribute().
Will do a bug report.

Best regards/Beste Grüße,
O. Villani

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Monate her #106731 von DenisChenu
DenisChenu antwortete auf das Thema: no effect by QuestionAttribute::model()->setQuestionAttribute(...)
I'm not sure we use setQuestionAttribute anymore. Maybe it's best to rewrite it and use it in database.php

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Monate her #106842 von orvil
orvil antwortete auf das Thema: no effect by QuestionAttribute::model()->setQuestionAttribute(...)
well, may be it will be so. Bult a working version of thie setQuestionAttribute procedure meanwhile.
anyway the main database.php function index seems to me as an neverending codemonster, crying for a dispatcher function to split up the different "actions" in private functions.
This is why I dont dare to touch this function, to me it is a little too compicated.

Best regards/Beste Grüße,
O. Villani

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Monate her #106860 von DenisChenu
DenisChenu antwortete auf das Thema: no effect by QuestionAttribute::model()->setQuestionAttribute(...)
Oh yes, sorry

You're totally rigth , i move the bug to devloppement and assign it to me.

I think too we must remove database.php and move whole system in each model, but dev issue.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden um der Konversation beizutretten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten