创建考试

要创建考试,您需要发送带有考试详细信息的发布请求。 以下是一个示例:
{
  "name": "Introduction to Data Science DSC101",
  "platform": [
    "android",
    "ios",
    "web"
  ],
  "enforceDesktop": false,
  "analytics": {
    "device": true,
    "ip": true,
    "focusing": true
  },
  "openOn": 1719046628502,
  "closeOn": 1719064544928,
  "duration": 1200,
  "restricted_commands": [
    "copy",
    "cut",
    "paste",
    "right_mouse",
    "...more"
  ],
  "logo": "data:base64,WHV4MnJsN2oyZUdmb...",
  "translation": {
    "enableSelection": true,
    "entire": false,
    "langs": [
      "en",
      "zh",
      "ru",
      "de",
      "vi",
      "...more"
    ]
  },
  "redirectionLink": "https://exam.feedback.stanford.com/respondent",
  "monitoring": {
    "cam": true,
    "screen": true
  },
  "result": {
    "availability": "instant",
    "public": false,
    "viewableAns": true
  },
  "respondant": {
    "enforceUser": false,
    "multipleUserAttempts": false,
    "privateExam": false,
    "multipleInvitationAttempts": false,
    "multipleDeviceAttempt": false,
    "resumable": true,
    "charge": false
  },
  "welcomePage": {
    "content": [
      {
        "type": "text",
        "value": "Your custom html text goes here.."
      },
      {
        "type": "about",
        "value": "Enter Matric No."
      },
      {
        "type": "input",
        "value": "Enter Password"
      }
    ],
    "validate": false,
    "multipleAttempts": false
  },
  "thankYouPage": "<div>Thank you for your participation</div>",
  "courses": [
    {
      "title": "Data Wrangling and Cleaning",
      "shuffleQ": true,
      "shuffleOption": false,
      "limit": 1,
      "questions": [
        {
          "q": "Which of the following methods is used to handle missing values in a dataset?",
          "opt": [
            "Normalization",
            "One-Hot Encoding",
            "Imputation",
            "PCA (Principal Component Analysis)"
          ],
          "ans": [
            2
          ],
          "type": "radio",
          "points": 1
        },
        {
          "q": "Explain the process of data cleaning and why it is important in data science. Include examples of common issues found in raw data and how they can be addressed.",
          "type": "free",
          "points": 3
        }
      ]
    },
    {
      "title": "Statistical Analysis and Visualization",
      "shuffleQ": true,
      "shuffleOption": false,
      "questions": [
        {
          "q": "Which of the following are common types of data visualizations used in exploratory data analysis (EDA)? (Select all that apply)",
          "opt": [
            "Bar Chart",
            "Histogram",
            "Scatter Plot",
            "Decision Tree"
          ],
          "ans": [
            0,
            1,
            2
          ],
          "type": "checkbox"
        },
        {
          "q": "Which statistical measure is used to describe the spread or dispersion of a set of data points?",
          "ans": [
            "Standard Deviation",
            "S.D",
            "SD"
          ],
          "type": "exact_or"
        },
        {
          "q": "List 3 methods for measures of central tendency?",
          "ans": [
            "Mean",
            "Median",
            "Mode"
          ],
          "type": "exact_and"
        }
      ]
    }
  ]
}

解释

单个字段和值解释如下:
字段类型必需的描述
nameString这将是您考试的名称。
它不能大于 200 人物
platformArray此数组应包含您希望该考试支持的平台。
有效值是 android, ios web
enforceDesktopBoolean如果只能在屏幕分辨率宽度大于999像素的设备上进行此考试,则为这是正确的。 默认为false
openOnNumber这是应该进行考试的时间。<br>预计将以时期格式,这是自1970年1月1日午夜(UTC)以来已经过去的毫秒数。
closeOnNumber这是考试不再可用的时候。<br>预计将以时期格式,这是自1970年1月1日午夜(UTC)以来已经过去的毫秒数。
durationNumber这是受访者可以完成考试的最多秒。
logoString这可以是考试徽标的基本64数据,也可以是指向有效图像的HTTPS URL。
monitoring.camBoolean如果您想记录受访者凸轮
monitoring.screenBoolean如果您想记录受访者屏幕
analytics.deviceBoolean如果要记录受访设备信息,则为the
analytics.ipBoolean如果您想记录受访者公共IP地址,则为真实
analytics.focusingBoolean如果您想在受访者失去考试屏幕时要登录和标记,则为true
restricted_commandsArray该数组应包含被告参加考试时要限制的命令。


