diff --git a/builds/VDS-Quiz-64dad45c8d0a483b85ecedd661d68ba6-signed.aab b/builds/VDS-Quiz-64dad45c8d0a483b85ecedd661d68ba6-signed.aab
new file mode 100644
index 0000000..f7f9c93
Binary files /dev/null and b/builds/VDS-Quiz-64dad45c8d0a483b85ecedd661d68ba6-signed.aab differ
diff --git a/screenshots/Screenshot_20191106-183306_Expo.jpg b/screenshots/Screenshot_20191106-183306_Expo.jpg
new file mode 100644
index 0000000..4479d21
Binary files /dev/null and b/screenshots/Screenshot_20191106-183306_Expo.jpg differ
diff --git a/screenshots/Screenshot_20191106-183334_Expo.jpg b/screenshots/Screenshot_20191106-183334_Expo.jpg
new file mode 100644
index 0000000..4818f6d
Binary files /dev/null and b/screenshots/Screenshot_20191106-183334_Expo.jpg differ
diff --git a/screenshots/Screenshot_20191106-183350_Expo.jpg b/screenshots/Screenshot_20191106-183350_Expo.jpg
new file mode 100644
index 0000000..3d147af
Binary files /dev/null and b/screenshots/Screenshot_20191106-183350_Expo.jpg differ
diff --git a/screenshots/g927-8.png b/screenshots/g927-8.png
new file mode 100644
index 0000000..a98e4fe
Binary files /dev/null and b/screenshots/g927-8.png differ
diff --git a/screenshots/g933-1.png b/screenshots/g933-1.png
new file mode 100644
index 0000000..5c47c59
Binary files /dev/null and b/screenshots/g933-1.png differ
diff --git a/screenshots/g980-4.png b/screenshots/g980-4.png
new file mode 100644
index 0000000..275676e
Binary files /dev/null and b/screenshots/g980-4.png differ
diff --git a/screenshots/header.png b/screenshots/header.png
index 6fef8fc..08b817c 100644
Binary files a/screenshots/header.png and b/screenshots/header.png differ
diff --git a/screenshots/header.svg b/screenshots/header.svg
index e984f82..0bfb865 100644
--- a/screenshots/header.svg
+++ b/screenshots/header.svg
@@ -30,13 +30,19 @@
+
+
-
+
+
+
+
+
@@ -46,16 +52,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -84,15 +102,21 @@
style="stop-color:#ffffff;stop-opacity:0.1606186" />
+
+
+
+
+
+
@@ -104,6 +128,8 @@
+
+
+
+
@@ -128,6 +158,8 @@
+
+
+
+
@@ -152,6 +188,8 @@
+
+
+
+
+
+
+
+
@@ -514,6 +612,8 @@
+
+
+
+
@@ -541,6 +643,8 @@
ry="400.51532" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
QUIZ
+
+
VDS
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
v1.1.0 | by Dslak
+ sodipodi:role="line"
+ rotate="0 0 0 0 0 0">v1.5.0 | by Dslak
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vds-app/App/components/Button.js b/vds-app/App/components/Button.js
index 2c4fdad..7b83905 100644
--- a/vds-app/App/components/Button.js
+++ b/vds-app/App/components/Button.js
@@ -13,7 +13,7 @@ const styles = StyleSheet.create({
alignItems: "center",
justifyContent: "center",
width: "100%",
- marginTop: 20
+ marginTop: 15
},
text: {
color: colors.white,
@@ -28,7 +28,7 @@ const styles = StyleSheet.create({
buttonContainer: {
flexDirection: "row",
flexWrap: "wrap",
- marginTop: 10,
+ marginTop: 20,
justifyContent: "space-between"
}
})
diff --git a/vds-app/App/components/Variables.js b/vds-app/App/components/Variables.js
index d1dd907..23cfd75 100644
--- a/vds-app/App/components/Variables.js
+++ b/vds-app/App/components/Variables.js
@@ -40,17 +40,18 @@ export const texts = {
physiopathology: "Fisiopatologia del volo",
piloting_techniques: "Tecniche di pilotaggio",
restart: "Ricomincia",
+ recap: "Visualizza errori",
+ recapTitle: "Riepilogo domande sbagliate",
infoTitle: "Informazioni",
version: "Versione",
author: "Autore",
- description: "VDS Quiz è una applicazione che utilizza le 500 domande ufficiali dell'AeCI, nella simulazione le domande vengono estrapolate seguendo lo schema ufficiale d'esame:",
+ description: "VDS Quiz è una applicazione che utilizza le 500 domande ufficiali dell'AeCI (Aero Club d'Italia), nella simulazione le domande vengono estrapolate seguendo lo schema ufficiale d'esame:",
source: "Domande ufficiali",
pdfLinkText: "Fonte: AeCI (Aero Club d'Italia) \"500 Quiz\"",
pdfLink: "http://www.aeci.it/upload/files/quiz_VDS-VL_2017.pdf",
schema: "Normativa e legislazione: 4 domande / 3pt \n\r Aerodinamica: 8 domande / 3pt \n\r Pronto soccorso: 1 domande / 2pt \n\r Fisiopatologia del volo: 1 domande / 2pt \n\r Meteorologia e aerologia: 6 domande / 4pt \n\r Strumenti: 1 domande / 2pt \n\r Tecnica di pilotaggio: 5 domande / 4pt \n\r Materiali: 1 domande / 2pt \n\r Sicurezza del volo: 3 domande / 4pt \n\r TOTALE: 30 domande / 100pt",
resultsSchema: "da 100pt a 86pt idoneo\n\r da 85pt a 80pt idoneo con superamento di una verifica orale, riguardante i quesiti errati\n\r inferiore a 80pt non idoneo"
}
-
export const examScheme = [
{section: "aerodynamics", questions: 8, points: 3},
{section: "firstAid", questions: 1, points: 2},
@@ -69,6 +70,7 @@ export const examScheme = [
{section: "flightSafety", questions: 1, points: 4},
{section: "instruments", questions: 1, points: 2}
]
+
*/
export const credentials = {
adMobUnitIDTest: "ca-app-pub-3940256099942544/6300978111",
diff --git a/vds-app/App/index.js b/vds-app/App/index.js
index 81b7321..457f8d1 100644
--- a/vds-app/App/index.js
+++ b/vds-app/App/index.js
@@ -6,6 +6,7 @@ import QuizIndex from "./screens/QuizIndex"
import Quiz from "./screens/Quiz"
import Exam from "./screens/Exam"
import Results from "./screens/Results"
+import Recap from "./screens/Recap"
import Info from "./screens/Info"
import { colors, texts} from "./components/Variables"
@@ -20,6 +21,16 @@ const MainStack = createStackNavigator({
}
})
},
+ Recap: {
+ screen: Recap,
+ navigationOptions: ({ navigation }) => ({
+ header: null,
+ backgroundColor: colors.yellow,
+ headerStyle: {
+ backgroundColor: colors.yellow
+ }
+ })
+ },
Results: {
screen: Results,
navigationOptions: ({ navigation }) => ({
diff --git a/vds-app/App/screens/Exam.js b/vds-app/App/screens/Exam.js
index c49043d..cd580bc 100644
--- a/vds-app/App/screens/Exam.js
+++ b/vds-app/App/screens/Exam.js
@@ -26,7 +26,6 @@ const allQuestions = {
pilotingTechniques: pilotingTechniquesQuestions
}
-
const bgImage = require("../assets/bg.jpg")
const styles = StyleSheet.create({
@@ -70,6 +69,7 @@ class Exam extends React.Component {
pointsCount: 0,
totalPoints: 0,
wrongCount: 0,
+ wrongAnswers: [],
totalCount: this.props.navigation.getParam("questions", []).length,
availableIds: this.props.navigation.getParam("questions", []).map(a => a.id),
activeQuestionId: this.props.navigation.getParam("questions", [])[
@@ -91,8 +91,6 @@ class Exam extends React.Component {
handleBackButton = () => {
- console.log('Mount Exam component')
-
const tmpQuestions = []
examScheme.forEach( (elem) => {
let currentSection = allQuestions[elem.section]
@@ -111,20 +109,28 @@ class Exam extends React.Component {
return true
}
- answer = (correct, id, points) => {
+ answer = (correct, id, question) => {
this.setState(
state => {
- const nextState = { answered: true, clickedId: id, totalPoints: state.totalPoints + parseInt(points)}
+ const nextState = { answered: true, clickedId: id, totalPoints: state.totalPoints + parseInt(question.points)}
if (correct) {
nextState.correctCount = state.correctCount + 1
- nextState.pointsCount = state.pointsCount + parseInt(points)
+ nextState.pointsCount = state.pointsCount + parseInt(question.points)
nextState.answerCorrect = true
} else {
nextState.wrongCount = state.wrongCount + 1
nextState.answerCorrect = false
+ nextState.wrongAnswers = state.wrongAnswers
+ nextState.wrongAnswers.push(
+ { text: question.question,
+ id: question.id,
+ clicked: id,
+ answers: question.answers
+ }
+ )
+ //console.log(state.wrongAnswers)
}
-
return nextState
},
() => {
@@ -133,6 +139,7 @@ class Exam extends React.Component {
}
}
)
+
}
nextQuestion = () => {
@@ -151,7 +158,8 @@ class Exam extends React.Component {
correct: this.state.correctCount,
wrong: this.state.wrongCount,
points: this.state.pointsCount,
- totalPoints: this.state.totalPoints
+ totalPoints: this.state.totalPoints,
+ wrongAnswers: this.state.wrongAnswers
}
})
@@ -210,7 +218,7 @@ class Exam extends React.Component {
key={answer.id}
text={answer.text}
colorize={{id: answer.id, clicked: this.state.clickedId, answered: this.state.answered, isCorrect: answer.correct}}
- onPress={() => this.answer(answer.correct, answer.id, question.points)}
+ onPress={() => this.answer(answer.correct, answer.id, question)}
/>
))}
diff --git a/vds-app/App/screens/Info.js b/vds-app/App/screens/Info.js
index a253b08..bccdc82 100644
--- a/vds-app/App/screens/Info.js
+++ b/vds-app/App/screens/Info.js
@@ -9,12 +9,6 @@ const header = require("../assets/header.png")
const pkg = require('../../app.json')
-const currentInfo = {
- correct: "aaa",
- wrong: "aaa"
-}
-
-
const styles = StyleSheet.create({
container: {
backgroundColor: colors.dark_blue,
@@ -44,18 +38,20 @@ const styles = StyleSheet.create({
},
box: {
width: screen.width-40,
+ paddingHorizontal: 20
},
text: {
color: colors.white,
- fontSize: 22,
+ fontSize: 16,
textAlign: "center",
fontWeight: "400",
- lineHeight: 40,
+ lineHeight: 20,
textShadowColor: 'rgba(0, 0, 0, 0.75)',
textShadowOffset: {width: -1, height: 1},
textShadowRadius: 10
},
textSmall: {
+ lineHeight: 23,
marginTop: 15,
borderRadius: 5,
backgroundColor: colors.black_alpha,
@@ -76,6 +72,7 @@ const styles = StyleSheet.create({
paddingVertical: 20
},
bold: {
+ lineHeight: 30,
fontSize: 26,
fontWeight: "600"
}
@@ -100,34 +97,36 @@ class Info extends React.Component {
-
-
- {`${pkg.expo.name}`}
-
-
- {`${texts.version}: ${pkg.expo.version}`}
-
-
- {`${texts.author}: Dslak`}
-
-
-
- {texts.description}
-
-
- {texts.schema}
-
-
- {texts.resultsSchema}
-
-
-
diff --git a/vds-app/App/screens/Quiz.js b/vds-app/App/screens/Quiz.js
index 440e0da..8bd02e5 100644
--- a/vds-app/App/screens/Quiz.js
+++ b/vds-app/App/screens/Quiz.js
@@ -34,6 +34,7 @@ class Quiz extends React.Component {
state = {
correctCount: 0,
wrongCount: 0,
+ wrongAnswers: [],
pointsCount: 0,
totalPoints: 0,
totalCount: this.props.navigation.getParam("questions", []).length,
@@ -46,18 +47,26 @@ class Quiz extends React.Component {
results: false
}
- answer = (correct, id, points) => {
+ answer = (correct, id, question) => {
this.setState(
state => {
- const nextState = { answered: true, clickedId: id, totalPoints: state.totalPoints + parseInt(points)}
+ const nextState = { answered: true, clickedId: id, totalPoints: state.totalPoints + parseInt(question.points)}
if (correct) {
nextState.correctCount = state.correctCount + 1
- nextState.pointsCount = state.pointsCount + parseInt(points)
+ nextState.pointsCount = state.pointsCount + parseInt(question.points)
nextState.answerCorrect = true
} else {
nextState.wrongCount = state.wrongCount + 1
- nextState.answerCorrect = false
+ nextState.answerCorrect = false,
+ nextState.wrongAnswers = state.wrongAnswers
+ nextState.wrongAnswers.push(
+ { text: question.question,
+ id: question.id,
+ clicked: id,
+ answers: question.answers
+ }
+ )
}
return nextState
@@ -82,7 +91,8 @@ class Quiz extends React.Component {
correct: this.state.correctCount,
wrong: this.state.wrongCount,
points: this.state.pointsCount,
- totalPoints: this.state.totalPoints
+ totalPoints: this.state.totalPoints,
+ wrongAnswers: this.state.wrongAnswers
}
})
@@ -118,7 +128,7 @@ class Quiz extends React.Component {
key={answer.id}
text={answer.text}
colorize={{id: answer.id, clicked: this.state.clickedId, answered: this.state.answered, isCorrect: answer.correct}}
- onPress={() => this.answer(answer.correct, answer.id, question.points)}
+ onPress={() => this.answer(answer.correct, answer.id, question)}
/>
))}
diff --git a/vds-app/App/screens/Recap.js b/vds-app/App/screens/Recap.js
new file mode 100644
index 0000000..78d18e7
--- /dev/null
+++ b/vds-app/App/screens/Recap.js
@@ -0,0 +1,162 @@
+import React from "react"
+import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image, ImageBackground, BackHandler} from "react-native"
+
+import { Button, ButtonContainer } from "../components/Button"
+import { colors, texts, examScheme } from "../components/Variables"
+
+import aerodynamicsQuestions from "../data/aerodynamics"
+import firstAidQuestions from "../data/firstAid"
+import flightSafetyQuestions from "../data/flightSafety"
+import instrumentsQuestions from "../data/instruments"
+import legislationQuestions from "../data/legislation"
+import materialsQuestions from "../data/materials"
+import meteorologyQuestions from "../data/meteorology"
+import physiopathologyQuestions from "../data/physiopathology"
+import pilotingTechniquesQuestions from "../data/pilotingTechniques"
+
+const screen = Dimensions.get("window")
+const header = require("../assets/header.png")
+const bgImage = require("../assets/bg.jpg")
+
+const allQuestions = {
+ aerodynamics: aerodynamicsQuestions,
+ firstAid: firstAidQuestions,
+ flightSafety: flightSafetyQuestions,
+ instruments: instrumentsQuestions,
+ legislation: legislationQuestions,
+ materials: materialsQuestions,
+ meteorology: meteorologyQuestions,
+ physiopathology: physiopathologyQuestions,
+ pilotingTechniques: pilotingTechniquesQuestions
+}
+
+const styles = StyleSheet.create({
+ container: {
+ backgroundColor: colors.dark_blue,
+ flex: 1
+ },
+ safearea: {
+ flex: 1,
+ marginTop: 0,
+ justifyContent: "space-between",
+ paddingHorizontal: 20,
+ paddingBottom: 40
+ },
+ headerContainer: {
+ marginTop: -40,
+ alignItems: "center",
+ justifyContent: "center",
+ width: "100%",
+ height: screen.width/1.5
+ },
+ header: {
+ width: "100%"
+ },
+ box: {
+ marginTop: 30,
+ borderColor: colors.black_alpha,
+ borderWidth: 1,
+ padding: 15,
+ borderRadius: 5,
+ backgroundColor: colors.black_alpha
+ },
+ text: {
+ color: colors.white,
+ fontSize: 20,
+ textAlign: "center",
+ fontWeight: "600",
+ paddingVertical: 10
+ },
+ textBig: {
+ color: colors.white,
+ fontSize: 24,
+ textAlign: "center",
+ fontWeight: "500",
+ paddingBottom: 10,
+ textShadowColor: 'rgba(0, 0, 0, 0.75)',
+ textShadowOffset: {width: -1, height: 1},
+ textShadowRadius: 10
+ },
+ bg: {
+ width: "100%",
+ height: "100%"
+ }
+})
+
+class Recap extends React.Component {
+
+ componentDidMount() {
+ BackHandler.addEventListener('hardwareBackPress', this.handleBackButton)
+ }
+
+ componentWillUnmount() {
+ BackHandler.removeEventListener('hardwareBackPress', this.handleBackButton)
+ }
+
+ handleBackButton = () => {
+
+ const tmpQuestions = []
+ examScheme.forEach( (elem) => {
+ let currentSection = allQuestions[elem.section]
+ for(let i=0; i index != currentIndex)
+ }
+ })
+
+ //tmpQuestions.forEach( (e) => { console.log(e.id) })
+
+ this.props.navigation.navigate("Splash", {
+ examQuestions: tmpQuestions
+ })
+ return true
+ }
+
+ render() {
+
+ const questions = this.props.navigation.getParam("wrongAnswers", [])
+
+ return (
+
+
+
+
+
+ {texts.recapTitle}
+
+
+
+ {questions.map( (question, index) => (
+
+ {question.text}
+
+
+ {question.answers.map( (answer, index) => (
+
+ ))}
+
+
+ ))}
+
+
+ {this.handleBackButton()}
+ }
+ />
+
+
+
+
+
+
+ )
+ }
+}
+
+export default Recap
diff --git a/vds-app/App/screens/Results.js b/vds-app/App/screens/Results.js
index 4cf2a2b..70fcd19 100644
--- a/vds-app/App/screens/Results.js
+++ b/vds-app/App/screens/Results.js
@@ -1,5 +1,5 @@
import React from "react"
-import { View, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image, BackHandler} from "react-native"
+import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image, BackHandler} from "react-native"
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, examScheme } from "../components/Variables"
@@ -40,22 +40,23 @@ const styles = StyleSheet.create({
flex: 1,
marginTop: 0,
justifyContent: "space-between",
- paddingHorizontal: 20
+ paddingHorizontal: 20,
+ paddingBottom: 40
},
headerContainer: {
- marginTop: 0,
+ marginTop: -40,
alignItems: "center",
justifyContent: "center",
width: "100%",
- height: 150
+ height: screen.width/1.5
},
header: {
width: "100%"
},
box: {
- position: "absolute",
- top: screen.width/4,
- left: 40,
+ marginTop: 20,
+ marginBottom: 30,
+ marginHorizontal: 20,
width: screen.width-80,
borderRadius: 15,
backgroundColor: colors.white_alpha,
@@ -73,10 +74,8 @@ const styles = StyleSheet.create({
borderColor: colors.orange,
},
button: {
- position: "absolute",
- bottom: 40,
- left: 40,
- width: screen.width-80
+ width: screen.width-80,
+ marginHorizontal: 20
},
text: {
color: colors.white,
@@ -130,8 +129,6 @@ class Results extends React.Component {
handleBackButton = () => {
- console.log('Mount Exam component')
-
const tmpQuestions = []
examScheme.forEach( (elem) => {
let currentSection = allQuestions[elem.section]
@@ -153,6 +150,7 @@ class Results extends React.Component {
render() {
const currentResults = this.props.navigation.getParam("results")
+ const wrongAnswers = currentResults.wrongAnswers || null
const percentage = currentResults.total ? (100/currentResults.total) * currentResults.correct : 0
let resultStyle = currentResults.points >= 80 ? currentResults.points >= 85 ? styles.correct : styles.unsafe : styles.wrong
let boxStyle = currentResults.points >= 80 ? currentResults.points >= 85 ? styles.boxCorrect : styles.boxUnsafe : styles.boxWrong
@@ -162,45 +160,63 @@ class Results extends React.Component {
boxStyle = percentage >= 80 ? percentage >= 85 ? styles.boxCorrect : styles.boxUnsafe : styles.boxWrong
}
- console.log(currentResults)
+ //console.log(currentResults)
return (
+
+
+
+
+ {`${texts.corrects}: ${currentResults.correct}`}
+
+
+ {`${texts.wrongs}: ${currentResults.wrong}`}
+
+
+ {`${texts.percentage}: ${Math.round(percentage)}%`}
+
+
+ {`${texts.points}: ${currentResults.points}/${currentResults.totalPoints}`}
+
+
+ {currentResults.isExam ?
+
+ {currentResults.points >= 80 ? currentResults.points >= 85 ? texts.exam_passed : texts.exam_needs_oral : texts.exam_not_passed}
+ :
+ }
+
-
-
-
- {`${texts.corrects}: ${currentResults.correct}`}
-
-
- {`${texts.wrongs}: ${currentResults.wrong}`}
-
-
- {`${texts.percentage}: ${Math.round(percentage)}%`}
-
-
- {`${texts.points}: ${currentResults.points}/${currentResults.totalPoints}`}
-
-
- {currentResults.isExam ?
-
- {currentResults.points >= 80 ? currentResults.points >= 85 ? texts.exam_passed : texts.exam_needs_oral : texts.exam_not_passed}
- :
+ {wrongAnswers ?
+
+ {
+ this.props.navigation.navigate("Recap", {
+ wrongAnswers: wrongAnswers
+ })
+ }}/>
+ {this.handleBackButton()}
+ }
+ />
+
+ :
+
+ {this.handleBackButton()}
+ }
+ />
+
}
-
-
-
- {this.handleBackButton()}
- }
- />
-
-
+
+
)
diff --git a/vds-app/app.json b/vds-app/app.json
index f905d27..a494873 100644
--- a/vds-app/app.json
+++ b/vds-app/app.json
@@ -8,7 +8,7 @@
"ios",
"android"
],
- "version": "1.4.5",
+ "version": "1.5.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
@@ -26,7 +26,7 @@
"icon": "./assets/icon.png",
"package": "com.dslak.vdsquiz",
"permissions": [],
- "versionCode": 6,
+ "versionCode": 7,
"config": {
"googleMobileAdsAppId": "ca-app-pub-4145771316565790~1876877627"
}