/// <summary>
 /// The toggle unknown completed final change event.
 /// </summary>
 /// <param name="value">If set to <c>true</c> value.</param>
 public void OnToggleUnknownCompletedFinalChange(bool value)
 {
     if (value)
     {
         ScormManager.SetCompletionStatus(StudentRecord.CompletionStatusType.unknown);
     }
 }
 /// <summary>
 /// The toggle incomplete final change event.
 /// </summary>
 /// <param name="value">If set to <c>true</c> value.</param>
 public void OnToggleIncompleteFinalChange(bool value)
 {
     if (value)
     {
         ScormManager.SetCompletionStatus(StudentRecord.CompletionStatusType.incomplete);
     }
 }
 /// <summary>
 /// The toggle not attempted final change event.
 /// </summary>
 /// <param name="value">If set to <c>true</c> value.</param>
 public void OnToggleNotAttemptedFinalChange(bool value)
 {
     if (value)
     {
         ScormManager.SetCompletionStatus(StudentRecord.CompletionStatusType.not_attempted);
     }
 }
    /// <summary>
    /// Initializes the data into the GUI.
    /// </summary>
    private void InitializeData()
    {
        //Learner Data
        GameObject.Find("TextID").GetComponent <Text> ().text   = ScormManager.GetLearnerId();
        GameObject.Find("TextName").GetComponent <Text> ().text = ScormManager.GetLearnerName();

        StudentRecord.LearnerPreference learnerPreference = ScormManager.GetLearnerPreference();
        GameObject.Find("InputFieldAudioCaptioning").GetComponent <InputField> ().text = learnerPreference.audioCaptioning.ToString();
        GameObject.Find("InputFieldAudioLevel").GetComponent <InputField> ().text      = learnerPreference.audioLevel.ToString();
        GameObject.Find("InputFieldDeliverySpeed").GetComponent <InputField> ().text   = learnerPreference.deliverySpeed.ToString();
        GameObject.Find("InputFieldLanguage").GetComponent <InputField> ().text        = learnerPreference.langauge;

        LoadCommentFromLearnerList();

        //SCORM Data
        GameObject.Find("TextSCORMAPIVersion").GetComponent <Text> ().text = ScormManager.GetVersion();

        GameObject.Find("TextCredit").GetComponent <Text> ().text          = ScormManager.GetCredit().ToString();
        GameObject.Find("TextEntry").GetComponent <Text> ().text           = ScormManager.GetEntry().ToString();
        GameObject.Find("TextMode").GetComponent <Text> ().text            = ScormManager.GetMode().ToString();
        GameObject.Find("TextLocation").GetComponent <Text> ().text        = ScormManager.GetLocation();
        GameObject.Find("TextMaxTimeAllowed").GetComponent <Text> ().text  = ScormManager.GetMaxTimeAllowed().ToString();
        GameObject.Find("TextTotalTime").GetComponent <Text> ().text       = ScormManager.GetTotalTime().ToString();
        GameObject.Find("TextTimeLimitAction").GetComponent <Text> ().text = ScormManager.GetTimeLimitAction().ToString();
        GameObject.Find("TextLaunchData").GetComponent <Text> ().text      = ScormManager.GetLaunchData();

        LoadCommentFromLMSList();

        //Score
        GameObject.Find("TextScaledPassingScore").GetComponent <Text> ().text = ScormManager.GetScaledPassingScore().ToString();

        StudentRecord.LearnerScore score = ScormManager.GetScore();
        GameObject.Find("InputFieldMin").GetComponent <InputField> ().text   = score.min.ToString();
        GameObject.Find("InputFieldMax").GetComponent <InputField> ().text   = score.max.ToString();
        GameObject.Find("InputFieldScore").GetComponent <InputField> ().text = score.raw.ToString();

        GameObject.Find("SliderScoreProgressMeasure").GetComponent <Slider> ().value   = ScormManager.GetProgressMeasure();
        GameObject.Find("LabelScoreProgressMeasureAmount").GetComponent <Text> ().text = ScormManager.GetProgressMeasure().ToString();
        //Objectives
        LoadObjectives();

        //Interactions
        LoadLearnerInteractions();

        //Exit
        GameObject.Find("TextCompletionThreshold").GetComponent <Text> ().text = ScormManager.GetCompletionThreshold().ToString();
        switch (ScormManager.GetSuccessStatus())
        {
        case StudentRecord.SuccessStatusType.passed:
            GameObject.Find("TogglePassedFinal").GetComponent <Toggle>().isOn = true;
            break;

        case StudentRecord.SuccessStatusType.failed:
            GameObject.Find("ToggleFailedFinal").GetComponent <Toggle>().isOn = true;
            break;

        case StudentRecord.SuccessStatusType.unknown:
            GameObject.Find("ToggleUnknownFinal").GetComponent <Toggle>().isOn = true;
            break;
        }

        switch (ScormManager.GetCompletionStatus())
        {
        case StudentRecord.CompletionStatusType.completed:
            GameObject.Find("ToggleCompletedFinal").GetComponent <Toggle>().isOn = true;
            break;

        case StudentRecord.CompletionStatusType.incomplete:
            GameObject.Find("ToggleIncompleteFinal").GetComponent <Toggle>().isOn = true;
            break;

        case StudentRecord.CompletionStatusType.not_attempted:
            GameObject.Find("ToggleNotAttemptedFinal").GetComponent <Toggle>().isOn = true;
            break;

        case StudentRecord.CompletionStatusType.unknown:
            GameObject.Find("ToggleUnknownCompletedFinal").GetComponent <Toggle>().isOn = true;
            break;

        case StudentRecord.CompletionStatusType.not_set:
            ScormManager.SetCompletionStatus(StudentRecord.CompletionStatusType.incomplete);                                    // Set this first for every SCORM object, otherwise the LMS tends to treat it as a completed SCO by default
            GameObject.Find("ToggleIncompleteFinal").GetComponent <Toggle>().isOn = true;
            break;
        }
    }