g5
This commit is contained in:
1 parent
a5a09b0aef
commit
cfe3260027
3 files changed
+29
-7
No files matched your search
+14
-2
@@ -109,7 +109,13 @@ async function createTemp() {
|
|||||||
],
|
],
|
||||||
"result": [
|
"result": [
|
||||||
["Gut, weil ...", 5],
|
["Gut, weil ...", 5],
|
||||||
["Schlecht, weil ...", 1]
|
["Schlecht, weil ...", 1],
|
||||||
|
["Lorem ipsum dolor sit amet", 2],
|
||||||
|
["consetetur sadipscing elitr, sed diam ", 3],
|
||||||
|
[" nonumy eirmod tempor invidunt ut labore ", 4],
|
||||||
|
["et dolore magna aliquyam erat, sed diam", 5],
|
||||||
|
[" voluptua. At vero eos et accusam et justo duo", 1],
|
||||||
|
["the end", 5]
|
||||||
],
|
],
|
||||||
"result_history": [
|
"result_history": [
|
||||||
{
|
{
|
||||||
@@ -120,7 +126,13 @@ async function createTemp() {
|
|||||||
],
|
],
|
||||||
"result": [
|
"result": [
|
||||||
["Gut, weil ...", 5],
|
["Gut, weil ...", 5],
|
||||||
["Schlecht, weil ...", 1]
|
["Schlecht, weil ...", 1],
|
||||||
|
["Lorem ipsum dolor sit amet", 2],
|
||||||
|
["consetetur sadipscing elitr, sed diam ", 3],
|
||||||
|
[" nonumy eirmod tempor invidunt ut labore ", 4],
|
||||||
|
["et dolore magna aliquyam erat, sed diam", 5],
|
||||||
|
[" voluptua. At vero eos et accusam et justo duo", 1],
|
||||||
|
["the end", 5]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
+14
-4
@@ -116,10 +116,20 @@ setUserData(couchDB);
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "scala":
|
case "scala":
|
||||||
let score = 0;
|
var score = 0;
|
||||||
for(let j = 0; j < courseInfo.result.length; j++) {score += courseInfo.result[j][index]};
|
for (let j = 0; j < courseInfo.result.length; j++) {
|
||||||
score = score / courseInfo.result.length;
|
score += courseInfo.result[j][index];
|
||||||
const percent = (score/5)*100;
|
}
|
||||||
|
var percent;
|
||||||
|
if (courseInfo.result.length > 0) {
|
||||||
|
score = score / courseInfo.result.length;
|
||||||
|
percent = (score/5)*100;
|
||||||
|
} else {
|
||||||
|
score = 0;
|
||||||
|
percent = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(courseInfo.result.length);
|
||||||
|
|
||||||
const resultDisplay = document.createElement("div");
|
const resultDisplay = document.createElement("div");
|
||||||
resultDisplay.className = "overlayScalaRes"
|
resultDisplay.className = "overlayScalaRes"
|
||||||
|
|||||||
@@ -558,7 +558,7 @@ function createEvaluation(question) {
|
|||||||
<select>
|
<select>
|
||||||
<option value="text" ${question.type == "text" ? "selected": ""}>Text</option>
|
<option value="text" ${question.type == "text" ? "selected": ""}>Text</option>
|
||||||
<option value="scala" ${question.type == "scala" ? "selected": ""}>Scala</option>
|
<option value="scala" ${question.type == "scala" ? "selected": ""}>Scala</option>
|
||||||
<option value="emoji" ${question.type == "emoji" ? "selected": ""}>Emoji</option>
|
<!--<option value="emoji" ${question.type == "emoji" ? "selected": ""}>Emoji</option>-->
|
||||||
</select>
|
</select>
|
||||||
`;
|
`;
|
||||||
return div;
|
return div;
|
||||||
|
|||||||
Reference in new issue
Block a user