Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Search Results (Searched for: html)

  • rhanzlova
  • rhanzlova's Avatar
07 Dec 2023 11:02
Replied by rhanzlova on topic Edit items - popup window does not work
Thank you very much.

Yes, I have some red links but I do not understand them, I do not understand programming and HTML code. I will have to contact my IT support.
  • DPF-QualiQuan
  • DPF-QualiQuan's Avatar
07 Dec 2023 10:05
Hi!
thanks for considering my request.
I'm working on a unique approach to capture user voice recordings in my survey and then upload them to Google Cloud Storage through the Uppy uploader with Transloadit. Here's a brief overview of my methodology:

Survey Structure: I'm using LimeSurvey Community Edition Version 6.2.11+231007 hosted on my OVH server.
My questions have both an HTML and a script tab where I can embed HTML and JavaScript respectively.
Voice Recording: I utilize the MediaRecorder API for voice recording, triggered by the user. This process involves real-time visualization and controls like 'record', 'pause', and 'stop'.
File Naming: After recording, the audio file is automatically named based on various identifiers like date, time, and specific survey-related variables like ids_survey.NAOK, ids_gid.NAOK, and others.
User Control: Post-recording, users can listen to their recording, rename it, or even choose to re-record.
File Uploading: Rather than immediately uploading the file post-recording, I've introduced an "Validate my recording" button. Only upon clicking this will the file be uploaded. This ensures users have full control and satisfaction with their recording before it's uploaded.
The audio file present in the DOM is intended for this upload.
Uppy Integration: I'm attempting to integrate Uppy to facilitate the upload to Google Cloud Storage via Transloadit after the user validates their recording.

However, I'm encountering issues with the Uppy integration and the external scripts not being loaded, resulting in a "Uppy not defined" error in the console.

I've detailed the process above to highlight that this isn't a standard “file upload” but a more involved process tailored to the user experience. Given this unique approach, could you provide guidance on integrating Uppy and ensuring the external scripts are loaded correctly?

Thank you for your assistance!

Best regards,   
  • rhanzlova
  • rhanzlova's Avatar
07 Dec 2023 07:56
Edit items - popup window does not work was created by rhanzlova
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.0.7+230515  
Own server or LimeSurvey hosting: own server
Survey theme/template: fruity
==================
Good morning. I would like to ask if anyone has encountered a similar problem. If I want to edit the formatting of the wording of individual items or answer options, I can't do it because "Run HTML editor in popup window" doesn't work.

Could the problem be somewhere in the settings? I have not had this problem with previous versions of LS.

Thank you very much.
  • DenisChenu
  • DenisChenu's Avatar
06 Dec 2023 08:28
I think you can't updateb the content of the email when using API.

BUT : using attribute
Code:
{if(TOKEN::ATTRIBUTE_2 =="M","Bonjour Monsieur,")}{if(TOKEN::ATTRIBUTE_2 =="F","Bonjour Madame,")}{if(TOKEN::ATTRIBUTE_2 =="","Bonjour,")}

Or directly
Code:
<p>{TOKEN::ATTRIBUTE_2}</p>
<p>{TOKEN::ATTRIBUTE_3}</p>
<p>{TOKEN::ATTRIBUTE_4}</p>
<p>{TOKEN::ATTRIBUTE_5}</p>
Where the sentence are in the attribute

attribute can be set in api.limesurvey.org/classes/remotecontrol...hod_add_participants

or updated in api.limesurvey.org/classes/remotecontrol...rticipant_properties
  • goirigolzarri
  • goirigolzarri's Avatar
05 Dec 2023 14:32
Replied by goirigolzarri on topic Ventanas emergentes
Si, perdona.

Ayúdenos a ayudarle y rellene los siguientes campos:
Su versión de LimeSurvey:  LimeSurvey Community Edition   Versión 5.2.2+211115
Servidor propio o LimeSurvey Cloud: Servidor propio
Plantilla de diseño utilizada: vanilla
==================


Con los enlaces que me has pasado, he conseguido añadir un boton y al clicar salga un texto insertado como html en ventana emergente.
Pero necesito que se visualice el contenido de un enlace en la ventana.

