API Assessement value

Plus d'informations
il y a 2 mois 1 semaine #169759 par benjaminboldt
benjaminboldt a créé le sujet : API Assessement value
Hello,

I was wondering which function of the LimeSurvey JSONRpc Api was able to give me the assessment value of a label set element ID.

I get the responses of a survey with `export_responses` but there's only the responses codes which is not really helpful. I tested a bunch of the API functions but can't find what I am looking for.

Thank you !

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

Plus d'informations
il y a 2 mois 1 semaine #169776 par holch
holch a répondu au sujet : API Assessement value
As the assessment values are not stored in the results database, I don't think you will be get them with the API.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

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

Plus d'informations
il y a 2 mois 1 semaine #169778 par benjaminboldt
benjaminboldt a répondu au sujet : API Assessement value
Thanks for you answer.

So, from my understanding. There is no other way to weight answers than assessment values and there are not available with the API ? That's odd.

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

Plus d'informations
il y a 2 mois 1 semaine - il y a 2 mois 1 semaine #169779 par holch
holch a répondu au sujet : API Assessement value
Well, I don't know 100% if they are not available with the API. However, I know that the results of the assessments are not stored in the database (which I personally find odd, but it has always been like this and there seems no effort to do so, especially with the Expression Manager allowing so much more flexible 'assessments' and storing data in the database via equation question). Let's see if someone with more knowledge about the functionalities of the API will come by and sheds a light.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Dernière édition: il y a 2 mois 1 semaine par holch.

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

Plus d'informations
il y a 2 mois 1 semaine #169789 par tpartner
tpartner a répondu au sujet : API Assessement value
Either load the assessment value into a hidden equation question or create your own "score" with Expression Manager.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

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

Plus d'informations
il y a 2 mois 1 semaine #169791 par benjaminboldt
benjaminboldt a répondu au sujet : API Assessement value
Thanks for your replies.

Actually, I knew I could store the overall assessment value score of a survey inside an hidden field. But, I need to get the assessment value for each question answer. If I had to store each question answer assessment value inside an hidden field for each question, I would double the number of questions I have to create. Which is not really nice since I certainly have to make the creation process easy for my client.

Well, guess I'll have to create label sets for each group of answers and store assessment values into label code.

Thanks anyway for your help !

Still open for another way to do it, if anybody has an other idea. :)

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

Plus d'informations
il y a 2 mois 1 semaine #169796 par holch
holch a répondu au sujet : API Assessement value
Yes, if you need every single assessment value of every answer option, you would have a lot of additional hidden equation questions to store.

If each answer option has different assessment values using the label code is certainly a quick solution. Now if answer options in the same question can have the same assessment value, then you won't be able to use this approach, as the answer codes need to be unique.

No other idea, but of course this all depends what you are actually trying to do. Without knowing the whole story, I currently don't see any other approach.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

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

Plus d'informations
il y a 2 mois 1 semaine #169802 par DenisChenu
DenisChenu a répondu au sujet : API Assessement value
You mean using : api.limesurvey.org/classes/remotecontrol..._question_properties ?
If yes : good idea to have it :).

Else : you can create your own API function : extensions.sondages.pro/development-and-...d-remotecontrol-api/ :)

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 .

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

Plus d'informations
il y a 2 mois 1 semaine #169809 par tpartner
tpartner a répondu au sujet : API Assessement value
The get_question_properties() method does return the assessment values.

<?php
 
	require_once 'jsonRPCClient.php';
 
	define( 'LS_BASEURL', 'http://pathTo/limeSurvey');  
	define( 'LS_USER', 'admin' );
	define( 'LS_PASSWORD', 'password' );
 
	$iQuestionID = 123;
 
 
	if(ctype_alnum($iQuestionID)) { // Valid QID format
 
		// Instantiate a new RPC client
		$myJSONRPCClient = new jsonRPCClient( LS_BASEURL.'/index.php/admin/remotecontrol' );
 
		// Get a session key
		$sSessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );
 
		if(is_array($sSessionKey)) { // Invalid session
			echo $sSessionKey['status'];
		}
		else if($sSessionKey) { // Valid session
 
			$questionProperties = $myJSONRPCClient->get_question_properties($sSessionKey,  $iQuestionID);
 
			foreach($questionProperties['answeroptions'] as $key => $value) {
				foreach($value as $key => $value) {
					echo $key . ' => ' . $value . '<br />';
				}
				echo '<br /><br />';
			}
		}
 
		// Release the session key
		$myJSONRPCClient->release_session_key( $sSessionKey );
	}
	else { // Invalid SID format
		die( 'Invalid format!' );
	}
 
?>


Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Pièces jointes :
Les utilisateur(s) suivant ont remercié: DenisChenu, holch

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!