copy: 这应该禁用与考试页面上复制文本关联的任何命令 (e.g CTRL+C, CMD+C).
cut: 这应该禁用与考试页面上剪切文本相关的任何命令 (e.g CTRL+X, CMD+X).
paste: 这应该禁用与考试页面上粘贴文本相关的任何命令 (e.g CTRL+V, CMD+V).
right_mouse: 这应该禁用鼠标右键单击
print: 这应该禁用与打印考试页面关联的任何命令 (e.g CTRL+P, CMD+P).
fullscreen: 这应该禁用与在考试页面上输入全屏相关的任何命令 (e.g CTRL+CMD+F).
shortcut: 这将禁用所有快捷键(例如箭头,箭头,箭头,箭头,n,p,1-9)
sci_cal: 这应该禁用科学计算器
basic_cal: 这应该禁用基本计算器
result.availabilityString这可以是以下任何一个:

instant: 如果您希望受访者的结果立即可用
manual: 如果您想手动发布受访者结果
off: 如果您不打算在我们的平台上发布受访者结果
result.publicBoolean如果您想让所有受访者互相分数
result.viewableAnsBoolean如果您想被告人看到标记和尝试
respondant.enforceUserBoolean强制为受访者登录用户。
respondant.multipleUserAttemptsBoolean启用来自同一用户的多次尝试。 默认为false。
请注意:如果此值将被忽略 respondant.enforceUser 是错误的
respondant.privateExamBoolean是的,如果您只想由您邀请的受访者参加此考试。
respondant.multipleInvitationAttemptsBoolean从相同的邀请链接中启用多次尝试。 默认为false
请注意:如果此值将被忽略 respondant.privateExam 是错误的
respondant.multipleDeviceAttemptBoolean从同一浏览器或设备启用多次尝试。 默认为false
respondant.resumableBoolean当受访者重新加载页面时,使考试可重新恢复。 默认为false
respondant.chargeBoolean向受访者收取所需的代币参加此考试。 默认为false
respondant.limitNumer这应该是一个积极的整数,代表可以尝试此考试的最大受访者
redirectionLinkString在完成测试时,提供此操作将将用户重定向到指定的链接,并在附加的查询参数 respondent_id=unique_id.

例如,如果您提供 https://exam.feedback.stanford.com/respondent 作为您的重定向链接,受访者将被重定向到 https://exam.feedback.stanford.com/respondent?respondent_id=unique_id. 在哪里 unique_id 将是受访者的身份证。
translation.enableSelectionBoolean如果您想启用语言选择或使用默认系统语言
translation.entireBoolean如果您想翻译整个考试文本,包括问题和选项
translation.langsArray此数组应包含 ISO 639-1 language codes 您希望您的考试翻译在其中可用。

支持的语言
  • English (en)
  • French (fr)
  • Chinese (zh)
  • German (de)
  • Swahili (sw)
  • Spanish (es)
  • Russian (ru)
  • Portuguese (pt)
  • Hindi (hi)
  • Arabic (ar)
  • Bengali (bn)
  • Japanese (ja)
  • Korean (ko)
  • Italian (it)
  • Turkish (tr)
  • Vietnamese (vi)
  • Dutch (nl)
  • Thai (th)
  • Indonesian (id)
  • Polish (pl)
  • Malay (ms)
  • Filipino (tl)
  • Swedish (sv)
  • Greek (el)
  • Czech (cs)
  • Romanian (ro)
  • Hungarian (hu)
  • Ukrainian (uk)
  • Hebrew (he)
  • Farsi (fa)
  • Danish (da)
  • Norwegian (no)
  • Finnish (fi)
  • Bulgarian (bg)
  • Albanian (sq)
  • Latvian (lv)
  • Mongolian (mn)
  • Slovak (sk)
  • Catalan (ca)
  • Georgian (ka)
  • Lithuanian (lt)
  • Serbian (sr)