Gracias!
  • OlivierDestrade
  • OlivierDestrade's Avatar
03 Dec 2023 10:20
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.3.7
Own server or LimeSurvey hosting: cloud
Survey theme/template: default
==================
I want to sent a confirmation mail with the survey responses in the body of the email.
I'm using the syntax "Nom" : {INSERTANS:SurveyIDXGroupIDXQuestionID} which works well for most questions.
Now I have a multiple choice question with the Other option activated. If the user choose Other in the survey, the value that is rendreded in email is "-oth-".
I searched the doc how to render the other value option and found this syntax {QUESTIONCODE_other} but the result in the mail body is :
"Autre" : " < em > G01Q06_other < / em > "
with underlying HTML : "
Code:
<p>"Autre" : "<span class='em-expression em-haveerror'  ><span class="em-compare"> < </span><span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >em</span></span><span class="em-compare"> > </span><a title='[java371828X3X14other][G:0][Q:5]: <span class="M7eMe">Comment avez-vous connu La Cagette ?</span>; value=CHIC' class='em-var em-var-static' href='/questionAdministration/view/surveyid/371828/gid/3/qid/14' >G01Q06_other.value</a><span class="em-compare"> < </span><span> / </span><span class='em-error' title=' ' ><span title='Variable non définie' class='em-var em-var-error' >em</span></span><span class="em-compare"> > </span></span>"</p>
What should be the correct syntax to render the "other" answer to a multiple choice question in email ?  


 
  • Joffm
  • Joffm's Avatar
01 Dec 2023 12:40
Replied by Joffm on topic Kopfzeile Matrix bearbeiten
Hallo,
"Uni-Installation" wäre schon eine wichtige Info gewesen.
Die meisten admins verbieten da nämlich die Benutzung von javascript.

wie man javascript einsetzt bzw. ob es bei mir möglich ist...

