diff --git a/svg/results.svg b/svg/results.svg index eeb47a1..7d52888 100644 --- a/svg/results.svg +++ b/svg/results.svg @@ -8,19 +8,19 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - inkscape:export-ydpi="96" - inkscape:export-xdpi="96" - inkscape:export-filename="/docs/Dslak/vds_quiz/vds-app/App/assets/unsafe.jpg.png" - height="800" - width="800" - inkscape:version="1.0beta1 (unknown)" - sodipodi:docname="results.svg" - xml:space="preserve" - viewBox="0 0 800 800" - y="0px" - x="0px" + version="1.1" id="Ebene_1" - version="1.1"> @@ -44,6 +45,7 @@ + @@ -53,6 +55,7 @@ + @@ -62,6 +65,7 @@ + @@ -71,6 +75,7 @@ + @@ -80,14 +85,16 @@ + + inkscape:collect="always" + id="linearGradient940"> + id="stop936" /> + @@ -95,9 +102,10 @@ + id="stop938" /> + @@ -111,13 +119,15 @@ + + inkscape:collect="always" + id="linearGradient898"> + id="stop894" /> + @@ -125,9 +135,10 @@ + id="stop896" /> + @@ -141,13 +152,15 @@ + + inkscape:collect="always" + id="linearGradient862"> + id="stop858" /> + @@ -157,9 +170,10 @@ + id="stop860" /> + @@ -177,13 +191,15 @@ + + inkscape:collect="always" + id="linearGradient1177"> + id="stop1173" /> + @@ -193,9 +209,10 @@ + id="stop1175" /> + @@ -213,13 +230,15 @@ + + inkscape:collect="always" + id="linearGradient1113"> + id="stop1109" /> + @@ -229,9 +248,10 @@ + id="stop1111" /> + @@ -250,14 +270,16 @@ + + id="SVGID_1_" + x="0" + y="0" /> + @@ -277,16 +299,18 @@ + + xlink:href="#SVGID_1_" + x="0" + y="0" + width="100%" + height="100%" /> + @@ -306,6 +330,7 @@ + @@ -318,15 +343,16 @@ + id="linearGradient1115" + x1="6.22612" + y1="-85.32769" + x2="77.917458" + y2="77.732155" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,158.1)" /> + @@ -336,15 +362,16 @@ + id="linearGradient1179" + x1="132.76462" + y1="122.54591" + x2="122.02882" + y2="19.294325" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4791905,0,0,1.4791905,25.462738,22.270725)" /> + @@ -354,15 +381,16 @@ + id="linearGradient1183" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.83762215,0,0,0.92541661,-275.43157,-172.04418)" + x1="132.76462" + y1="122.54591" + x2="122.02882" + y2="19.294325" /> + @@ -372,15 +400,16 @@ + id="linearGradient1212" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-1.1876812,-0.35290398,0.38989322,-1.3121667,345.47458,152.00026)" + x1="132.76462" + y1="122.54591" + x2="122.02882" + y2="19.294325" /> + @@ -392,14 +421,15 @@ + maskUnits="userSpaceOnUse" + id="mask1236"> + cx="125" + id="circle1238" + style="fill:#ffffff;fill-opacity:1;stroke-width:1.02044" /> + @@ -417,15 +447,17 @@ + + maskUnits="userSpaceOnUse" + id="mask1243"> + cx="125" + id="circle1245" + style="fill:#ffffff;fill-opacity:1;stroke-width:1.02044" /> + @@ -443,15 +475,17 @@ + + id="linearGradient866" + gradientUnits="userSpaceOnUse" + x1="0" + y1="125" + x2="266.32431" + y2="147.05267" /> + @@ -465,15 +499,16 @@ + id="linearGradient900" + x1="311.80994" + y1="-357.87811" + x2="283.17621" + y2="716.57642" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-71.635743,25.813861)" /> + @@ -481,15 +516,16 @@ + id="linearGradient928" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.0427705,0,0,0.62690293,-1088.8324,-991.72226)" + x1="1851.9196" + y1="-447.91309" + x2="-391.84567" + y2="691.98407" /> + @@ -497,15 +533,16 @@ + id="linearGradient942" + x1="649.34778" + y1="-966.22083" + x2="687.32172" + y2="452.36615" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,2.1631993,-67.336207,-293.4148)" /> + @@ -519,13 +556,14 @@ + y="0" + x="0" + xlink:href="#SVGID_1_" + style="overflow:visible" + id="use15-8" /> + @@ -539,16 +577,18 @@ + + y="0" + x="0" + xlink:href="#SVGID_1_" + style="overflow:visible" + id="use958" /> + @@ -580,32 +620,88 @@ + + id="linearGradient942-7" + x1="649.34778" + y1="-966.22083" + x2="687.32172" + y2="452.36615" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.73549165,0,0,0.53473221,-122.70061,-41.695048)" /> + + + + + + x2="283.17621" + y2="716.57642" /> + + + + + - - @@ -627,35 +721,37 @@ + + inkscape:document-rotation="0" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:window-width="1366" + inkscape:window-height="719" + id="namedview43" + showgrid="false" + inkscape:zoom="0.0875" + inkscape:cx="-1207.6372" + inkscape:cy="207.80314" + inkscape:window-x="0" + inkscape:window-y="22" + inkscape:window-maximized="1" + inkscape:current-layer="layer2" + inkscape:snap-global="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + borderlayer="true" + showborder="true" + inkscape:showpageshadow="false" /> + @@ -666,8 +762,8 @@ @@ -681,11 +777,12 @@ + + inkscape:label="root" + transform="translate(318.96439,1070.5177)"> @@ -695,30 +792,33 @@ - - - + x="-1832.6398" + y="-1463.5505" /> + + + + + + width="2982.7158" + height="1613.8571" + x="-4378.9487" + y="-961.82635" /> + @@ -730,12 +830,13 @@ + + inkscape:export-filename="/docs/Dslak/vds_quiz/vds-app/App/assets/logo.png" + id="g1025" + transform="translate(-24.887482)"> @@ -749,68 +850,127 @@ + + inkscape:label="Logo"> + width="1337.6455" + height="606.03857" + x="-210.29063" + y="-308.34857" + ry="0" /> + + transform="matrix(0.63334715,0,0,0.58549327,-46.569578,223.1593)" + id="g938"> + cx="223.79865" + cy="327.19742" + rx="1205.2823" + ry="400.51532" /> + + transform="scale(-1)" + ry="400.51532" + rx="1395.3616" + cy="-447.14417" + cx="-973.08563" /> + + id="ellipse926" + cx="-780.76215" + cy="-802.784" + rx="1069.1677" + ry="251.08421" /> + + cy="21.574158" + cx="1029.0581" + id="ellipse930" + style="fill:url(#linearGradient932);fill-opacity:1;stroke:none" /> + + + + + + + + + + @@ -819,4 +979,5 @@ + diff --git a/vds-app/.expo-shared/assets.json b/vds-app/.expo-shared/assets.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/vds-app/.expo-shared/assets.json @@ -0,0 +1 @@ +{} diff --git a/vds-app/App/assets/bg.jpg b/vds-app/App/assets/bg.jpg index 084c29d..1869caa 100644 Binary files a/vds-app/App/assets/bg.jpg and b/vds-app/App/assets/bg.jpg differ diff --git a/vds-app/App/assets/panorama.jpg b/vds-app/App/assets/panorama.jpg deleted file mode 100644 index fddc737..0000000 Binary files a/vds-app/App/assets/panorama.jpg and /dev/null differ diff --git a/vds-app/App/assets/panorama2.jpg b/vds-app/App/assets/panorama2.jpg deleted file mode 100644 index 6d579ef..0000000 Binary files a/vds-app/App/assets/panorama2.jpg and /dev/null differ diff --git a/vds-app/App/components/ExamQuestions.js b/vds-app/App/components/ExamQuestions.js index d7d04a9..4068f2e 100644 --- a/vds-app/App/components/ExamQuestions.js +++ b/vds-app/App/components/ExamQuestions.js @@ -30,8 +30,8 @@ const generateQuestions = () => { let currentSection = allQuestions[elem.section] for(let i=0; i index != currentIndex) tmpQuestions.push(currentSection[currentIndex]) + currentSection = currentSection.filter( (item, index) => index != currentIndex) } }) } diff --git a/vds-app/App/components/Results.js b/vds-app/App/components/Results.js index b3aac0e..54b5ad8 100644 --- a/vds-app/App/components/Results.js +++ b/vds-app/App/components/Results.js @@ -6,8 +6,6 @@ const screen = Dimensions.get("window") const imgError = require("../assets/error.jpg") const imgUnsafe = require("../assets/unsafe.jpg") const imgPassed = require("../assets/passed.jpg") -const imgPanorama = require("../assets/panorama.jpg") -const imgPanorama2 = require("../assets/panorama2.jpg") const styles = StyleSheet.create({ container: { @@ -25,9 +23,10 @@ const styles = StyleSheet.create({ top: (screen.height/2)-220, width: screen.width-50, borderRadius: 15, - height: 420, - borderColor: colors.white_alpha, - borderWidth: 0 + backgroundColor: colors.white_alpha, + borderColor: colors.white, + borderWidth: 4, + paddingVertical: 30 }, text: { color: colors.white, @@ -83,20 +82,18 @@ export const Results = ({ results, visible }) => { //const percentage = results.totalPoints ? (100/results.totalPoints) * results.points : 0 const percentage = results.total ? (100/results.total) * results.correct : 0 let bgImage = results.points >= 80 ? results.points >= 85 ? imgPassed : imgUnsafe : imgError - let imgPanoramaResult = results.points >= 80 ? imgPanorama : imgPanorama2 + //let imgPanoramaResult = results.points >= 80 ? imgPanorama : imgPanorama2 if(!results.isExam) { bgImage = percentage >= 80 ? percentage >= 85 ? imgPassed : imgUnsafe : imgError - imgPanoramaResult = percentage >= 80 ? imgPanorama : imgPanorama2 + //imgPanoramaResult = percentage >= 80 ? imgPanorama : imgPanorama2 } return ( - + - - {`${texts.corrects}: ${results.correct}`} @@ -117,8 +114,8 @@ export const Results = ({ results, visible }) => { : } - + ) diff --git a/vds-app/App/data/physiopathology.js b/vds-app/App/data/physiopathology.js index 6c84177..65f4514 100644 --- a/vds-app/App/data/physiopathology.js +++ b/vds-app/App/data/physiopathology.js @@ -95,7 +95,7 @@ const questions = [ }, { id: "3", - text: "Permanenza ad alta quota dopo lungo periodo di ambientamento. DEL VOLO" + text: "Permanenza ad alta quota dopo lungo periodo di ambientamento." } ] }, diff --git a/vds-app/App/screens/Exam.js b/vds-app/App/screens/Exam.js index 110be7f..3e4e20c 100644 --- a/vds-app/App/screens/Exam.js +++ b/vds-app/App/screens/Exam.js @@ -73,7 +73,7 @@ class Exam extends React.Component { }, () => { if(this.state.timer > 1 || (this.state.correctCount+this.state.wrongCount) < this.state.totalCount) { - setTimeout(() => this.nextQuestion(), correct ? 750 : 2000) + setTimeout(() => this.nextQuestion(), correct ? 750 : 3500) } } ) diff --git a/vds-app/App/screens/Quiz.js b/vds-app/App/screens/Quiz.js index 340a52b..5691732 100644 --- a/vds-app/App/screens/Quiz.js +++ b/vds-app/App/screens/Quiz.js @@ -1,14 +1,15 @@ import React from "react" -import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView } from "react-native" +import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, ImageBackground } from "react-native" import { Button, ButtonContainer } from "../components/Button" //import { Alert } from "../components/Alert" import { Results } from "../components/Results" import { colors } from "../components/Variables" +const bgImage = require("../assets/bg.jpg") + const styles = StyleSheet.create({ container: { - backgroundColor: colors.blue, flex: 1 }, text: { @@ -23,7 +24,11 @@ const styles = StyleSheet.create({ marginTop: 20, paddingHorizontal: 20, justifyContent: "space-between" - } + }, + bg: { + width: "100%", + height: "100%" + }, }) class Quiz extends React.Component { @@ -93,11 +98,8 @@ class Quiz extends React.Component { const question = questions.filter(item => item.id == this.state.activeQuestionId)[0] || questions[0] return ( - + + {!this.state.results ? @@ -135,6 +137,7 @@ class Quiz extends React.Component { visible={this.state.results} /> + ) } } diff --git a/vds-app/App/screens/QuizIndex.js b/vds-app/App/screens/QuizIndex.js index c8d44b1..c5a3d42 100644 --- a/vds-app/App/screens/QuizIndex.js +++ b/vds-app/App/screens/QuizIndex.js @@ -21,6 +21,13 @@ export default ({ navigation }) => ( + + navigation.navigate("Quiz", { + title: "TEST", + questions: testQuestions, + color: colors.blue + })}/> + navigation.navigate("Quiz", { title: texts.aerodynamics, diff --git a/vds-app/app.json b/vds-app/app.json index 2e34d0c..3bcd3bd 100644 --- a/vds-app/app.json +++ b/vds-app/app.json @@ -8,7 +8,7 @@ "ios", "android" ], - "version": "1.3.0", + "version": "1.3.5", "orientation": "portrait", "icon": "./assets/icon.png", "splash": { @@ -26,7 +26,7 @@ "icon": "./assets/icon.png", "package": "com.dslak.vdsquiz", "permissions": [], - "versionCode": 3, + "versionCode": 4, "config": { "googleMobileAdsAppId": "ca-app-pub-4145771316565790~1876877627" }