Articulate Community Forums



Articulate Community Forums » Articulate Product Forums » Articulate Quizmaker » Quiz to database, instructions and code

 
 
LinkBack Thread Tools Search this Thread
Old 12-17-2007, 09:22 AM   # 21
Member
 
Join Date: Dec 2007
Posts: 4
Default Re: Quiz to database, instructions and code


Quote:
Originally Posted by joep View Post
If you're seeing NT Authority/Network Service as the username, I think the most likely cause is that the website where you're running the custom database code is set up to run with anonymous access, and it's running under the network service account.

Check your website or virtual directory properties to see if you're using Integrated Windows Authentication or something else. If you're using Integrated, Digest, or Basic, then the code I provided should work. If you're using anonymous access, though, the server won't automatically know who the visitor is and you'll need to find some other way to identify the person.

Are you the same Chris who's working with this through DNN?

-- Joe
Nope not the DNN Chris.

Thanks for your reply. I looked at the directory properties and disabled anonymous access, Enabled the requirement for client certificates and still its not pulling the actual name. I am using Integrated on an SSL intranet server. (CAC required).

The database is writing results to a seperate SQL server on the same network. Could the issue be in the coding to write to that DB?

The other minor issue I have is how to strip specific content out of the username once it does write their name. (not sure how to len in C#)

Thanks,
Chris

EDIT, found it, string quizTaker = User.Identity.Name; Now how do i strip the 4 characters out that I don't want (domain\)

How do I get get Active directory username ? - ASP.NET Forums

Thanks


Last edited by fdnywmaster : 12-17-2007 at 11:40 AM.
fdnywmaster is offline  
Old 12-17-2007, 01:59 PM   # 22
Member
 
Join Date: Aug 2007
Posts: 14
Default Re: Quiz to database, instructions and code


To remove part of the string in C#, try this:

Code:
string newStringVariable = oldStringVariable.Replace("ValueToRemove", string.Empty);
This function replaces one value with another; in this example we're replacing your old value with an empty string (you could also just use empty quotes there).

Be aware that if you want to use a backslash in either string, you need to "escape" it by using it twice. So to strip the domain part out of a string like "domain\user" you do this:

Code:
string newStringVariable = oldStringVariable.Replace("domain\\", string.Empty);
Also remember that string values are case-sensitive, so this would be safer:

Code:
string newStringVariable = oldStringVariable.ToLower().Replace("domain\\", string.Empty);
joep is offline  
Old 12-18-2007, 11:48 AM   # 23
Member
 
Join Date: Dec 2007
Posts: 4
Default Re: Quiz to database, instructions and code


Thank you for everything. Is there any word from articulate about incorporating this feature into their code? (having the finish button be able to do this, or a submit button would be fantastic)

Thank you again!!
Chris
fdnywmaster is offline  
Old 12-20-2007, 09:51 AM   # 24
Member
 
Join Date: Mar 2007
Posts: 1
Default Re: Quiz to database, instructions and code


What if I wanted to do the send the resuls of a survey instead of just the score? Do you know of a script that will do that? I'm clueless on programming...but I can copy/paste rather well

Survey example: 2 questions multiple choice and 1 question multiple answer

Any ideas?
brellis is offline  
Old 12-20-2007, 12:05 PM   # 25
Member
 
Join Date: Dec 2007
Posts: 4
Default Re: Quiz to database, instructions and code


I have found that if you open the quizmaker.xml file and change,
Code:
  <processing_parameter pname="summaryButtonEmail"><![CDATA[Email Results]]></processing_parameter>
to,
Code:
<processing_parameter pname="summaryButtonEmail"><![CDATA[Submit your Score]]></processing_parameter>
that it will change the button to read Submit your Score.

Now if someone with more xml background can figure out how to get rid of the "finish" button or reassign it's action to the same as the e mail button, this program would be much smoother.

Where in the q_process code do I edit to have it only store the date that the test was taken?


Last edited by fdnywmaster : 12-21-2007 at 09:36 AM. Reason: quick question
fdnywmaster is offline  
Old 02-10-2008, 06:43 PM   # 26
Member
 
Join Date: Feb 2008
Posts: 8
Default Re: Quiz to database, instructions and code


joep,

Thank you so much for posting your solution. It worked great and saved me an absolute ton of time. I would not of decided to use articulate if I hadn't found it. I did have to change one thing in your JavaScript to make it work with Firefox.

I changed:

document.getElementById("divQuiz").document.getEle mentById("formQuiz").submit();

to:

document.getElementById("formQuiz").submit();

This allows your script to work with Firefox as well as IE. I did not test it in Safari or Opera.

Best Regards,
Bill Beckelman
wbeckelman is offline  
Old 06-16-2008, 11:06 AM   # 27
Member
 
Join Date: May 2008
Posts: 10
Default Re: Quiz to database, instructions and code


Is there a simpler solution available for the non-techie QuizMaker users out there? I don't know how to build this database but it sounds like a wonderful add. Thanks, Sabrina!
IntuitAPDLD is offline  
Old 06-16-2008, 12:57 PM   # 28
Member
 
Join Date: Oct 2007
Posts: 16
Default Re: Quiz to database, instructions and code


We have a lightweight LMS if you are using, or want to use, a DotNetNuke.com platform:
Interzoic Media LLC > DNN eLearning
Wylie is offline  
Old 09-18-2008, 09:13 AM   # 29
Member
 
Join Date: Jul 2008
Posts: 2
Default Re: Quiz to database, instructions and code


Quote:
Originally Posted by fdnywmaster View Post
I have found that if you open the quizmaker.xml file and change,
Code:
  <processing_parameter pname="summaryButtonEmail"><![CDATA[Email Results]]></processing_parameter>
to,
Code:
<processing_parameter pname="summaryButtonEmail"><![CDATA[Submit your Score]]></processing_parameter>
that it will change the button to read Submit your Score.

Now if someone with more xml background can figure out how to get rid of the "finish" button or reassign it's action to the same as the e mail button, this program would be much smoother.

Where in the q_process code do I edit to have it only store the date that the test was taken?
Not sure if you figured this out or not, but the text can be changed from within QuizMaker itself. You don't have to do it in the XML. I think it's called "Text Labels" or something. I don't have it in front of me, but that what I did. I changed the label for "Email" to "Submit" and it's working fine.
dalomar is offline  
Old 09-18-2008, 10:01 AM   # 30
Member
 
Join Date: Oct 2007
Posts: 16
Default Re: Quiz to database, instructions and code


re-subscribe
Wylie is offline  
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Articulate E-Learning Blogs

×

Search Engine Friendly URLs by vBSEO 3.1.0