content-management-system - Keystone.js:实现编辑考试和考试问题模型的最佳方式
问题描述
在 Keystone.js 中,很容易添加带有“简单”字段的模型,例如。
Car:
- registrationNumber
- model
- year
- isAutomatic
对于所有这些字段,将生成一个 [Edit Car] 页面,该页面将包含一个包含所有字段的“表单”。
但是,由于我正在开发具有考试/测验功能的学习系统,因此我需要编辑更复杂的模型 -Exam
特别是Questions[]
.
Exam
除之外的所有字段Question
都是“简单的”(并且可以在 [Edit Exam] 页面上轻松呈现为可编辑字段)。但是如何为复杂的Question
模型提供 UI 呢?
Exam:
- name
- durationMinutes
- welcomeText
- Questions[]
UI 的主要目的是Questions
在一个上下文中进行编辑Exam
(因为每个考试最多可以有 100 个问题)。
Question:
- questionType:single_choice|mutliple_choice|picture|text|longtext)
- questionText
- questionChoices[] : string
- correctAnswer: string
- explanationTextLong: string
我想知道将这个相关列表Questions
编辑器添加到 keystone UI 的最佳方法是什么?
解决方案
推荐阅读
- python - 将csv中的多行单元格拆分为多行
- sql - SQL - 聚合可能不会出现在 WHERE 子句中,除非它位于 HAVING 子句或选择列表中包含的子查询中
- laravel-5 - 我想在使用 Laravel 在我的 mysql 数据库表中插入新值时收到弹出通知
- android - 无法通过 `CompileOptions 指定 -processorpath 或 --processor-path
- wordpress - 基于自定义客户字段的附加订单电子邮件
- swift - 尝试使用 nil-coalescing 运算符?对于抛出和返回可选的函数
- ruby-on-rails - 如何调用对象(多对多关系)
- css - 影响其他页面的范围样式
- windows - Dropdown显示下拉控件上方的内容,它不显示uwp中控件下方的内容
- python-3.x - 检查给定时间段内是否缺少某个日期时间值