コード例 #1
0
    /// <summary>
    /// The set location button pressed.
    /// </summary>
    /// <remarks>Set the Location (Bookmark) via SCORM and exit with a status of 'suspend'.\n
    /// This allows the LMS to launch the SCO without starting a new attempt.</remarks>
    public void ButtonSetLocationPressed()
    {
        GameObject inputFieldLocation = GameObject.Find("InputFieldLocation");
        string     location           = inputFieldLocation.GetComponent <InputField>().text;

        if (location == "")
        {
            inputFieldLocation.transform.Find("Placeholder").gameObject.GetComponent <Text> ().text = "You must enter a location!";
        }
        else
        {
            //Reset
            inputFieldLocation.GetComponent <InputField>().text = "";
            inputFieldLocation.transform.Find("Placeholder").gameObject.GetComponent <Text> ().text = "Location string...";

            ScormManager.SetSessionTime(currentTime);
            ScormManager.SetLocation(location);
            ScormManager.SetExit(StudentRecord.ExitType.suspend);
            ScormManager.Commit();
        }
    }
コード例 #2
0
 /// <summary>
 /// The exit SCORM button is pressed.
 /// </summary>
 public void ButtonExitSCORMPressed()
 {
     ScormManager.SetSessionTime(currentTime);                                                       // Set this sessions time from the timer
     ScormManager.SetExit(StudentRecord.ExitType.normal);                                            // In Blackboard, this will complete the SCO attenmpt, even if the Completion Status is not set to completed.
     ScormManager.Commit();
 }