welcomePage.validateBoolean如果要验证字段值 welcomePage.content 通过您的Webhook URL. 默认为false.
welcomePage.multipleAttemptsBoolean如果要多次尝试相同的字段值,则是的。 默认为false。
welcomePage.content.typeString在考试的顶部渲染内容
价值可以是以下任何一个:

text: 渲染文本或HTML内容.
input: 渲染输入字段,对应 welcomePage.content.value 将用作输入字段的占位符。
thankYouPageString完成或提交考试后,向受访者显示的文本或HTML内容。
courses.titleString课程的标题
courses.shuffleQBoolean忠实于本节中的问题
courses.shuffleOptionBoolean忠实地在问题中调整选项 radio or checkbox
courses.limitInteger整个正整数值限制受访者可以在本课程中尝试的最大问题数量
courses.questions.qString文本或HTML形式中的个人问题。
courses.questions.optArray问题的选项。 应该是字符串的数组,最多可以支持26个项目.
只有在 courses.questions.type "radio" 或者 "checkbox".
courses.questions.ansArray问题的答案.如果 courses.questions.type "radio" 或者 "checkbox", 这应该是一个整数作为正确选择的位置.否则 courses.questions.type "exact" 或者 "exact_and", 那应该是字符串的数组.
courses.questions.typeString价值可以是以下任何一个:

radio: 当问题有单个答案时,适用于此.
checkbox: 当问题有多个答案的选项时,合适.
exact: 使用钻头或.
exact_and: 使用位置对受访者进行正确答案的尝试,并.
free: 当回答问题时,合适的是自由文本,例如论文或解释。 请注意,这样的问题将由我们的AI引擎标记.
courses.questions.pointsNumber要分配到这个问题的积分数量。 默认为1
courses.questions.expString解释问题的正确答案。

编辑考试

编辑现有考试时,不允许您更新 monitoring, result respondant 场地. 但是您可以将受访者字段中的限制更新为 respondant.limit.
更新包含对象或数组作为其值的字段时,不会执行合并操作。 相反,此类字段的整个值被新的值替换。
如果要删除,则可以将字段设置为空


要编辑现有考试,您需要与考试一起发送PUT请求。
{
  "platform": [
    "web"
  ],
  "openOn": null,
  "restricted_commands": [
    "copy",
    "cut",
    "paste"
  ],
  "translation": {
    "enableSelection": true,
    "entire": true,
    "langs": [
      "en",
      "zh",
      "ru"
    ]
  },
  "questions": [
    {
      "title": "Data Wrangling and Cleaning",
      "shuffleQ": true,
      "shuffleOption": false,
      "limit": 1,
      "questions": [
        {
          "q": "Which of the following methods is used to handle missing values in a dataset?",
          "opt": [
            "Normalization",
            "One-Hot Encoding",
            "Imputation",
            "PCA (Principal Component Analysis)"
          ],
          "ans": [
            2
          ],
          "type": "radio",
          "points": 1
        },
        {
          "q": "Explain the process of data cleaning and why it is important in data science. Include examples of common issues found in raw data and how they can be addressed.",
          "type": "free",
          "points": 3
        }
      ]
    },
    {
      "title": "Statistical Analysis and Visualization",
      "shuffleQ": true,
      "shuffleOption": false,
      "questions": [
        {
          "q": "Which of the following is a Python library used for data visualization?",
          "opt": [
            "NumPy",
            "Pandas",
            "Matplotlib",
            "Scikit-learn"
          ],
          "ans": [
            2
          ],
          "type": "radio"
        },
        {
          "q": "Discuss the importance of exploratory data analysis (EDA) in data science and describe how visualization tools can be used to perform EDA.",
          "type": "free",
          "points": 2
        }
      ]
    }
  ]
}

删除考试

要删除考试,您需要与acew_id一起发送删除请求。
删除考试将删除与此类考试相关的所有数据,包括所有媒体数据,问题和受访者数据
{
  "x-client-id": "xxx-xxx-xxx",
  "x-client-secret": "xxxxxxx",
  "content-type": "application/json"
}

反馈评论 (0)