students:value-calculator-quiz

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
students:value-calculator-quiz [2024/01/26 02:35] – old revision restored (2024/01/26 00:12) steve.wangstudents:value-calculator-quiz [2024/01/27 01:42] (current) steve.wang
Line 28: Line 28:
 #tBox{ #tBox{
     width: 99.5%;     width: 99.5%;
 +    height: 30%;
     font-size: 600%;     font-size: 600%;
   color: white;   color: white;
Line 208: Line 209:
   <div class="grid-item">1</div>   <div class="grid-item">1</div>
   <div class="grid-item">2</div>   <div class="grid-item">2</div>
-  <div class="grid-item">3</div>  +  <div class="grid-item">3</div>
   <div class="grid-item">4</div>   <div class="grid-item">4</div>
   <div class="grid-item">5</div>   <div class="grid-item">5</div>
-  <div class="grid-item">6</div>  +  <div class="grid-item">6</div>
   <div class="grid-item">7</div>   <div class="grid-item">7</div>
   <div class="grid-item">8</div>   <div class="grid-item">8</div>
-  <div class="grid-item">9</div>   +  <div class="grid-item">9</div> 
-  <div class="grid-item">    </div>   +  <div class="grid-item">    </div> 
-  <div id='deleteText'class="grid-item"><--</div>   +  <div id='deleteText'class="grid-item"><--</div> 
-  <div class="grid-item" id='nextQButton'>Finish </div>  +  <div class="grid-item" id='nextQButton'>Finish </div>
 </div> </div>
 <!-- Number pad from w3 schools : https://www.w3schools.com/css/tryit.asp?filename=trycss_grid --> <!-- Number pad from w3 schools : https://www.w3schools.com/css/tryit.asp?filename=trycss_grid -->
 <!-- https://www.w3schools.com/css/css_grid.asp --> <!-- https://www.w3schools.com/css/css_grid.asp -->
         <script>         <script>
-        // --------------------------------------------------------------------------+            // --------------------------------------------------------------------------
 // -- value-calculator.js // -- value-calculator.js
 // -------------------------------------------------------------------------- // --------------------------------------------------------------------------
-// Code made using Github Copilot and Google Bard +// Code made using Github Copilot and Google Bard
 // Translation helped by Google Translate // Translation helped by Google Translate
  
Line 367: Line 368:
     return currentQ.join(' ')     return currentQ.join(' ')
 } }
-    +
 function changeInstructions(type){ function changeInstructions(type){
     if (language === 'English' && type === 'list'){     if (language === 'English' && type === 'list'){
Line 747: Line 748:
 // //Each answer is based on 0 to 5 except P is 0 - 5, // //Each answer is based on 0 to 5 except P is 0 - 5,
  
-//A function that creates a ruler like thing that shows the value of the person. +//A function that creates a ruler like thing that shows the value of the person.
 function showResults () { function showResults () {
     let results = document.getElementById('results')     let results = document.getElementById('results')
Line 1003: Line 1004:
 } }
 //Idea for using & character for passing information inspired by bardAI //Idea for using & character for passing information inspired by bardAI
- 
  
 function createLinkWithData (link){ function createLinkWithData (link){
     let outputLink = link     let outputLink = link
     answers.forEach(x => {     answers.forEach(x => {
-        outputLink += '&' + x.name + '&' + x.score+        outputLink += '&' + x.name.replace(/ /g, "-"+ '&' + x.score
     })     })
 //     return link + '&'  + answers[0].name + '&' + answers[0].score + '&' + answers[1].name + '&' + answers[1].score //     return link + '&'  + answers[0].name + '&' + answers[0].score + '&' + answers[1].name + '&' + answers[1].score
Line 1042: Line 1042:
     }     }
 } }
- 
  
 window.addEventListener('load', function() { window.addEventListener('load', function() {
     if (mode === 'doku'){     if (mode === 'doku'){
-        configureStylingForDokuWiki()+        let copy = document.getElementsByClassName('dw-content')[0] 
 +        let navbar = document.getElementsByClassName("navbar-brand d-flex align-items-center" )[0] 
 +        let newBody = document.createElement('body'
 +        newBody.appendChild(copy) 
 +        newBody.appendChild(navbar) 
 +        document.body.remove() 
 +        document.documentElement.appendChild(newBody) 
 +        copy.style.top = '20%' 
 +        document.documentElement.style.boxSizing = 'none' 
 +        document.body.style.marginTop = '0px' 
 +//         configureStylingForDokuWiki()
         checkReferrer()         checkReferrer()
     }     }
Line 1062: Line 1071:
     </body>     </body>
 </html> </html>
 +
  
  
  
  • students/value-calculator-quiz.1706265311.txt.gz
  • Last modified: 2024/01/26 02:35
  • by steve.wang