Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Record responses as audio

Re: Record responses as audio 2 years 3 months ago #71993

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3844
  • Thank you received: 690
  • Karma: 330
In the source of the question, add a click event handler for the Next/Submit buttons:
<script type="text/javascript" charset="utf-8">
 
 
	$(document).ready(function() {
 
		// Interrupt next/submit function 
		$('#movenextbtn, #movesubmitbtn').click(function(){
 
			var url = 'path/to/audio/file.wav';
 
			// Request the file
			var request = new XMLHttpRequest();
			request.open('HEAD', url, false);
			request.send();
 
			// Act on the request results
			if(request.status!=404 == false) {
				// File doesn't exist
				alert ('File does not exist!');
				return false
			}
			else {
				// File exists
				return true
			}
		});
	});
 
</script>
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 2 years 3 months ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: audiolime

Re: Record responses as audio 2 years 2 months ago #73643

  • audiolime
  • audiolime's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
wow, that's great! I just came back to this issue after working on other parts on the project, and it works beautifully! Thank you very much for the code.

I tried to adapt it to check for a file name that includes {SAVEDID} and {QID} (I am using 1.92 now), but somehow that code never generates the "File does not exist"- error.
I substituted the line:
var url = 'path/to/audio/file.wav';

with this line:
var url = 'scripts/voice/v1_s' + {SAVEDID} + '_q' +  {QID} '.wav';
The administrator has disabled public write access.

Re: Record responses as audio 2 years 2 months ago #73769

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5279
  • Thank you received: 289
  • Karma: 246
audiolime wrote:
wow, that's great! I just came back to this issue after working on other parts on the project, and it works beautifully! Thank you very much for the code.
You're welcome :-)

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Aw: Re: Record responses as audio 1 year 3 months ago #91328

  • Tgrskng
  • Tgrskng's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hello everyone,

I would like to use the Nanogong app in Limesurvey as well, however by just using the information posted in this thread and on the following website I cannot successfully use
the app: bugs.limesurvey.org/view.php?id=5663

Could someone help me out with some basic steps?

First of all do I need anything else besides Limesurvey and the nanogong app in order to make it work?
I downloaded nanogong.jar, but where do I get the receiver.php from?
Should I just copy the html text (attachment) into a Limesurvey question box or how exactly can I integrate the app into Limesurvey?
How can I save the audio recordings?
I am sorry to ask such basic questions but with the descriptions posted so far I don't know how to make it work.

I would appreciate your help a lot.
Last Edit: 1 year 3 months ago by Tgrskng.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.119 seconds
Donation Image