diff --git a/addform.html b/addform.html
index 65601f2..6e9092b 100644
--- a/addform.html
+++ b/addform.html
@@ -419,7 +419,6 @@
-
@@ -834,6 +833,7 @@ navpane();
html2json();
+// function for ONMOUSE HOVER to SHOW the side ADD BUTTONS
function showButtons(container) {
const buttons = container.querySelector('.buttons');
const onhover = container.querySelector('.onhover');
@@ -845,6 +845,7 @@ function showButtons(container) {
}
+// function for ONMOUSE HOVER to HIDE the side ADD BUTTONS
function hideButtons(container) {
const buttons = container.querySelector('.buttons');
const onhover = container.querySelector('.onhover');
@@ -1213,12 +1214,15 @@ function addQuestionGroup(idObj)
-
-
+
@@ -1476,7 +1479,6 @@ const value = localStorage.getItem('JSON_FOR_NAV')
// function groupQuestion( question_id = false, section_id = false , group_question_area_id = false, questionTitle = false, questionDescription = false, questionSubType = false, mathEnabled = false, Choice = false, questionAreaId = false, questionGroupId = false, questionRandomNo = false, QuestionGroupRandomNo = false, questionMarks = false, questionUUID = false, group_question_marks = false, group_question_uuid = false, questionDisplayMarks = false, group_question_Display_Marks = false)
function groupQuestion(question_id = false, section_id = false , group_question_area_id = false, questionTitle = false, questionDescription = false, questionType = false, questionSubType = false, mathEnabled = false, Choice = false, questionAreaId = false, questionRandomNo = false, questionMarks = false, questionUUID = false, questionDisplayMarks = false)
{
-
const ChoiceGroupFixed_UUID = uuidv4();
var groupQuestion = "";
@@ -1526,8 +1528,9 @@ function groupQuestion(question_id = false, section_id = false , group_question_
+
+
-
@@ -1599,7 +1602,6 @@ function groupQuestion(question_id = false, section_id = false , group_question_
${Choice ? Choice[0].choice_name : ""}
-
MATH
@@ -1978,8 +1980,8 @@ function addNewChoice(NewaddChoiceAreaId = false , choiceName = false, questionR
${choiceName ? choiceName : ""}
-
- MATH
+ MATH
+
`
@@ -2182,8 +2184,9 @@ textQuestion +=
+
+
-
@@ -2444,6 +2447,86 @@ var inputElement = document.getElementById(Textid);
}
+//function for Questions REORDER in the SECTION Level
+function ReArrangeQuestions(e){
+
+ var currentID= e.target.parentElement.parentElement.parentElement.id;
+ console.log(currentID)
+ var currentItemID = document.getElementById(currentID);
+ console.log('currentItemID');
+ console.log(currentItemID);
+
+ if (e.target.classList.contains('up-icon')) {
+
+ console.log('FORWORD');
+ const question_ListItem = e.target.parentElement.parentElement;
+ console.log('question_ListItem');
+ console.log(question_ListItem);
+
+ const question_PrevItem = question_ListItem.previousElementSibling;
+ console.log('question_PrevItem');
+ console.log(question_PrevItem );
+
+ if (question_PrevItem !== null) {
+ currentItemID.insertBefore(question_ListItem, question_PrevItem);
+ }
+ } else if (e.target.classList.contains('down-icon')) {
+
+ console.log('BACKWORD');
+ const question_ListItem = e.target.parentElement.parentElement;
+ console.log('question_ListItem');
+ console.log(question_ListItem);
+
+ const question_nextItem = question_ListItem.nextElementSibling;
+ console.log('question_nextItem');
+ console.log(question_nextItem );
+
+ if (question_nextItem) {
+ currentItemID.insertBefore(question_nextItem, question_ListItem);
+ }
+ }
+}
+
+//function for REORDER the Question Group in the SECTION Level
+function ReArrangeQuestionsGroup(e){
+
+ var currentID= e.target.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.id;
+ console.log(currentID)
+ var currentItemID = document.getElementById(currentID);
+ console.log('currentItemID');
+ console.log(currentItemID);
+
+ if (e.target.classList.contains('up-icon')) {
+
+ console.log('FORWORD');
+ const question_ListItem = e.target.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
+ console.log('question_ListItem');
+ console.log(question_ListItem);
+
+ const question_PrevItem = question_ListItem.previousElementSibling;
+ console.log('question_PrevItem');
+ console.log(question_PrevItem );
+
+ if (question_PrevItem !== null) {
+ currentItemID.insertBefore(question_ListItem, question_PrevItem);
+ }
+ } else if (e.target.classList.contains('down-icon')) {
+
+ console.log('BACKWORD');
+ const question_ListItem = e.target.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
+ console.log('question_ListItem');
+ console.log(question_ListItem);
+
+ const question_nextItem = question_ListItem.nextElementSibling;
+ console.log('question_nextItem');
+ console.log(question_nextItem );
+
+ if (question_nextItem) {
+ currentItemID.insertBefore(question_nextItem, question_ListItem);
+ }
+ }
+}
+
//Function for Add Group Question inside the Group QUestion Like Question
function MultiLevelQuestionGroup(e)
{
@@ -2533,6 +2616,7 @@ function cloneQuestion(e,type)
// remove the cloned text type questions function
function removeClonedTextQuestion(index)
{
+ alert('hi text');
var element = document.getElementById('removeAndCloneTextQuestion_'+ index);
if (element) {
element.remove();
@@ -2542,6 +2626,8 @@ function removeClonedTextQuestion(index)
// remove the cloned choice or group type questions function
function removeClonedQroupQuestion(index)
{
+ alert('hi choice');
+
var element = document.getElementById('removeAndCloneQroupQuestion_'+ index);
if (element) {
element.remove();
diff --git a/mark_calc.js b/mark_calc.js
index 002d27c..c0ef262 100644
--- a/mark_calc.js
+++ b/mark_calc.js
@@ -95,7 +95,10 @@ function generateSingleQuestions(ParentObjects)
var parentMarks = ParentObjects.parentMarks;
var parentAttemptAny = ParentObjects.parentAttemptAny;
- var MarkDivideValue = parentMarks / parentAttemptAny;
+ var DivideValue = parentMarks / parentAttemptAny;
+ const twoDigitsAfterDecimal = DivideValue.toFixed(2);
+ var MarkDivideValue = parseFloat(twoDigitsAfterDecimal);
+ // console.log(MarkDivideValue)
// console.log('parentMarks : ', parentMarks);
// console.log('new_parentAttemptAny : ', parentAttemptAny);
diff --git a/nav_pane.js b/nav_pane.js
index d57d05b..8c6cfd2 100644
--- a/nav_pane.js
+++ b/nav_pane.js
@@ -6,7 +6,7 @@ function navpane() {
let currentlyHighlightedElement = null; // Track the currently highlighted element
// console.log('navpane called');
var jsonData = JSON.parse(localStorage.getItem('JSON_FOR_NAV'));
- console.log(jsonData);
+ // console.log(jsonData);
// var arr = JSON.parse( localStorage.getItem('memoriesdata') );
// var jsonData2 = JSON.parse(jsonData);
// console.log(typeof jsonData);
@@ -38,7 +38,7 @@ function navpane() {
var splitedSectionId = sectionId.split("_")[3];
var SectionBox_RawID = 'SectionBox_'+splitedSectionId;
var SectionBoxID = document.getElementById(SectionBox_RawID)
- console.log(SectionBoxID);
+ // console.log(SectionBoxID);
// Check if the section should be initially expanded based on expandedSections
@@ -146,7 +146,7 @@ function navpane() {
// nodeDiv.id = nodeData.textQuestion_Id || nodeData.choice_question_id;
const nodeDataId = nodeData.question_Id
const nodeDataType = nodeData.question_type
- console.log('nodeDataType:',nodeDataType);
+ // console.log('nodeDataType:',nodeDataType);
@@ -189,7 +189,7 @@ function navpane() {
}
var QuestionID = document.getElementById(RawID)
- console.log(QuestionID)
+ // console.log(QuestionID)
const questionLink = document.createElement('a');
questionLink.href = '#' + nodeDataId;
@@ -219,6 +219,7 @@ function navpane() {
questionLink.style.fontWeight = questionLink.style.fontWeight === 'bold' ? 'normal' : 'bold';
} else {
questionLink.style.fontWeight = 'bold';
+ QuestionID.style.fontWeight = 'normal';
currentlyHighlightedElement = questionLink;
}
});
@@ -248,12 +249,12 @@ function navpane() {
groupTitleDiv.setAttribute('data-id', groupTitleId);
groupTitleDiv.className = 'question-group';
- console.log(groupTitleId);
+ // console.log(groupTitleId);
var splitedGroupId = groupTitleId.split("_")[3];
var SplitedGroupRawID = 'QuestionGroupButtons_'+splitedGroupId;
var GroupBoxID = document.getElementById(SplitedGroupRawID);
- console.log(GroupBoxID);
+ // console.log(GroupBoxID);
// Check if the group should be initially expanded based on expandedSections
@@ -332,6 +333,7 @@ function navpane() {
groupQuestionLink.style.fontWeight = groupQuestionLink.style.fontWeight === 'bold' ? 'normal' : 'bold';
} else {
groupQuestionLink.style.fontWeight = 'bold';
+ GroupBoxID.style.fontWeight = 'normal';
currentlyHighlightedElement = groupQuestionLink;
}
});
diff --git a/savexml.js b/savexml.js
index d1a2b2a..710c54c 100644
--- a/savexml.js
+++ b/savexml.js
@@ -59,7 +59,7 @@ function saveXmlToFile(xmlData, filePath) {
});
localStorage.clear();
- window.location.href = 'dashboard.html';
+ window.location.href = 'dashboard.html';
}
diff --git a/style.css b/style.css
index ae3d022..0ecc7ec 100644
--- a/style.css
+++ b/style.css
@@ -3557,10 +3557,13 @@ input:disabled {
.math{
font-weight: 500;
+ font-size: 14px;
}
.mathQuestions{
font-weight: 500;
float: right;
+ font-size: 14px;
+
}