|
|
|
@ -127,6 +127,35 @@ export default function TestEdit() { |
|
|
|
style={{ marginBottom: 16 }} |
|
|
|
style={{ marginBottom: 16 }} |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Title level={2}>{test.title}</Title> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{test.description && ( |
|
|
|
|
|
|
|
<Text type="secondary" style={{ display: 'block', marginBottom: 16 }}> |
|
|
|
|
|
|
|
{test.description} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Card style={{ marginBottom: 24 }}> |
|
|
|
|
|
|
|
<Descriptions column={3}> |
|
|
|
|
|
|
|
<Descriptions.Item label="Вопросов">{test.questions.length}</Descriptions.Item> |
|
|
|
|
|
|
|
<Descriptions.Item label="Порог зачёта">{test.passing_score}%</Descriptions.Item> |
|
|
|
|
|
|
|
<Descriptions.Item label="Таймер"> |
|
|
|
|
|
|
|
{test.time_limit ? `${test.time_limit} мин` : 'Без ограничений'} |
|
|
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
|
|
<Descriptions.Item label="Возврат к вопросу"> |
|
|
|
|
|
|
|
{test.allow_navigation_back ? ( |
|
|
|
|
|
|
|
<Tag color="green">Разрешён</Tag> |
|
|
|
|
|
|
|
) : ( |
|
|
|
|
|
|
|
<Tag color="red">Запрещён</Tag> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
|
|
<Descriptions.Item label="Версия">{test.version}</Descriptions.Item> |
|
|
|
|
|
|
|
<Descriptions.Item label="Создан"> |
|
|
|
|
|
|
|
{new Date(test.created_at).toLocaleDateString('ru-RU')} |
|
|
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
|
|
</Descriptions> |
|
|
|
|
|
|
|
</Card> |
|
|
|
|
|
|
|
|
|
|
|
{versions.length > 1 && ( |
|
|
|
{versions.length > 1 && ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<Title level={3}>История версий</Title> |
|
|
|
<Title level={3}>История версий</Title> |
|
|
|
@ -186,35 +215,6 @@ export default function TestEdit() { |
|
|
|
</> |
|
|
|
</> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
<Title level={2}>{test.title}</Title> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{test.description && ( |
|
|
|
|
|
|
|
<Text type="secondary" style={{ display: 'block', marginBottom: 16 }}> |
|
|
|
|
|
|
|
{test.description} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Card style={{ marginBottom: 24 }}> |
|
|
|
|
|
|
|
<Descriptions column={3}> |
|
|
|
|
|
|
|
<Descriptions.Item label="Вопросов">{test.questions.length}</Descriptions.Item> |
|
|
|
|
|
|
|
<Descriptions.Item label="Порог зачёта">{test.passing_score}%</Descriptions.Item> |
|
|
|
|
|
|
|
<Descriptions.Item label="Таймер"> |
|
|
|
|
|
|
|
{test.time_limit ? `${test.time_limit} мин` : 'Без ограничений'} |
|
|
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
|
|
<Descriptions.Item label="Возврат к вопросу"> |
|
|
|
|
|
|
|
{test.allow_navigation_back ? ( |
|
|
|
|
|
|
|
<Tag color="green">Разрешён</Tag> |
|
|
|
|
|
|
|
) : ( |
|
|
|
|
|
|
|
<Tag color="red">Запрещён</Tag> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
|
|
<Descriptions.Item label="Версия">{test.version}</Descriptions.Item> |
|
|
|
|
|
|
|
<Descriptions.Item label="Создан"> |
|
|
|
|
|
|
|
{new Date(test.created_at).toLocaleDateString('ru-RU')} |
|
|
|
|
|
|
|
</Descriptions.Item> |
|
|
|
|
|
|
|
</Descriptions> |
|
|
|
|
|
|
|
</Card> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Title level={3}>Вопросы ({test.questions.length})</Title> |
|
|
|
<Title level={3}>Вопросы ({test.questions.length})</Title> |
|
|
|
|
|
|
|
|
|
|
|
{test.questions.map((question, index) => ( |
|
|
|
{test.questions.map((question, index) => ( |
|
|
|
|