Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Captivate 8 : How to make quiz reporting work?

New Here ,
Jul 21, 2015 Jul 21, 2015

i was not be able to make quiz reporting work properly.

can someone assist me about this.

BTW im using an internal server

i dont know what to put in the "Configure Internal Server Settings" and where will i put the published file of the elearning.

TIA

TOPICS
Advanced
318
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jul 22, 2015 Jul 22, 2015

The details you offer a minimal, what kind of 'internal server'?

Is it an LMS? CMS? Web server? What type: IIS? Apache?

Regardless of those details, you'll need to find out where the files are stored from the webserver documentation.

Also, you'll want to search the webserver documentation for details on how Cp would communicate with it: SCORM, TinCan, even AICC are options there.  Once you find out what your server wants, as far as format and messages, then we can assist you in figuring out how to get it out of Cp.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 23, 2015 Jul 23, 2015

we were using a windows server.

i already get a way to get a result using an .aspx file.

but my problem now is i dont know why the file created were not in .xml file.

i think there is a problem with the code that i am using.

here is the code. i hope you can help me

<%@ Page Language="c#" ValidateRequest="False"%>

<%@ Import Namespace="System.IO"%>

<%@ Import Namespace="System.Web"%>

<%@ Import Namespace="System.Collections.Specialized"%>

<%@ Import Namespace="System.Xml"%>

<%@ Import Namespace="System.Data"%>

<%@ Import Namespace="System.Data.SqlClient"%>

<%

  String nextKey, label;

  String[] primeInfo = new String[4];

  Object[] secInfo = new Object[3];

  String fileName, userName, userID, cName, cStatus, initScore, sessionTime, sessionDate;

  String connectionString, insertCommand;

  int quizAttempts, userScore;

  System.Text.StringBuilder displayValues = new System.Text.StringBuilder();

  System.Collections.Specialized.NameValueCollection postedValues = Request.Form;

  // Get XML filename and content

  displayValues.Append(postedValues[3]);

  fileName = displayValues.ToString();

  displayValues.Length = 0;

  displayValues.Append(postedValues[4]);

  label = displayValues.ToString();

  // Write content into an XML file

  //FileStream fs = new FileStream(Server.MapPath("~/eLearning/UserData/")+ fileName, FileMode.OpenOrCreate);

  FileStream fs = new FileStream("////itg-amdsvr04//eLearning//sample//UserData//"+ fileName, FileMode.OpenOrCreate);

  StreamWriter sw = new StreamWriter(fs);

  sw.Write(label);

  sw.Close();

  fs.Close();

  // Assign values from the XML file to variables

  XmlDocument doc = new XmlDocument();

  doc.Load("////itg-amdsvr04//eLearning//sample//UserData//"+fileName);

  XmlNodeList primaryList = doc.SelectNodes("Course/child::node()");

  XmlNodeList secondaryList = doc.SelectNodes("Course/Result/CoreData/child::node()");

  int pCount = 0;

  int sCount = 0;

  foreach(XmlNode primaryInfo in primaryList)

  {

  if(primaryInfo.Name == "CourseName" || primaryInfo.Name == "LearnerName" || primaryInfo.Name == "LearnerID" || primaryInfo.Name == "QuizAttempts")

  {

  primeInfo[pCount] = primaryInfo.Attributes["value"].Value;

  pCount++;

  }

  }

  foreach(XmlNode secondaryInfo in secondaryList)

  {

  if(secondaryInfo.Name == "Status" || secondaryInfo.Name == "Score" || secondaryInfo.Name == "SessionTime")

  {

  secInfo[sCount] = secondaryInfo.Attributes["value"].Value;

  sCount++;

  }

  }

  // Processing variables

  cName = Convert.ToString(primeInfo[0]);

  userName = Convert.ToString(primeInfo[1]);

  userID = Convert.ToString(primeInfo[2]);

  quizAttempts = Convert.ToInt32(primeInfo[3]);

  cStatus = Convert.ToString(secInfo[0]);

  userScore = Convert.ToInt32(secInfo[1]);

  userScore = userScore/10;

  sessionTime = Convert.ToString(secInfo[2]);

  sessionDate = DateTime.Now.ToString("MM/dd/yy");

  Response.Write("Username: " + userName + "<br>" + "User ID: " + userID + "<br>" + "Course Name: " + cName + "<br>" + "Quiz Attempts: " + quizAttempts + "<br>");

  Response.Write("Status: " + cStatus + "<br>" + "Score: " + userScore + "<br>" + "Time Spent: " + sessionTime + "<br>" + "Date Taken: " + sessionDate);

  connectionString = ConfigurationSettings.AppSettings["forCourse"].ToString();

  SqlConnection connection = null;

  connection = new SqlConnection(connectionString);

  insertCommand = "INSERT INTO Course_Results VALUES ('"+userName +"', '"+userID+"', '"+cName+"', '"+cStatus+"', '"+userScore+"', '"+quizAttempts+"', '"+sessionTime+"', '"+sessionDate+"')";

  SqlCommand toInsert = new SqlCommand(insertCommand, connection);

  connection.Open();

  toInsert.ExecuteNonQuery();

  connection.Close();

%>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 10, 2015 Aug 10, 2015
LATEST

Sorry for not getting back sooner, but this is quickly diving into windows server troubleshooting, which is well beyond my comfort zone.

Maybe there would be a windows server forum where you could ask assistance for supporting captivate courses?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources