sellquiz
Version:
An open source domain-specific language for online assessment
36 lines (30 loc) • 1.23 kB
HTML
<!-- Minimum Working Example (MWE) to embed SELL questions into your website -->
<html lang="de">
<head>
<title>SELL-DEV Test Website</title>
<meta charset="utf-8">
<link rel = "stylesheet" href = "node_modules/bootstrap/dist/css/bootstrap.min.css" />
<script>MathJax = { loader: {load: ['input/asciimath', 'output/svg', 'ui/menu'] }, };</script>
<script type="text/javascript" id="MathJax-script" async src="node_modules/mathjax/es5/startup.js"></script>
<script src="node_modules/mathjs/lib/browser/math.js" type="text/javascript"></script>
<script src="build/js/sellquiz.min.js?date=$NOW$"></script>
</head>
<body>
<br/>
<div id="container" class="container">
<div id="sellQuestions"></div>
</div>
</body>
<script>
let code = `Addition
x, y in { 2, 3, ..., 10 }
Calculate $x + y = #(x + y)$.
`;
// ===== HIGH LEVEL API =====
sellquiz.setLanguage("en");
let sellQuestionsDiv = document.getElementById("sellQuestions");
if(sellquiz.autoCreateQuiz(code, sellQuestionsDiv) == false)
alert(sellquiz.getErrorLog());
</script>
</html>