Файловый менеджер - Редактировать - /home/hrpsychology/public_html/soulfood.gr/psychology.soulfood.gr/tests710/diekdikisi/scripts.js
Назад
var totalQs = document.querySelectorAll(".quiz-question").length; //this counts how many questions are on the test var Quest = new Array(totalQs); //this sets up an array for all of the answers that are given function populate() { // alert("function populate started"); // this function gives each of the answers 0 points so if someone doesn't answer a question // the whole thing will continue to work for (var i = 0; i < totalQs; i++) { Quest[i] = 0; } } function total() { // alert("function total started"); // this function adds the number of points each answer is worth together myScore = 0; for (var i = 0; i < totalQs; i++) { myScore = myScore + Quest[i]; } analyzer(myScore); } // these are the the estimations based on score for the test Outcome = new Array(); Outcome[0] = "Έχεις δυσκολία στο να διεκδικείς. Χρησιμοποίησε τις συμβουλές στην παρούσα ενότητα, κάνε εξάσκηση σε νέες συμπεριφορές, ζήτησε την υποστήριξη και τη γνώμη των άλλων και δώσε χρόνο στον εαυτό σου να εξελιχθεί. Μπορείς να νιώσεις πιο άνετα σε περιστάσεις όπου η διεκδικητική συμπεριφορά είναι σημαντική."; Outcome[1] = "Μπορεί να είσαι διεκδικητικός σε κάποιες περιστάσεις αλλά η συνήθης αντίδρασή σου είναι μη διεκδικητική ή επιθετική. Ίσως θα ήθελες να δουλέψεις πάνω στο να αλλάξει κάποιες συμπεριφορές και να μάθεις ή να εξασκηθείς σε νέες διεκδικητικές (συμπεριφορές)."; Outcome[2] = "Είσαι αρκετά διεκδικητικός. Θα μπορούσες να εξασκηθείς στο να είσαι πιο σταθερός στη διεκδικητική σου συμπεριφορά." Outcome[3] = "Διεκδικείς τις περισσότερες φορές και διαχειρίζεσαι τις καταστάσεις πολύ καλά. Θα μπορούσες να επωφεληθείς από μερικές νέες ιδέες ώστε να βελτιώσεις τις δεξιότητές σου και την αποτελεσματικότητά σου." function analyzer(myScore) { // this function uses the total calculated score to figure out which personality type they are if (myScore > 50) { OutcomePtr = 3; } // Outcome [3] else { if (myScore > 40) { OutcomePtr = 2; } //Outcome [2] else { if (myScore > 25) { OutcomePtr = 1; } //Outcome [1] else { OutcomePtr = 0; } //Outcome[0] } } myDisplay(Outcome[OutcomePtr]) } function myDisplay(Outcome) { //This function will open a new window and show the results calculated // alert(Outcome); **use alert for testing only**. document.getElementById("result").innerHTML = (Outcome); } function saver(q, points) { // this function puts the points that each answer is worth into the array q = q - 1; Quest[q] = points }
| ver. 1.4 |
Github
|
.
| PHP 8.2.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка