gpt4 book ai didi

markdown - 在 GIFT 格式的 Moodle 测验问题中使用 MarkDown

转载 作者:行者123 更新时间:2023-12-03 06:26:54 24 4
gpt4 key购买 nike

有没有办法在测验问题中使用 MarkDown 的固定宽度代码块?

我正在文本编辑器中写我的测验问题 "GIFT" format然后将它们导入到我的测验库中。 GIFT 格式非常快速且紧凑,这种方法让我无需访问互联网即可提出问题。

但是,我在测验问题中使用 MarkDown 文本格式时遇到了困难。 The docs say it's supported.

问题是 GIFT 格式不允许在问题中间出现换行符,但 MarkDown 依赖换行符来划分代码块。例如,我想要以下测验问题:

::Finding bugs::
[markdown] Consider the following code:

x=5;
if x=5
disp("It worked!")
else
print('Uh oh!')
done

On which lines do bugs occur? Answer in the form [1,2,3].
{
=[2,3,5,6]
}

这无法正确导入,因为 GIFT 格式禁止测验问题中出现换行符。但我无法删除换行符,因为这样 MarkDown 将无法识别代码块。

想法?谢谢!

最佳答案

(回答我自己的问题)这似乎有效:

::Finding bugs::
[markdown]
Consider the following code\:\n
\n x\=5;
\n if x\=5
\n disp("It worked!")
\n else
\n print('Uh oh!')
\n done
\n\n\n
On which lines do bugs occur? Answer in the form [1,2,3].
{
=[2,3,5,6]
}

请注意每个\n 和代码之间的四个空格。呃。

关于markdown - 在 GIFT 格式的 Moodle 测验问题中使用 MarkDown,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29775380/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com