diff --git a/community/www/macros/livecode.html b/community/www/macros/livecode.html
index fdd67b4f..9714b313 100644
--- a/community/www/macros/livecode.html
+++ b/community/www/macros/livecode.html
@@ -15,8 +15,8 @@
@@ -30,20 +30,11 @@
-
- {{ }}
-
-
{% if is_exercise %}
-
- {% if last_submitted %}
-
- {% endif %}
+
+ {% if last_submitted %}
+
+ {% endif %}
{% endif %}
@@ -59,8 +50,8 @@
@@ -72,15 +63,14 @@
{% macro LiveCodeEditorJS(name, code) %}
-
+
@@ -90,7 +80,7 @@
var livecodeEditors = [];
var livecodeEditorsMap = {};
- $(function () {
+ $(function() {
$(".livecode-editor").each((i, e) => {
var name = e.id.replace("editor-", "");
var editor = new LiveCodeEditor(e, {
@@ -100,12 +90,12 @@
livecodeEditors.push(editor);
livecodeEditorsMap[e.id] = editor;
- $(e).find(".reset").on('click', function () {
+ $(e).find(".reset").on('click', function() {
let code = $(e).find(".reset-code").html();
editor.codemirror.doc.setValue(code);
});
- $(e).find(".submit").on('click', function () {
+ $(e).find(".submit").on('click', function() {
let code = editor.codemirror.doc.getValue();
console.log("submit", name, code);
frappe.call("community.lms.api.submit_solution", {
@@ -125,7 +115,7 @@
});
function updateSubmitTimes() {
- $(".human-time").each(function (i, e) {
+ $(".human-time").each(function(i, e) {
var d = $(e).data().timestamp;
$(e).html(__("Submitted {0}", [comment_when(d)]));
});