From 3ebb3347818d8838218198f612afecf2c91f53b2 Mon Sep 17 00:00:00 2001 From: balammaboya Date: Wed, 31 Mar 2021 12:17:17 +0530 Subject: [PATCH 1/4] added pre and post test jsons --- experiment/posttest.json | 1 + experiment/pretest.json | 1 + 2 files changed, 2 insertions(+) create mode 100644 experiment/posttest.json create mode 100644 experiment/pretest.json diff --git a/experiment/posttest.json b/experiment/posttest.json new file mode 100644 index 0000000..2c7e936 --- /dev/null +++ b/experiment/posttest.json @@ -0,0 +1 @@ +[{"question":"A component which will compare the process parameter based on multiple sensors installed and pass Highest amongst all, to the regulatory device","answers":{"a":"High Selector","b":"Low Selector","c":"Rate Limiter","d":"None of these"},"correctAnswer":"a"},{"question":"A component which will compare the process parameter based on multiple sensors installed and pass Lowest amongst all, to the regulatory device","answers":{"a":"Low Selector","b":"High Selector","c":"Rate Limiter","d":"None of these"},"correctAnswer":"a"},{"question":"Number of inputs to high selector are","answers":{"a":"Two or many","b":"One","c":"Either a or b","d":"Both a and b"},"correctAnswer":"a"},{"question":"Power supply used is","answers":{"a":"5 VDC","b":"10 VDC","c":"24 VDC","d":"12 VDC"},"correctAnswer":"c"},{"question":"Limiter will have the inputs","answers":{"a":"One","b":"Two","c":"Three","d":"Four"},"correctAnswer":"b"}] diff --git a/experiment/pretest.json b/experiment/pretest.json new file mode 100644 index 0000000..0f89b9a --- /dev/null +++ b/experiment/pretest.json @@ -0,0 +1 @@ +[{"question":"What is SIS? ","answers":{"a":"Safety informative system","b":"Stable indicative system","c":"Stable instrumented system","d":"Safety instrumented system"},"correctAnswer":"d"},{"question":"What are the types of safety aspect in any plant","answers":{"a":"Interlock","b":"All of these","c":"Regulatory control","d":"Safety instrumented system"},"correctAnswer":"b"},{"question":"Which component used to select the required parameter level based on the application demand and pass the value to regulatory controller","answers":{"a":"Limiter","b":"Accumulator","c":"Controller","d":"Selector"},"correctAnswer":"d"},{"question":"Which component used to select the required parameter level based on the application demand and limit the value to regulatory controller?","answers":{"a":"Selector","b":"Limiter","c":"Accumulator","d":"controller"},"correctAnswer":"b"},{"question":"What is rate limiter","answers":{"a":"A component which will not allow the process parameter to cross a set limit","b":"A component which will allow the process parameter to cross a set limit","c":"None of these","d":"The rate at which process variable is changing needs to be monitored and controlled"},"correctAnswer":"d"}] From 865b5d1b51a7b32f51401e59448bdad008038d48 Mon Sep 17 00:00:00 2001 From: Pavan <24794698+pavanchow@users.noreply.github.com> Date: Wed, 31 Mar 2021 17:01:07 +0530 Subject: [PATCH 2/4] Update deployment-script.yml --- .github/workflows/deployment-script.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deployment-script.yml b/.github/workflows/deployment-script.yml index faf36c0..f224ba5 100644 --- a/.github/workflows/deployment-script.yml +++ b/.github/workflows/deployment-script.yml @@ -12,12 +12,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - # The following job will pull phase3 lab management scipt and build the experiment + - name: Setup node + uses: actions/setup-node@v2 + with: + node-version: '12' + check-latest: true - run: | - git clone -b pipeline https://github.com/virtual-labs/ph3-lab-mgmt - cd ph3-lab-mgmt/ph3-beta-to-ui3.0-conv - make host-experiments - cd ../../ + git clone https://github.com/virtual-labs/ph3-lab-mgmt + cd ph3-lab-mgmt + npm install + node exp.js + cd ../ git config --local user.email "admin@vlabs.ac.in" git config --local user.name "vleadadmin" git checkout --orphan gh-pages From d428698226f03171a801802fa7613cb5fa4a5d56 Mon Sep 17 00:00:00 2001 From: Pavan <24794698+pavanchow@users.noreply.github.com> Date: Wed, 31 Mar 2021 17:01:15 +0530 Subject: [PATCH 3/4] Create deployment-script.yml From 07c6424f0898606947a57f1a1c4f2f18d173cf0d Mon Sep 17 00:00:00 2001 From: balammaboya Date: Thu, 1 Apr 2021 10:02:49 +0530 Subject: [PATCH 4/4] removed pre and post test .js format --- experiment/posttest.js | 197 ----------------------------------------- experiment/pretest.js | 197 ----------------------------------------- 2 files changed, 394 deletions(-) delete mode 100644 experiment/posttest.js delete mode 100644 experiment/pretest.js diff --git a/experiment/posttest.js b/experiment/posttest.js deleted file mode 100644 index b5f9e75..0000000 --- a/experiment/posttest.js +++ /dev/null @@ -1,197 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// - -/////////////////////// Do not modify the below code //////////////////////// - -///////////////////////////////////////////////////////////////////////////// - -(function() { - function buildQuiz() { - // we'll need a place to store the HTML output - const output = []; - - // for each question... - myQuestions.forEach((currentQuestion, questionNumber) => { - // we'll want to store the list of answer choices - const answers = []; - - // and for each available answer... - for (letter in currentQuestion.answers) { - // ...add an HTML radio button - answers.push( - `` - ); - } - - // add this question and its answers to the output - output.push( - `
${currentQuestion.question}
-
${answers.join("")}
` - ); - }); - - // finally combine our output list into one string of HTML and put it on the page - quizContainer.innerHTML = output.join(""); - } - - function showResults() { - // gather answer containers from our quiz - const answerContainers = quizContainer.querySelectorAll(".answers"); - - // keep track of user's answers - let numCorrect = 0; - - // for each question... - myQuestions.forEach((currentQuestion, questionNumber) => { - // find selected answer - const answerContainer = answerContainers[questionNumber]; - const selector = `input[name=question${questionNumber}]:checked`; - const userAnswer = (answerContainer.querySelector(selector) || {}).value; - - // if answer is correct - if (userAnswer === currentQuestion.correctAnswer) { - // add to the number of correct answers - numCorrect++; - - // color the answers green - //answerContainers[questionNumber].style.color = "lightgreen"; - } else { - // if answer is wrong or blank - // color the answers red - answerContainers[questionNumber].style.color = "red"; - } - }); - - // show number of correct answers out of total - resultsContainer.innerHTML = `${numCorrect} out of ${myQuestions.length}`; - } - - const quizContainer = document.getElementById("quiz"); - const resultsContainer = document.getElementById("results"); - const submitButton = document.getElementById("submit"); - - -///////////////////////////////////////////////////////////////////////////// - -/////////////////////// Do not modify the above code //////////////////////// - -///////////////////////////////////////////////////////////////////////////// - - - - - - -/////////////// Write the MCQ below in the exactly same described format /////////////// - - - const myQuestions = [ - { - question: "A component which will compare the process parameter based on multiple sensors installed and pass Highest amongst all, to the regulatory device", ///// Write the question inside double quotes - answers: { - a: "High Selector", ///// Write the option 1 inside double quotes - b: "Low Selector", ///// Write the option 2 inside double quotes - c: "Rate Limiter", ///// Write the option 3 inside double quotes - d: "None of these" ///// Write the option 4 inside double quotes - }, - correctAnswer: "a" ///// Write the correct option inside double quotes - }, - - { - question: "A component which will compare the process parameter based on multiple sensors installed and pass Lowest amongst all, to the regulatory device", ///// Write the question inside double quotes - answers: { - a: "Low Selector", ///// Write the option 1 inside double quotes - b: "High Selector", ///// Write the option 2 inside double quotes - c: "Rate Limiter", ///// Write the option 3 inside double quotes - d: "None of these" ///// Write the option 4 inside double quotes - }, - correctAnswer: "a" ///// Write the correct option inside double quotes - }, ///// To add more questions, copy the section below - ///// this line - { - question: "Number of inputs to high selector are", - answers: { - a: "Two or many", - b: "One", - c: "Either a or b", - d: "Both a and b" - }, - correctAnswer: "a" - }, - - { - question: "Power supply used is", - answers: { - a: "5 VDC", - b: "10 VDC", - c: "24 VDC", - d: "12 VDC" - }, - correctAnswer: "c" - }, - - { - question: "Limiter will have the inputs", - answers: { - a: "One", - b: "Two", - c: "Three", - d: "Four" - }, - correctAnswer: "b" - }, - - /* To add more MCQ's, copy the below section, starting from open curly braces ( { ) - till closing curly braces comma ( }, ) - - and paste it below the curly braces comma ( below correct answer }, ) of above - question - - Copy below section - - { - question: "This is question n?", - answers: { - a: "Option 1", - b: "Option 2", - c: "Option 3", - d: "Option 4" - }, - correctAnswer: "c" - }, - - Copy above section - - */ - - - - - ]; - - - - -///////////////////////////////////////////////////////////////////////////// - -/////////////////////// Do not modify the below code //////////////////////// - -///////////////////////////////////////////////////////////////////////////// - - - // display quiz right away - buildQuiz(); - - // on submit, show results - submitButton.addEventListener("click", showResults); -})(); - - -///////////////////////////////////////////////////////////////////////////// - -/////////////////////// Do not modify the above code //////////////////////// - -///////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/experiment/pretest.js b/experiment/pretest.js deleted file mode 100644 index e0f4280..0000000 --- a/experiment/pretest.js +++ /dev/null @@ -1,197 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// - -/////////////////////// Do not modify the below code //////////////////////// - -///////////////////////////////////////////////////////////////////////////// - -(function() { - function buildQuiz() { - // we'll need a place to store the HTML output - const output = []; - - // for each question... - myQuestions.forEach((currentQuestion, questionNumber) => { - // we'll want to store the list of answer choices - const answers = []; - - // and for each available answer... - for (letter in currentQuestion.answers) { - // ...add an HTML radio button - answers.push( - `` - ); - } - - // add this question and its answers to the output - output.push( - `
${currentQuestion.question}
-
${answers.join("")}
` - ); - }); - - // finally combine our output list into one string of HTML and put it on the page - quizContainer.innerHTML = output.join(""); - } - - function showResults() { - // gather answer containers from our quiz - const answerContainers = quizContainer.querySelectorAll(".answers"); - - // keep track of user's answers - let numCorrect = 0; - - // for each question... - myQuestions.forEach((currentQuestion, questionNumber) => { - // find selected answer - const answerContainer = answerContainers[questionNumber]; - const selector = `input[name=question${questionNumber}]:checked`; - const userAnswer = (answerContainer.querySelector(selector) || {}).value; - - // if answer is correct - if (userAnswer === currentQuestion.correctAnswer) { - // add to the number of correct answers - numCorrect++; - - // color the answers green - //answerContainers[questionNumber].style.color = "lightgreen"; - } else { - // if answer is wrong or blank - // color the answers red - answerContainers[questionNumber].style.color = "red"; - } - }); - - // show number of correct answers out of total - resultsContainer.innerHTML = `${numCorrect} out of ${myQuestions.length}`; - } - - const quizContainer = document.getElementById("quiz"); - const resultsContainer = document.getElementById("results"); - const submitButton = document.getElementById("submit"); - - -///////////////////////////////////////////////////////////////////////////// - -/////////////////////// Do not modify the above code //////////////////////// - -///////////////////////////////////////////////////////////////////////////// - - - - - - -/////////////// Write the MCQ below in the exactly same described format /////////////// - - - const myQuestions = [ - { - question: "What is SIS? ", ///// Write the question inside double quotes - answers: { - a: "Safety informative system", ///// Write the option 1 inside double quotes - b: "Stable indicative system", ///// Write the option 2 inside double quotes - c: "Stable instrumented system", ///// Write the option 3 inside double quotes - d: "Safety instrumented system" ///// Write the option 4 inside double quotes - }, - correctAnswer: "d" ///// Write the correct option inside double quotes - }, - - { - question: "What are the types of safety aspect in any plant", ///// Write the question inside double quotes - answers: { - a: "Interlock", ///// Write the option 1 inside double quotes - b: "All of these", ///// Write the option 2 inside double quotes - c: "Regulatory control", ///// Write the option 3 inside double quotes - d: "Safety instrumented system" ///// Write the option 4 inside double quotes - }, - correctAnswer: "b" ///// Write the correct option inside double quotes - }, ///// To add more questions, copy the section below - ///// this line - { - question: "Which component used to select the required parameter level based on the application demand and pass the value to regulatory controller", - answers: { - a: "Limiter", - b: "Accumulator", - c: "Controller", - d: "Selector" - }, - correctAnswer: "d" - }, - - { - question: "Which component used to select the required parameter level based on the application demand and limit the value to regulatory controller?", - answers: { - a: "Selector", - b: "Limiter", - c: "Accumulator", - d: "controller" - }, - correctAnswer: "b" - }, - - { - question: "What is rate limiter", - answers: { - a: "A component which will not allow the process parameter to cross a set limit", - b: "A component which will allow the process parameter to cross a set limit", - c: "None of these", - d: "The rate at which process variable is changing needs to be monitored and controlled" - }, - correctAnswer: "d" - }, - - /* To add more MCQ's, copy the below section, starting from open curly braces ( { ) - till closing curly braces comma ( }, ) - - and paste it below the curly braces comma ( below correct answer }, ) of above - question - - Copy below section - - { - question: "This is question n?", - answers: { - a: "Option 1", - b: "Option 2", - c: "Option 3", - d: "Option 4" - }, - correctAnswer: "c" - }, - - Copy above section - - */ - - - - - ]; - - - - -///////////////////////////////////////////////////////////////////////////// - -/////////////////////// Do not modify the below code //////////////////////// - -///////////////////////////////////////////////////////////////////////////// - - - // display quiz right away - buildQuiz(); - - // on submit, show results - submitButton.addEventListener("click", showResults); -})(); - - -///////////////////////////////////////////////////////////////////////////// - -/////////////////////// Do not modify the above code //////////////////////// - -///////////////////////////////////////////////////////////////////////////// \ No newline at end of file