From b3f5b94aab3d73cbfa875979b0779af0fb3f6c36 Mon Sep 17 00:00:00 2001 From: Ayoola Bimpe C Date: Mon, 16 May 2022 09:32:28 -0300 Subject: [PATCH] Fixed Supplementary Materials testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. testing.. updated supplementary materials --- docs/CaseStudy.md | 17 +++++++---- form_generator/js/read_standards.js | 46 ++++++++++++++++++++++------- tab_03_standards.md | 2 +- 3 files changed, 47 insertions(+), 18 deletions(-) diff --git a/docs/CaseStudy.md b/docs/CaseStudy.md index 81697fb..4898d19 100644 --- a/docs/CaseStudy.md +++ b/docs/CaseStudy.md @@ -48,6 +48,14 @@ captures a large quantitative dataset with limited context, consider the - [ ] reports the type of case study[1](#myfootnote1) - [ ] describes data sources (e.g. participants' demographics and work roles) - [ ] defines unit(s) of analysis or observation +- [ ] coding scheme (required) +- [ ] coding examples (required) +- [ ] extended chain-of-evidence table(s) (required) + + + + + @@ -60,16 +68,13 @@ captures a large quantitative dataset with limited context, consider the -### Supplementary Material - -- [ ] provides supplemental materials such as interview guide(s), coding schemes, coding examples, decision rules, or extended chain-of-evidence tables -- [ ] triangulates across data sources, informants or researchers - - + ### Desirable Attributes - [ ] provides supplemental materials such as interview guide(s), coding schemes, coding examples, decision rules, or extended chain-of-evidence tables +- [ ] interview guide(s) (optional) +- [ ] decision rules (optional) - [ ] triangulates across data sources, informants or researchers - [ ] cross-checks interviewee statements (e.g. against direct observation or archival records) - [ ] uses participant observation (ethnography) or direct observation (non-ethnography) and clearly integrates these observations into results[2](#myfootnote2) diff --git a/form_generator/js/read_standards.js b/form_generator/js/read_standards.js index 8cecfa8..0c3eaf1 100644 --- a/form_generator/js/read_standards.js +++ b/form_generator/js/read_standards.js @@ -144,6 +144,7 @@ function generate_decision_message_block() { } else if (justification_type2_checked_count > 0) { msg = "GATEKEEP"; document.getElementById("deviation_reasonable").style.display = "block"; + document.getElementById("Supplementary Materials").style.display = "block"; document.getElementById("Desirable").style.display = "block"; document.getElementById("Extraordinary").style.display = "block"; @@ -151,11 +152,13 @@ function generate_decision_message_block() { } else if (justification_type1_checked_count > 0) { msg = "ACCEPT"; document.getElementById("deviation_reasonable").style.display = "block"; + document.getElementById("Supplementary Materials").style.display = "block"; document.getElementById("Desirable").style.display = "block"; document.getElementById("Extraordinary").style.display = "block"; } else { msg = "ACCEPT"; + document.getElementById("Supplementary Materials").style.display = "block"; document.getElementById("Desirable").style.display = "block"; document.getElementById("Extraordinary").style.display = "block"; @@ -679,8 +682,9 @@ function generate_two_phase_reviewer_deviation_block(checklistItem_id) { return deviation_block; } + // convert from Markdown to HTML checklists -function convert_MD_standard_checklists_to_html_standard_checklists(standardName, checklistName, checklistText, footnotes){ +function convert_MD_standard_checklists_to_html_standard_checklists(standardName, checklistName, checklistText, footnotes,supCheckList){ // ??????? tester = getParameterByName('y')[0] == 'noval' ? true : false; @@ -735,13 +739,19 @@ function convert_MD_standard_checklists_to_html_standard_checklists(standardName // !!!!!!!!!!!!!!!! we dont need this part in the checklist if(line_text.includes("complies with all applicable empirical standards")) continue; - + // if line_text includes a specific regex set to true ( line break with horizontal rule) IMRaD_line_break = line_text.includes('_hr_') ? true : false; // Replace line break and horizontal rule with empty string line_text = line_text.replace(/(_hr_)+/g, ''); + //comment later + if(line_text.includes("{supplement}") && checklistName !== "Supplementary") { + supCheckList.items += "- [ ]" + line_text; + continue; + } + // Change the text to the string held in line_text checklistItemLI.setAttribute("text", line_text); @@ -816,6 +826,7 @@ function convert_MD_standard_checklists_to_html_standard_checklists(standardName checklists.appendChild(checklistItemLI); } } + return checklists; } @@ -902,10 +913,10 @@ function create_role_heading(){ } // Prepare unordered lists -function preparation_to_convert_MD_to_HTML(standardTagName, checklistTagName, checklistInnerHTML, footnotes){ +function preparation_to_convert_MD_to_HTML(standardTagName, checklistTagName, checklistInnerHTML, footnotes,supCheckList){ // superscript tags - checklistInnerHTML = checklistInnerHTML.replaceAll("", "{sup}").replaceAll("", "{/sup}"); + checklistInnerHTML = checklistInnerHTML.replaceAll("", "{sup}").replaceAll("", "{/sup}").replaceAll("", "{supplement}"); var tempDivElement = document.createElement("div"); tempDivElement.innerHTML = checklistInnerHTML; @@ -922,8 +933,9 @@ function preparation_to_convert_MD_to_HTML(standardTagName, checklistTagName, ch // Supplement Files - Change from docs to link, change from .md file to nothing checklistText = checklistText.replaceAll('https://github.com/acmsigsoft/EmpiricalStandards/blob/master/Supplements/', '../Supplements?supplement=').replaceAll('.md', ''); + // Convert Markdown Checklists to HTML checklists - checklists = convert_MD_standard_checklists_to_html_standard_checklists(standardTagName, checklistTagName, checklistText, footnotes) + checklists = convert_MD_standard_checklists_to_html_standard_checklists(standardTagName, checklistTagName, checklistText, footnotes,supCheckList) return checklists; } @@ -986,6 +998,8 @@ function create_requirements_checklist(){ form.id = "checklists"; form.name = "checklists"; + var supCheckList = {items:""}; + // create Header for Essential Requirements with an unordered list var EssentialUL = create_requirements_heading_with_UL("Essential"); @@ -1001,13 +1015,13 @@ function create_requirements_checklist(){ // hide desirable and extraordinary list of requirements for One Phase Reviewer if(role == "\"one-phase-reviewer\""){ DesirableUL.style = "padding: 0px; display:none;"; - SupplementaryUL.style = "padding: 0px; display:none;"; + SupplementaryUL.style = "padding: 0px; display:block;"; ExtraordinaryUL.style = "padding: 0px; display:none;"; } // hide desirable and extraordinary list of requirements for Two Phase Reviewer else if(role == "\"two-phase-reviewer\""){ DesirableUL.style = "padding: 0px; display:none;"; - SupplementaryUL.style = "padding: 0px; display:none;"; + SupplementaryUL.style = "padding: 0px; display:block;"; ExtraordinaryUL.style = "padding: 0px; display:none;"; } @@ -1065,18 +1079,20 @@ function create_requirements_checklist(){ EssentialUL.appendChild(Yes_No); //EssentialUL.appendChild(checklists); } + else if (checklistTag.getAttribute('name') == "Desirable") { //DesirableUL.appendChild(standard_header_rule); // Change from Markdown to HTML elements - checklists = preparation_to_convert_MD_to_HTML(standardTag.getAttribute('name'), checklistTag.getAttribute('name'), checklistHTML, footnotes); + checklists = preparation_to_convert_MD_to_HTML(standardTag.getAttribute('name'), checklistTag.getAttribute('name'), checklistHTML, footnotes,supCheckList); DesirableUL.appendChild(checklists); } + else if (checklistTag.getAttribute('name') == "Extraordinary") { //ExtraordinaryUL.appendChild(standard_header_rule); // Change from Markdown to HTML elements - checklists = preparation_to_convert_MD_to_HTML(standardTag.getAttribute('name'), checklistTag.getAttribute('name'), checklistHTML, footnotes); + checklists = preparation_to_convert_MD_to_HTML(standardTag.getAttribute('name'), checklistTag.getAttribute('name'), checklistHTML, footnotes,supCheckList); ExtraordinaryUL.appendChild(checklists); } } @@ -1089,15 +1105,22 @@ function create_requirements_checklist(){ notify_testers(); // Change from Markdown to HTML elements - checklists = preparation_to_convert_MD_to_HTML("", 'Essential', all_essential_IMRaD_items_innerHTML, footnotes); + checklists = preparation_to_convert_MD_to_HTML("", 'Essential', all_essential_IMRaD_items_innerHTML, footnotes,supCheckList); EssentialUL.appendChild(checklists); - + + checklists = preparation_to_convert_MD_to_HTML(standardTag.getAttribute('name'), "Supplementary", supCheckList.items.replaceAll("{supplement}", ""), footnotes,supCheckList); + SupplementaryUL.appendChild(checklists); + + // Add Essential Attributes to the form form.appendChild(EssentialUL); // Create download button var download = create_download_button(); + //append supplementary material list + form.appendChild(SupplementaryUL); + // (All 'Yes' -> accept manuscript) var decision_msg = generate_message("decision_msg", "red", (role != "\"author\"" ? "The manuscript meets all essential criteria: ACCEPT." : ""), 2, 0); form.appendChild(decision_msg); @@ -1131,6 +1154,7 @@ function create_requirements_checklist(){ } // Add Desirable and Extraordinary Unordered List to Form + form.appendChild(DesirableUL); form.appendChild(ExtraordinaryUL); diff --git a/tab_03_standards.md b/tab_03_standards.md index bb24378..f4be2e3 100644 --- a/tab_03_standards.md +++ b/tab_03_standards.md @@ -105,7 +105,7 @@ function openStandardFromURL(evt) {

{% capture std %}{% include_relative docs/CaseStudy.md %}{% endcapture %} - {{ std | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | replace: '- [ ]', '-' | replace: 'https://github.com/acmsigsoft/EmpiricalStandards/blob/master/docs/', '../docs?standard=' | replace: 'https://github.com/acmsigsoft/EmpiricalStandards/blob/master/Supplements/', '../Supplements?supplement=' | replace: '.md', '' | markdownify }} + {{ std | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | remove: '' | replace: '- [ ]', '-' | replace: 'https://github.com/acmsigsoft/EmpiricalStandards/blob/master/docs/', '../docs?standard=' | replace: 'https://github.com/acmsigsoft/EmpiricalStandards/blob/master/Supplements/', '../Supplements?supplement=' | replace: '.md', '' | markdownify }}