Datepicker plugin - Prevent multiple entries

Plus d'informations
il y a 2 semaines 4 jours #171907 par gardalid
gardalid a créé le sujet : Datepicker plugin - Prevent multiple entries
Hello

I am a relatively new developer. I have been tasked with modifying the jquery date-picker for a client. The client wants old entries in the survey date-picker to be disabled, and as such, prevent multiple entries on the same date.


I recon it is possible to gather the data, by registering to specific events and use the API to fetch the data. But is it in anyway possible to pass the data(gathered with php) to the jquery date-picker?


Best regards Sam

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 semaines 3 jours #171925 par LouisGac
LouisGac a répondu au sujet : Datepicker plugin - Prevent multiple entries
"The client wants old entries in the survey date-picker to be disabled"

I don't understand: could you expand please, by giving more details about the use case?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 semaines 3 jours #171948 par gardalid
gardalid a répondu au sujet : Datepicker plugin - Prevent multiple entries
Hi LuisGac

Our client is a group of doctors (allergy specialists), which use the platform to monitor development of their patients. The patients make a daily entry in the system, answering a few questions about their disease and progress. Some patients will fill out more than one survey each day, if they are being monitored for more than one disease.

The patients will inevitably have some days on which they do not have any irritation or bother from the disease, and will mostly forget to make an entry on these days. For that reason we included a date-based question in the first question-group of each survey, to let patients make entries for earlier days. i.e. the days on which they forgot to make an entry. But the clients problem is, that they want their patients to see which days already have entries.

So the question is, whether it is possible to gather the old dates for a token and a particular survey, and save them in an js object, which can be used to disable old entry dates in the date-picker itself.

We are using the system pretty much 'as is', meaning, that we have not made any changes in our installation, but only use the included features at the moment.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 semaines 3 jours - il y a 2 semaines 3 jours #171955 par DenisChenu
DenisChenu a répondu au sujet : Datepicker plugin - Prevent multiple entries
beforeQuestionRender event since you need to get existing values in your Response table you can't use (i think) twig files from this.

Something like (really speedly done, without any control).
$token = Yii::app()->getRequest()-getPost('token');
$sid = $this->getEvent()->get('surveyId');
$column = $this->getEvent()->get('surveyId').'X'.$this->getEvent()->get('gid')."X".$this->getEvent()->get('qid');
$oResponse = Reponse::model($sid)->findAll("token = :token",array(":token"=>$token));
$listDate = CHtml::listData($oResponse,$id,$column);// Here you have the array of existing date
$script = "//TODO"; // Here you do you javascript
Yii::app()->getClientScript()->registerScript('filterDate'.$this->getEvent()->get('qid'),$script);

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 .
Dernière édition: il y a 2 semaines 3 jours par DenisChenu. Raison: typo + // Here you have the array of existing date
Les utilisateur(s) suivant ont remercié: LouisGac, gardalid

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 semaines 2 jours #171994 par gardalid
gardalid a répondu au sujet : Datepicker plugin - Prevent multiple entries
Hi Denis

On the page with plugin events, it says that the event (BeforeQuestionRender) is available from LS v. 2.05 build 140922. We have the right version, but our build is 140618. Is there any way of updating to a newer build without having to do a version jump?? We would rather not have to redesign our templates(according to the documentation, templates were changed in v 2.5 or 2.6), as our surveys are currently in use. Or is there any other event that could handle our issue and is available in our build? like AfterFindSurvey?

Best regards

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 semaines 2 jours #171996 par Joffm
Joffm a répondu au sujet : Datepicker plugin - Prevent multiple entries
Hi,
here you find the older versions.

You can update to 2.06 to keep the structure of your templates.

https://www.limesurvey.org/downloads/category/24-archived-releases

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Les utilisateur(s) suivant ont remercié: DenisChenu, gardalid

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 semaines 2 jours #172004 par DenisChenu
DenisChenu a répondu au sujet : Datepicker plugin - Prevent multiple entries
Then : with an older version : only solution : make a php script call in ajax.

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 .
Les utilisateur(s) suivant ont remercié: gardalid

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!