【问题标题】:Retrieving values from Brightspace LMS using SCORM API使用 SCORM API 从 Brightspace LMS 检索值
【发布时间】:2021-11-26 13:41:17
【问题描述】:

我正在尝试使用此处由 SCORM.com / Rustici (https://scorm.com/scorm-explained/technical-scorm/run-time/) 提供的 SCORM API 从 Brightspace LMS 中检索一些值。

我感兴趣的值是学生的姓名、学生所在的部分(在 Brightspace 术语中是学生的班级)和课程名称。从 API 参考 (https://scorm.com/scorm-explained/technical-scorm/run-time/run-time-reference/) 中,我看到可以使用 cmi.core.student_name 提取学生的姓名。

问题:如何使用 SCORM API 提取学生的部分和课程名称?

【问题讨论】:

    标签: scorm lms


    【解决方案1】:

    根据您运行的 SCORM 版本,您需要从 https://scorm.com/scorm-explained/technical-scorm/run-time/api-discovery-algorithms/ 复制并粘贴代码

    一旦你完成了这个,那么对于 sCORM 1.2

    var API = getAPI();
    
    if (API) {
       var studentName = API.LMSGetValue("cmi.core.student_name");
       console.log(studentName);
    }
    else {
        console.log("Failed: Did you run this course directly and not via the LMS?");
    }
    

    对于 SCORM 2004

    getAPI(window);
    
    if (API) {
       var studentName = API.GetValue("cmi.core.student_name");
       console.log(studentName);
    }
    else {
        console.log("Failed: Did you run this course directly and not via the LMS?");
    }
    

    代码略有不同。您最好使用https://pipwerks.com/laboratory/scorm/api-wrapper-javascript/ 找到 SCORM API 并使用此包装器来处理版本中的细微差异。

    至于课程名称 - 如果您正在运行特定课程,您已经知道该课程的名称,因为您当前正在运行它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多