CODE MERGE : RV
This commit is contained in:
parent
287c859eaa
commit
a88dff4d4b
@ -75,6 +75,9 @@ function CheakQnType(question, questionIndex, depth,nested) {
|
||||
let count =0
|
||||
var count1 =0
|
||||
function processQuestion(question, questionIndex, depth,nested) {
|
||||
// console.log('question Data')
|
||||
// console.log(question);
|
||||
|
||||
const questionTex = question.question;
|
||||
const questionText = questionTex.replace('<p>', '<p id="question_Text">');
|
||||
const questionDescription = question.question_description;
|
||||
@ -83,6 +86,7 @@ function processQuestion(question, questionIndex, depth,nested) {
|
||||
const multipleAnswer =question.question_sub_type; // this gives true or false to chaeck multiple answers or not
|
||||
// Add appropriate indentation for nested questions
|
||||
const questionIndentation = " ".repeat(depth + 1);
|
||||
console.log(questionIndentation)
|
||||
if (nested == 1) {// this adds the inside the questionGroup
|
||||
count1++
|
||||
questionPaper += `<div class="text-qus-align">${questionIndentation}${count}.${count1}) ${convertToLatex(questionText, mathstatus)}${questionIndentation}</div><p id="question-mark">Marks :${questionMark}</p><div class="text-des">${convertToLatex(questionDescription, mathstatus)}</div>`;
|
||||
@ -90,6 +94,8 @@ function processQuestion(question, questionIndex, depth,nested) {
|
||||
count++
|
||||
questionPaper += `<div class="text-qus-align">${questionIndentation}${count}) ${convertToLatex(questionText, mathstatus)}${questionIndentation}</div><p id="question-mark">Marks :${questionMark}</p><div class="text-des">${convertToLatex(questionDescription, mathstatus)}</div>`;
|
||||
}
|
||||
console.log(questionPaper);
|
||||
|
||||
|
||||
// If it's an MCQ question, add choices
|
||||
if (question.question_type === "group") {
|
||||
@ -183,6 +189,7 @@ function convertJSONToQuestionPaper(data, depth = 0, sectionIndex = 1, questionI
|
||||
// Call the function and display the formatted question paper
|
||||
const formattedQuestionPaper = convertJSONToQuestionPaper(jsonData, 0, 1, 1);
|
||||
const questionPaperElement = document.getElementById("questionPaper");
|
||||
console.log(questionPaperElement);
|
||||
questionPaperElement.innerHTML = formattedQuestionPaper; // Use innerHTML here
|
||||
|
||||
}
|
||||
@ -317,6 +317,9 @@
|
||||
});
|
||||
}
|
||||
|
||||
console.log()
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -144,8 +144,8 @@ function promptBox() {
|
||||
return 'You need to enter Filename!'
|
||||
}
|
||||
else if (value){
|
||||
const fileexists =fileexists(entervalue);
|
||||
if(fileexists){
|
||||
const fileexist = fileexists(entervalue);
|
||||
if(fileexist){
|
||||
Swal.update({ showDenyButton: true });
|
||||
return 'This file Name already exists'
|
||||
}else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user