API Assessement value

Mehr
11 Monate 1 Woche her #169759 von benjaminboldt
COM_KUNENA_MESSAGE_CREATED_NEW
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 !

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 1 Woche her #169776 von holch
COM_KUNENA_MESSAGE_REPLIED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 1 Woche her #169778 von benjaminboldt
COM_KUNENA_MESSAGE_REPLIED_NEW
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.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 1 Woche her - 11 Monate 1 Woche her #169779 von holch
COM_KUNENA_MESSAGE_REPLIED_NEW
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
Last edit: 11 Monate 1 Woche her by holch.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 1 Woche her #169789 von tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
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.
Official LimeSurvey Partner - partnersurveys.com

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 1 Woche her #169791 von benjaminboldt
COM_KUNENA_MESSAGE_REPLIED_NEW
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. :)

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 1 Woche her #169796 von holch
COM_KUNENA_MESSAGE_REPLIED_NEW
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

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 1 Woche her #169802 von DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW
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 .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
11 Monate 1 Woche her #169809 von tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
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.
Official LimeSurvey Partner - partnersurveys.com
Anhang:
Folgende Benutzer bedankten sich: DenisChenu, holch

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

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

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha