Skip to content
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.

Commit

Permalink
#50 fix question in topic 1-4 and matome test navigate
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidborredom committed Jun 23, 2018
1 parent abc3097 commit e5ad1a5
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 26 deletions.
Binary file modified android/app/src/main/res/raw/t4_doushite.mp3
Binary file not shown.
Binary file modified android/app/src/main/res/raw/t4_douyatte.mp3
Binary file not shown.
4 changes: 2 additions & 2 deletions app/component/correct.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class CorrectPanel extends Component {
<View>
<Text style={ styles.correctText }>{ this.stripSpace(displayToText) }</Text>
<Text style={ styles.correctText }>{ this.props.question.romaji }</Text>
<Text style={ styles.correctHighlight }>English</Text>
<Text style={ styles.correctText }>{ this.props.question.english }</Text>
{/* <Text style={ styles.correctHighlight }>English</Text> */}
{/* <Text style={ styles.correctText }>{ this.props.question.english }</Text> */}
</View>

{this.props.question.audio != '' &&
Expand Down
10 changes: 10 additions & 0 deletions app/config/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ export let strings = new LocalizedStrings({
PROCEED : "Proceed >",
QUIZLIST : "Quizlist",
HIRAGANA_KATAKANA_LIST_VALIDATION : "You need to choose at least 5 data",
POINTS: "Points",
QUESTIONS: "Questions",
PASSOVER: "In order to pass you need points above 80",
NEED_PASS:"You need to pass the test 1 time to proceed to next topic. In order to pass you need points above 80",
NEED_PASS_INITIALS:"You need to pass the test 3 times to proceed to next topic. In order to pass you need points above 80",

//login part
SIGN_IN : "Sign In",
Expand Down Expand Up @@ -261,6 +266,11 @@ export let strings = new LocalizedStrings({
PROCEED : "持続する >",
QUIZLIST : "クイズリスト",
HIRAGANA_KATAKANA_LIST_VALIDATION : "少なくとも5つのデータを選択する必要があります",
POINTS: "点",
QUESTIONS: "問",
PASSOVER: "80点以上で合格",
NEED_PASS:"次のトピックを続けるように、テストを1回合格が必要です。80点以上で合。",
NEED_PASS_INITIALS:"次のトピックを続けるように、テストを3回合格が必要です。80点以上で合。",

//login part
SIGN_IN : "サインイン",
Expand Down
8 changes: 1 addition & 7 deletions app/screens/Quiz/quizFlash.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ import {
<View style={ !timerRun && styles.blocker }></View>
<View style={[ styles.quizInfo ]}>
<Text style={ styles.quizInfoText }>
Points: { this.setScore() }/100 Questions: { this.state.counter+1 }/{ this.allQuestion.length }
{strings.POINTS}: { this.setScore() }/100 {strings.QUESTIONS}: { this.state.counter+1 }/{ this.allQuestion.length }
</Text>
</View>

Expand Down Expand Up @@ -776,12 +776,6 @@ import {

this.setState(this.initialState);
this.props.navigation.dispatch(resetAction);

// this.props.navigation.navigate('ScoreScreen',{
// index : this.state.index,
// typeQuiz : this.initialParams.formatType,
// studyTitle : this.title
// });

}
}
Expand Down
5 changes: 3 additions & 2 deletions app/screens/Study/score.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ import {
<View style={ scoreStyle.absoluteText }>
<View style={ scoreStyle.containerScore }>
<Text style={ scoreStyle.scoreTotal }>{ this.props.scoreTotal}/100 </Text>
</View>
</View>
</View>
<ProgressCircle
style={ { height: 140 } }
Expand All @@ -219,6 +219,7 @@ import {
/>
</View>
<View style={ scoreStyle.containerMistake }>
<Text style={scoreStyle.ruleScore}>{ strings.PASSOVER }</Text>
<ScrollView style={ scoreStyle.containerMainMistake }>
<Text style={ scoreStyle.sumaryTitle }>SUMMARY</Text>
<Icon name='lock' color='#fff' size={10}/>
Expand All @@ -235,7 +236,7 @@ import {
) :<Text>No study data</Text> }
</ScrollView >
</View>
{ this.props.scoreTotal >= 80 ? (
{ this.props.scoreTotal >= 0 ? (
<View style={ scoreStyle.containerMistake }>
<View style={ scoreStyle.RecordRowButton }>
<View style={ scoreStyle.RecordRowButtonContainer }>
Expand Down
4 changes: 1 addition & 3 deletions app/screens/Study/studyList.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ class StudyListScreen extends Component {
this.props.navigation.navigate('QuizFlash',(
item
));
// this.props.navigation.navigate('TopicList',(
// item
// ));

}
else{
this.props.navigation.navigate('TopicList',(
Expand Down
55 changes: 43 additions & 12 deletions app/screens/Study/topiclist.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,50 @@ navigateToLearn=(type, categoryId)=>{
navigateToNextTopic=()=>{
var item = StudyList[this.state.index + 1];
item['index'] = this.state.index + 1;
console.log(this.props.lock,'-weee',item);

const resetAction = NavigationActions.reset({
index: 1,
actions: [
NavigationActions.navigate({ routeName: 'StudyList' }),
NavigationActions.navigate({ routeName: 'TopicList' , params: item })
]
});
locks = this.props.lock;
console.log(item);
if(locks[item.topic_id].lock){
if(this.state.type == 'INITIAL'){
alert(strings.NEED_PASS_INITIAL);
}
else{
alert(strings.NEED_PASS);
}

}
else{


this.props.navigation.dispatch(resetAction);
let resetAction;


if(item.type == 'FUKUSHU'){

item['formatType'] = 'FUKUSHU';
item['idList'] = this.props.lock[item.topic_id].mistakes;

resetAction = NavigationActions.reset({
index: 1,
actions: [
NavigationActions.navigate({ routeName: 'StudyList' }),
NavigationActions.navigate({ routeName: 'QuizFlash' , params: item })
]
});

}
else{

resetAction = NavigationActions.reset({
index: 1,
actions: [
NavigationActions.navigate({ routeName: 'StudyList' }),
NavigationActions.navigate({ routeName: 'TopicList' , params: item })
]
});

}

this.props.navigation.dispatch(resetAction);
}

}
render() {
return (
Expand Down Expand Up @@ -130,6 +160,7 @@ navigateToLearn=(type, categoryId)=>{
<Text style={[study.buttonTopicText]}>{ strings['topic_test'] }</Text>
</TouchableOpacity>
</View>

<View style={[study.buttonContainerTopicNext]}>
<TouchableOpacity style={[study.nextTopic, styles.shadow]} onPress={this.navigateToNextTopic.bind(this)}>
<Text style={[study.buttonTopicNextText]}>{ strings['next_topic'] }</Text>
Expand Down
5 changes: 5 additions & 0 deletions app/styles/score.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ module.exports = StyleSheet.create({
imageHome : {
width: '100%',
height: '100%',
},
ruleScore:{
fontSize:16,
marginBottom:10,
textAlign:"center"
}

});
Expand Down

0 comments on commit e5ad1a5

Please sign in to comment.