Kannst Du aber schnell ausprobieren.
Füge einfach in der ersten Frage (im Quellcode-Modus) dies ein (jetzt weißt Du schon, wie man es einsetzt "Quellcode des Fragetextes"):
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
  alert("Hallo, hier ist javascript");
});
</script>
(Achte darauf, dass wirklich nur dies dort steht, und kein zusätzliches HTML.

Wenn dann beim Aufruf ein Fenster auploppt mit dieser Meldung, ist es gut; ansonsten "Pech gehabt"

Allerdings frage ich mich auch, ob dies wirklich nötig ist.
Du kannst doch alles auch ohne diese Headerzeile ganz gut darstellen.
 
Es sollten auch immer alle Skalenpunkte beschriftet werden; ansonsten könnte der Teilnehmer denken, es sei einfach schlecht programmiert und die Zwischenpunkte sollten eigentlich nicht gewählt werden.
Dass die "0" und die "9" in einer separaten Zeile erscheint, wird einfach mit dem HTML-tag <br/> erledigt.
Und der linksbündige Teilfragentext wird mit diesem kleinen Stückchen css erzeugt.
Auch im Quellcode des Fragetextes
Code:
<style type="text/css">
.ls-answers tbody .answertext {
  text-align: left;
}
</style>

Joffm

 
  • Joffm
  • Joffm's Avatar
30 Nov 2023 12:29 - 30 Nov 2023 12:33
1. Vous avez copié l'équation.
Le HTML y est donc inclus.
 

Supprimez ceci... et ne copiez que du texte propre à l'avenir.
{sum(G02Q09_SQ004.NAOK,G02Q09_SQ006.NAOK,G02Q09_SQ009.NAOK,G02Q09_SQ010.NAOK)/7}
Et ni dans le texte de la question, ni dans l'équation, pas les deux.

La catastrophe est :
Comment veux-tu calculer une somme si tu n’as pas de chiffres?
Vous avez des textes comme code (E01, E02,...).
Comment les additionner?
C'est comme sum("Londres", "Paris", "Seine", "Tralala", "Pierre").

Vous avez activé le mode évaluation   .
Alors tu dois l'utiliser aussi.
{sum(G02Q09_SQ004.valueNAOK,G02Q09_SQ006.valueNAOK,G02Q09_SQ009.valueNAOK,G02Q09_SQ010.valueNAOK)/7}
[url] manual.limesurvey.org/ExpressionScript_-...C3.A8s_aux_variables [/url]

 

Mais mieux: utiliser des codes numériques. Vous en aurez besoin lors d’une analyse ultérieure.
 

Joffm


 
  • bscwebmaster
  • bscwebmaster's Avatar
29 Nov 2023 19:16 - 29 Nov 2023 19:20
Replied by bscwebmaster on topic How to display all survey results publicly?
Thank you for explaining.

Here at the Berkeley Student Cooperative we are using LimeSurvey to conduct what we call the "Vote of No Confidence," which is how our members hold their various house managers accountable and you are absolutely right, people say all kinds of crazy s@$#! Which is why we operate in closed-access mode and monitor it very closely and edit out objectionable things.

So, granting that to do so is officially a "Bad Idea," how can I do it? 

For printing answers I'm looking at
Code:
themes/survey/fruity_twentythree/views/subviews/printanswers/printanswers_head.twig
and 
Code:
themes/survey/fruity_twentythree/views/subviews/printanswers/printanswers_head.twig
and 
Code:
{{ C.Html.form(aSurveyInfo.printAnswersHeadFormQueXMLUrl, 'post') }}

For statistics I see 
Code:
application/views/statistics_user_view.php
and a provocative variable named
Code:
$statisticsoutput
I'm guessing I will need to discover what informs that variable and somehow add the written responses. This will be satisfactory if I can do it. The most amazing accomplishment would be to somehow liberate the lovely canvas objects from the Statistics page in Admin, but I'm quite a lazy coder and will settle for the easiest solution.
 
  • Joffm
  • Joffm's Avatar
29 Nov 2023 14:06 - 29 Nov 2023 14:08
Replied by Joffm on topic Randomisierung Experimentalgruppen
Naja, jetzt hat es ja geklappt.
Ich habe das Gefühl, Du hast den Sinn des Konstrukts nicht ganz verstanden.
Wie Du auch in Excel leicht nachprüfen kannst, ändert sich eine Zufallszahl bei jedem Klick in dieser Gruppe.
Daher das IF.
"WENN die Variable xyz noch leer ist, DANN erzeuge eine Zufallszahl von x-y, ANSONSTEN lasse sie, wie sie ist."
Wenn ich jetzt auf Deine erste Idee mit "RAN" und "gleichung" zurückgreife:
Fa es keine Variable "gleichung" gibt, ist dieser Wert immer leer, und es wird immer eine Zufallszahl erzeugt.
Wenn Du dann statt "gleichung==1" mit der Variablen "RAN" gearbeitet hättest (RAN==1) hätte es auch funktioniert (dann ist das IF-Konstrukt allerdings unsinnig)
Und wenn ich in diesem Zusammenhang "gleichung" lese, denke ich, dass Du dies aus den Youtube-Videos von Paul Borsdorf hast.
Diese solltest Du Dir wirklich zu Gemüte führen. Sie zeigen kurz und prägnant alle Basics, die man wirklich wissen und können muss.
Wobei och persönlich die Bezeichnung "gleichung" in diesem Zusammenhang für falsch halte. Es ist eben keine Gleichung.
Außer diesen Videos solltest Du das Handbuch zumindest quergelesen haben; die Kapitel über Fragetypen und ExpressionScript etwas genauer.

Jetzt zur Umfrage an sich:
1. In Deiner Umfrage sind Gruppen, die keine Fragen enthalten. Also kann man die Umfrage gar nicht starten. Das ist nicht schön für uns, die wir helfen wollen und gleich auf eine Fehlermeldung stoßen

2. Frage EIN ist eine Einfachnennungsfrage und es gibt es nur eine Auswahloption.
D.h. der Teilnehmer kann sich nicht mehr umentscheiden.
Er hat nur noch die Möglichkeit den Browser zu schließen, um abzubrechen.
Besser: 
Diese Abfrage auf die Begrüßungsseite mit den Datenschutz-Einstellungen.
 
Oder zwei Optionen (Ja/Nein) und einem nachfolgenden Screenout durch eine Quote.

3. Stimulus
a. Du könntest Dir Fragen ersparen indem Du mit "tayloring" arbeitest.
Soll heißen: Nenne Deine Videos um in "video1.mp4", "video2.mp4", ...
Dann kannst Du in einer Frage das der Zufallszahl entsprechende aufrufen mit
<div class="ckeditor-html5-video" style="text-align: center;">
<video controls="controls" controlslist="nodownload" src="/upload/surveys/597667/files/video{eqZufall}.mp4"></video>
</div>
Du siehst den Einsatz von ExpressionScript bei "eqZufall".

b. Außerdem ist es m.E. besser statt des Timers den "Weiter"-Button einfach auszublenden und erst nach Ende des Videos einzublenden.
Dies findest Du in meinem "Tutporial 3: Gimmicks", Kap. 2.
Code:
<div class="embed-responsive embed-responsive-16by9">
<video autoplay="autoplay" id="myvideo"><source src="/upload/surveys/597667/files/video{eqZufall}.mp4" type="video/mp4" /> browser unterstützt dieses Format nicht.</video>
</div>
<script type="text/javascript" charset="utf-8">        
    $(document).ready(function() {    
 
        // Hide the buttons
        $('#ls-button-submit').hide();
 
        var vid = document.getElementById("myvideo");
        vid.volume = 0.3; 
         vid.onended = function() {
            // Show the "Previous" button
            $('#ls-button-submit').show();
//            $('#ls-button-submit').show().trigger('click');
        }
    });
</script>
Generelles Problem bei Videos:
Die meisten modernen Browser weigern sich "autoplay" zu gestatten (nur bei Videos ohne Ton).
Daher kann ein Teilnehmer natürlich das Video mit den Controls schnell vorspulen und weitergehen. 

4. Itembatterien
a. Bitte, gib allen Antwortoptionen einen Header. Es könnte sein, dass die Teilnehmer an ein schlecht programmiertes Etwas denken und daher nur die beiden Endwerte benutzen.
 
b. Bitte, schreibe einen vernünftigen Fragetext! Führe Deine Teilnehmer duch die Umfrage und knalle nicht einfach etwas hin.
Zum Beispiel fehlt bei "Kognitive Dissonanz" jegliche Frage.

5. Auch bei MC Fit (und den weiteren Fragen dieser Art) würde ich mit "tayloring" arbeiten.
Da Du ja später diese Marken vergleichen willst, also als Erstes zumindest einen t-Test oder eine ANOVA rechnen wirst, ist es sowieso notwendig, dass die Datren in einer Variablen stehen; die Trennvariable wird ja durch die Zufallszahl geliefert.
Um nun ein verschachteltes IF-Statement bei jeder Teilfrage zu vermeiden, würde ich eine weiter Frage vom Typ "Gleichung" in der ersten Gruppe einfügen.
Nennen wir sie "eqMarke".
{if(eqZufall==1,"Nigrin",if(eqZufall==2,"Nigrin",if(eqZufall==3,"Primark","Primark")))}
Ich gehe davon aus, dass Du nur schnell kopiert hast und die Marken andere sind.
Dann heißt die Teilfrage nur 
Das Image von {eqMarke} stimmt mit der Werbebotschaft überein.

6. Green Advertising
Nee, bitte keine 5-Punkte-Auswahl!
Was bedeutet denn "1", was bedeutet "5"?
Das müsstest Du zusätzlich erklären. Aber es ist ganz schlechter Stil, wenn man eine Skala im Fragetext erklären muss.
Und - jetzt kommt wieder etwas allgemeines - lass diese Gruppennamen und Gruppenbeschreibungen weg!
Wenn Du dem Teilnehmer eine Information geben willst, benutze eine Frage vom Typ "Textanzeige"
Gerade hier ist Deine Gruppenbeschreibung doch nichts anderes als Fragetext.

Es gibt auch keinen Grund dafür hier von der obigen Zustimmungs-Skala abzuweichen.

Gut, eine solche Abfolge von Itembatterien ohne Verschnaufpause und ohne Feedback für den Teilnehmer ist der häufigste Grund die Umfrage abzubrechen; daher ist ein bisschen "Gamification" nicht schlecht.
Vielleicht könnte man hier auch mit einem Slider arbeiten, wie in meinem "Tutorial 2: Mehrfachnennung,...", Kap. 4.
 

7. Demographie
a. Beim Geschlecht steht "Anderes (bitte angeben)"
Aber es gibt kein Eingabefeld
b. Ich weiß nicht, wie alt Deine Teilnehmer sein sollen.
Aber ein Datepicker ist für z.B. 40-Jährige schon etwas wenig ergonomisch.
Wenn die Teilnehmer nicht wissen, dass man das Datum auch direkt hineinschreiben kann, klicken sie sich tot.
c. Ich halte Dropdowns mit nur wenigen Optionen ebenfalls für ärgerlich für den Teilnehmer.
Zunächst muss er klicken um das Dropdown zu öffnen und dann noch einmal, um die Option auszuwählen.
Hier ist ein simples list(radio) besser und übersichtlicher.
Ich hänge Dir hier einmal ein pdf an. Lies es einmal!
 

File Attachment:

File Name: surveyfrie...1-29.zip
File Size:977 KB


Nach diesem ganzen Vorgeplänkel kommt jetzt der richtige Hammer.
In allen Deinen Itembatterien verwendest Du eine Skala mit folgenden Codes
AO01, AO02, AO03, AO04, AO05
Das sich die Vorgabeantworten - sofern man dies nicht in den "Globalen Einstellungen" ändert.

Und was willst Du mit Deinen Daten machen? Sicherlich sollen statistische Tests gerechnet werden, eben um signifikante Differenzen zu erkennen.
Dazu benötigst Du also zumindest eine Ordinal-Skala, besser eine Intervall-Skala.

Aber was hast Du als Codes? Richtig, Texte. 
Dies ist so, als habest Du codiert: "Audi", "BMW", "Dacia", "FIAT". 
Und damit lässt sich schlecht rechnen.
Auch der Mittelwert von AO01 und AO04 ist nicht AO02.5  
Hier hast Du nur Nominalskalen-Niveau und kannst höchstens Häufigkeiten, Modalwerte, und auch noch ein CHI-Quadrat rechnen.

Du kannst meinetwegen alles, was oben steht, wieder vergessen, aber das musst Du ändern.

Joffm
 
  • bscwebmaster
  • bscwebmaster's Avatar
28 Nov 2023 22:29
How to display all survey results publicly? was created by bscwebmaster
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.3.7+231127 
Own server or LimeSurvey hosting: Own
Survey theme/template: Fruity
==================

For the user, upon completion of a survey, LimeSurvey generates a link that reads, "View the statistics for this survey" which, when accessed, will show the user (and anyone else with the link) the stats of all who have voted, but not the written responses. LimeSurvey also generates a link that reads, "Print your answers" which shows both the numbers and the written responses, but only for the individual user.

How can I present all of the data publicly?

As an Admin I can go to the "Statistics" section and generate a wonderful HTML page of data with graphs and charts and the text responses, too. If I could somehow expose this page that would be perfect. But I'm open to any suggestions. For instance, if I've overlooked a configuration option to reveal the written responses on the public statistics page, that would be good to know. Simply turning on "Show in public statistics" for the question does not seem to be enough.

Thanks!
  • vnunzi
  • vnunzi's Avatar
27 Nov 2023 16:32 - 27 Nov 2023 16:33
Hi everyone,

I am currently using LimeSurey in order to send personnalized emails (using both email templates and expression manager).
I was looking for a way to have multiple versions of my email, which I could send at once using the participants table attributes.
The simplest way I found to store those versions (which contain HTML code) is to code them as questions in the survey, and pipe them in the template using the expression manager.

As a result, my email template looks something like this:

Code:
{if(TOKEN:ATTRIBUTE_1 == "version1", version1.question, "")}
{if(TOKEN:ATTRIBUTE_1 == "version2", version2.question, "")}
{if(TOKEN:ATTRIBUTE_1 == "version3", version3.question, "")}
...


It seemed to work very well at first, but then it started sending blank emails (even though I had not changed anything in my code).
I struggled to find an answer, and then I noticed something: if I preview my survey (with my the versions of my email as questions) just before sending my emails, they have content again. But if I come back the next day and start sending emails without previewing my questions first, everything is empty again.

Here's my question: do I need to preview the HTML I am piping in order to "reactivate" some ressources? I don't really know how else to put it, but does piping in LimeSurvey only works if the survey has been viewed in the last X hours? 

Thank you very much for you help.

Best,
Victor

PS: my access to LimeSurvey is provided by another compagny as part of a corporate plan, so I don't know what is the version, and I have very limited access to admin settings.
  • DenisChenu
  • DenisChenu's Avatar
21 Nov 2023 11:04
Replied by DenisChenu on topic remotecontrol doesn't work after update to 6.3.5

My hypothesis is - RPC does not return JSON but an HTML error page that limer has no idea about as it expects only a JSON string
Seems to be a PHP issue.

Can try you activate log file ?
manual.limesurvey.org/Optional_settings/en#Logging_settings
with debug=2 ?

Then you have more detail on the error in the log file.

 
  • r0bis
  • r0bis's Avatar
21 Nov 2023 10:12
Yes, this is what I am also getting. It seems that there is no content at all in terms of JSON, that there is just a 500 ERROR page that is returned. From what I understand the normal expected response is a JSON string, but there is no JSON

The error arises in this call
> session_key <- as.character(jsonlite::fromJSON(content(r, encoding="utf-8"))$result)
> Error: Argument 'txt' must be a JSON string, URL or file

If you look at the content that jsonLite is trying to parse, it is an HTML document:
> content(r, encoding="utf-8")
{html_document}
<html xmlns=" www.w3.org/1999/xhtml " xml:lang="en" lang="en">
[1] <head>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n<title>ArgumentCoun ...
[2] <body>\n<div class="container">\n\t<h1>ArgumentCountError</h1>\n\n\t<p class="message">\n\t\tToo

I also know too little about JSON and what is the normally expected return. If you still have some working LS versions, you could easily check if this content is something different.

My hypothesis is - RPC does not return JSON but an HTML error page that limer has no idea about as it expects only a JSON string
  • iceclimber81
  • iceclimber81's Avatar
20 Nov 2023 22:19 - 20 Nov 2023 23:37
Replied by iceclimber81 on topic remotecontrol doesn't work after update to 6.3.5
Thanks for looking into this, r0bis.

I just experimented with limer / remotecontrol on different LS versions on my server and found that it still works on LS 6.3.4, but the upgrade to LS 6.3.5 (and later) breaks it.

When checking the changelog , I found this issue mentioned for 6.3.4 --> 6.3.5: Fixed issue #19214: JSON RPC response content type should be application/json (#3610) --> see issue described here: bugs.limesurvey.org/view.php?id=19214

If I understand correctly, starting from 6.3.5, the JSON RPC response content type is application/json, while before it was text/javascript. This might break the limer get_session_key() function.

UPDATE: Getting an error message:

When trying to call the remotecontrol API with the limer approach on LS 6.3.5 and later:
Code:
body.json = list(method = "get_session_key",
   id = 1,
   params = list(username = getOption('lime_username'), password = getOption('lime_password')))
 
r <- POST(getOption('lime_api'), content_type_json(), body = jsonlite::toJSON(body.json, auto_unbox = TRUE))
xml <- content(r, encoding="utf-8")
rvest::html_text(xml)


the response shows an error message:
Code:
500: Internal Server Error
call_user_func_array(): Argument #1 ($callback) must be a valid callback, second array member is not a valid method

Unfortunately, I'm not familiar enough with JSON to figure out how to modify the request so it is valid.
 
Displaying 121 - 135 out of 4728 results.

Lime-years ahead

Online-surveys for every purse and purpose