Commit d9c676c3d9d7a29a0cf7f5d1d4dd30db54ddc1e1

Authored by r-ujihara
1 parent 0931166e

1.0版向け修正1回目

Showing 79 changed files with 412 additions and 2486 deletions
@@ -36,6 +36,34 @@ @@ -36,6 +36,34 @@
36 <platform name="ios"> 36 <platform name="ios">
37 <allow-intent href="itms:*"/> 37 <allow-intent href="itms:*"/>
38 <allow-intent href="itms-apps:*"/> 38 <allow-intent href="itms-apps:*"/>
  39 + <icon src="resources\ios\icon\icon.png" width="57" height="57"/>
  40 + <icon src="resources\ios\icon\icon@2x.png" width="114" height="114"/>
  41 + <icon src="resources\ios\icon\icon-40.png" width="40" height="40"/>
  42 + <icon src="resources\ios\icon\icon-40@2x.png" width="80" height="80"/>
  43 + <icon src="resources\ios\icon\icon-40@3x.png" width="120" height="120"/>
  44 + <icon src="resources\ios\icon\icon-50.png" width="50" height="50"/>
  45 + <icon src="resources\ios\icon\icon-50@2x.png" width="100" height="100"/>
  46 + <icon src="resources\ios\icon\icon-60.png" width="60" height="60"/>
  47 + <icon src="resources\ios\icon\icon-60@2x.png" width="120" height="120"/>
  48 + <icon src="resources\ios\icon\icon-60@3x.png" width="180" height="180"/>
  49 + <icon src="resources\ios\icon\icon-72.png" width="72" height="72"/>
  50 + <icon src="resources\ios\icon\icon-72@2x.png" width="144" height="144"/>
  51 + <icon src="resources\ios\icon\icon-76.png" width="76" height="76"/>
  52 + <icon src="resources\ios\icon\icon-76@2x.png" width="152" height="152"/>
  53 + <icon src="resources\ios\icon\icon-83.5@2x.png" width="167" height="167"/>
  54 + <icon src="resources\ios\icon\icon-small.png" width="29" height="29"/>
  55 + <icon src="resources\ios\icon\icon-small@2x.png" width="58" height="58"/>
  56 + <icon src="resources\ios\icon\icon-small@3x.png" width="87" height="87"/>
  57 + <splash src="resources\ios\splash\Default-568h@2x~iphone.png" width="640" height="1136"/>
  58 + <splash src="resources\ios\splash\Default-667h.png" width="750" height="1334"/>
  59 + <splash src="resources\ios\splash\Default-736h.png" width="1242" height="2208"/>
  60 + <splash src="resources\ios\splash\Default-Landscape-736h.png" width="2208" height="1242"/>
  61 + <splash src="resources\ios\splash\Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
  62 + <splash src="resources\ios\splash\Default-Landscape~ipad.png" width="1024" height="768"/>
  63 + <splash src="resources\ios\splash\Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
  64 + <splash src="resources\ios\splash\Default-Portrait~ipad.png" width="768" height="1024"/>
  65 + <splash src="resources\ios\splash\Default@2x~iphone.png" width="640" height="960"/>
  66 + <splash src="resources\ios\splash\Default~iphone.png" width="320" height="480"/>
39 </platform> 67 </platform>
40 <preference name="webviewbounce" value="false"/> 68 <preference name="webviewbounce" value="false"/>
41 <preference name="UIWebViewBounce" value="false"/> 69 <preference name="UIWebViewBounce" value="false"/>
@@ -57,5 +85,5 @@ @@ -57,5 +85,5 @@
57 <plugin name="cordova-plugin-device" spec="1.1.4"/> 85 <plugin name="cordova-plugin-device" spec="1.1.4"/>
58 <plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/> 86 <plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
59 <plugin name="cordova-sqlite-storage" spec="~2.0.2"/> 87 <plugin name="cordova-sqlite-storage" spec="~2.0.2"/>
60 - <icon src="resources\android\icon\drawable-xhdpi-icon.png"/> 88 + <icon src="resources\ios\icon\icon-small@3x.png"/>
61 </widget> 89 </widget>

2.97 KB | W: | H:

9.23 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.46 KB | W: | H:

3.24 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.88 KB | W: | H:

5.02 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

4.14 KB | W: | H:

13.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

6.33 KB | W: | H:

25.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.45 KB | W: | H:

34.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

18.2 KB | W: | H:

18.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

6.67 KB | W: | H:

6.67 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

10.5 KB | W: | H:

10.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

30.2 KB | W: | H:

30.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

39.6 KB | W: | H:

39.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

51.9 KB | W: | H:

51.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

18.8 KB | W: | H:

18.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

6.83 KB | W: | H:

6.83 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

10.8 KB | W: | H:

10.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

31.4 KB | W: | H:

31.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

40.7 KB | W: | H:

40.7 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

53.2 KB | W: | H:

53.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.08 KB | W: | H:

31 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.22 KB | W: | H:

3.79 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

3.48 KB | W: | H:

10.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

5.87 KB | W: | H:

19.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.86 KB | W: | H:

5.34 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

4.58 KB | W: | H:

14.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.39 KB | W: | H:

7.03 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

5.9 KB | W: | H:

19.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

10.6 KB | W: | H:

34.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.8 KB | W: | H:

9.23 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

7.61 KB | W: | H:

25.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

3.24 KB | W: | H:

9.92 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

8.11 KB | W: | H:

27.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

9.34 KB | W: | H:

31.2 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

818 Bytes | W: | H:

2.35 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.23 KB | W: | H:

6.58 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

3.77 KB | W: | H:

12 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.06 KB | W: | H:

6.47 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

5.58 KB | W: | H:

17.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

31.2 KB | W: | H:

27.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

39.5 KB | W: | H:

32.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

44 KB | W: | H:

6.92 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

43.9 KB | W: | H:

7.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

99.9 KB | W: | H:

57 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

22.1 KB | W: | H:

25.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

97.1 KB | W: | H:

57.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

22.2 KB | W: | H:

26.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

18.4 KB | W: | H:

23.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

7.04 KB | W: | H:

10.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
@@ -4,10 +4,8 @@ import { MyApp } from './app.component'; @@ -4,10 +4,8 @@ import { MyApp } from './app.component';
4 import { MenuPage } from '../pages/menu/menu'; 4 import { MenuPage } from '../pages/menu/menu';
5 import { UnitPage } from '../pages/unit/unit'; 5 import { UnitPage } from '../pages/unit/unit';
6 import { QaPage } from '../pages/qa/qa'; 6 import { QaPage } from '../pages/qa/qa';
7 -import { ExtunitPage } from '../pages/extunit/extunit';  
8 -import { ExtqaPage } from '../pages/extqa/extqa';  
9 -import { HelpPage } from '../pages/help/help';  
10 import { StatusPage } from '../pages/status/status' 7 import { StatusPage } from '../pages/status/status'
  8 +import { AboutPage } from '../pages/about/about'
11 import { DataService } from '../providers/data-service'; 9 import { DataService } from '../providers/data-service';
12 import { Storage } from '@ionic/storage'; 10 import { Storage } from '@ionic/storage';
13 import { ChartsModule } from 'ng2-charts/charts/charts'; 11 import { ChartsModule } from 'ng2-charts/charts/charts';
@@ -19,10 +17,8 @@ import '../../node_modules/chart.js/dist/Chart.bundle.min.js'; @@ -19,10 +17,8 @@ import '../../node_modules/chart.js/dist/Chart.bundle.min.js';
19 MenuPage, 17 MenuPage,
20 UnitPage, 18 UnitPage,
21 QaPage, 19 QaPage,
22 - ExtunitPage,  
23 - ExtqaPage,  
24 - HelpPage,  
25 - StatusPage 20 + StatusPage,
  21 + AboutPage
26 ], 22 ],
27 imports: [ 23 imports: [
28 IonicModule.forRoot(MyApp), 24 IonicModule.forRoot(MyApp),
@@ -34,10 +30,8 @@ import '../../node_modules/chart.js/dist/Chart.bundle.min.js'; @@ -34,10 +30,8 @@ import '../../node_modules/chart.js/dist/Chart.bundle.min.js';
34 MenuPage, 30 MenuPage,
35 UnitPage, 31 UnitPage,
36 QaPage, 32 QaPage,
37 - ExtunitPage,  
38 - ExtqaPage,  
39 - HelpPage,  
40 - StatusPage 33 + StatusPage,
  34 + AboutPage
41 ], 35 ],
42 providers: [{ provide: ErrorHandler, useClass: IonicErrorHandler }, Storage, DataService] 36 providers: [{ provide: ErrorHandler, useClass: IonicErrorHandler }, Storage, DataService]
43 }) 37 })
  1 +<!--
  2 + Generated template for the About page.
  3 +
  4 + See http://ionicframework.com/docs/v2/components/#navigation for more info on
  5 + Ionic pages and navigation.
  6 +-->
  7 +<ion-header>
  8 +
  9 + <ion-navbar color="primary">
  10 + <ion-title>このアプリについて</ion-title>
  11 + </ion-navbar>
  12 +
  13 + <ion-toolbar no-border-top>
  14 + <ion-segment [(ngModel)]="about">
  15 + <ion-segment-button value="credit">
  16 + アプリについて
  17 + </ion-segment-button>
  18 +
  19 + <ion-segment-button value="disclaimer">
  20 + 利用規約
  21 + </ion-segment-button>
  22 +
  23 + </ion-segment>
  24 +
  25 + </ion-toolbar>
  26 +</ion-header>
  27 +
  28 +
  29 +<ion-content padding>
  30 + <div [ngSwitch]="about">
  31 + <div *ngSwitchCase="'credit'">
  32 + ・アプリ名<br />
  33 + xxxx<br /><br />
  34 + ・バージョン<br />
  35 + 1.0.0<br /><br />
  36 + ・制作<br />
  37 + メディアテック株式会社<br /><br />
  38 + </div>
  39 +
  40 +
  41 +
  42 + <div *ngSwitchCase="'disclaimer'">
  43 + <p>
  44 + 第1条 総則<br />
  45 +  このアプリ利用規約(以下「本規約」といいます)は、メディアテック株式会社(以下「メディアテック」といいます)が提供する、スマートデバイス端末機器(以下、「対応端末」といいます)を通じてサービス(以下「アプリサービス」といいます)が利用できるアプリに共通して、メディアテック及びお客様との間で適用される約款です。<br />
  46 +  アプリを使用する前に、本規約並びに使用条件等の各定めをよくお読み頂き、同意頂いた上でご利用ください。なお、お客様がアプリをダウンロード、インストールまたは使用した時点をもって、本規約等の全てに無条件で同意したものとなります(お客様は留保や条件などを付けてご利用することは出来ません)。<br />
  47 + </p>
  48 + <p>
  49 + 第2条 本アプリの使用<br />
  50 +  (1) メディアテックは、お客様に対し、アプリを対応端末にインストールし使用するための、お客様の個人的な利用目的に限定し、非独占的、譲渡不能及び再許諾禁止で、メディアテックが無条件で取消可能なライセンスを付与するものとし、お客様は、本規約等に従いアプリサービスに関連する範囲でのみ同アプリを使用できます。<br />
  51 +  (2) お客様は、前項のライセンスに基づき、自己の費用と責任においてアプリをお客様ご自身の対応端末にダウンロード及びインストールするものとし、同アプリのダウンロード、インストール及び使用に伴う通信料等はお客様の負担になります。なお、メディアテックが同アプリの対応端末の機種やOSを指定した場合であっても、当該機種やOSにおける同アプリの正常な動作を保証するものではなく、通信環境の状況等により同アプリが動作しない、または使用できない場合であっても、メディアテックはサポート等を含む一切の責任を負うものではありません。<br />
  52 +  (3)メディアテックは、お客様がアプリを使用することで、お客様の対応端末やコンピュータなどの機器に支障や損害が生じた場合や、それら機器に記録されている情報やプログラムなどが消失したり故障する場合、そのほかお客様に不利益や損失を与える場合(ウィルスの感染を含む)について一切責任を負いません。<br />
  53 + </p>
  54 + <p>
  55 + 第2条の2 有償での使用の場合<br />
  56 +  一部のアプリおよびアプリサービスの利用においては、有償で提供される場合があります。その場合は、利用に先立って該当する本規約等で定める料金のお支払が完了しないと同利用はできません。利用開始によりアプリをお客様ご自身の対応端末にダウンロードした後は、理由の如何に関らず、既にお支払済の料金は一切返還されないものとします。<br />
  57 + </p>
  58 + <p>
  59 + 第3条 著作権等の権利の帰属<br />
  60 +  アプリ及びアプリサービスに関する著作権等を含む知的財産権その他一切の権利はメディアテックまたは正当な権利を有する第三者に帰属します。本規約において明示的に定めがある場合を除き、お客様は、同アプリに関する知的財産権その他いかなる権利を取得するものではありません。<br />
  61 + </p>
  62 + <p>
  63 + 第4条 禁止事項<br />
  64 +  お客様はアプリを利用するにあたり、以下の各号に規定する行為をしてはならないものとします。<br />
  65 +   1.お客様の個人的利用を超えて、同アプリを商業・営利目的などに使用する行為<br />
  66 +   2.同アプリの一部をお客様個人のプログラムに組み込み、または結合することを目的としたコンパイル等一切の行為<br />
  67 +   3.同アプリの全部又は一部を改変、改ざんする行為<br />
  68 +   4.同アプリを逆コンパイル、逆アセンブル、リバースエンジニアリングし、その他同アプリのソースコード、アイデア等を解析または分析等する行為<br />
  69 +   5.同アプリを、複製、頒布、公衆送信、翻訳、翻案、譲渡、貸与、使用再許諾などとする行為<br />
  70 +   6.同アプリに組み込まれているセキュリティ機能を害する行為<br />
  71 +   7.同アプリに付された著作権表示及びその他の権利表示を除去または変更する行為<br />
  72 +   8.同アプリまたは第三者の情報端末、通信機器等の機能を害するように設計されたコンピュータウィルス、マルウェア等のプログラムを含む情報等を送信する行為<br />
  73 +   9.同アプリまたは同アプリがダウンロードされた携帯機器を直接、間接に輸出し、海外に送信する等、関連国の輸出入規制に抵触するおそれのある行為<br />
  74 +   10.個別の同アプリについて定める使用条件に反する行為<br />
  75 +   11.第三者による前各号の行為を援助又は推奨する行為<br />
  76 +   12.その他本規約等に反するか同アプリを違法又は不当な目的、態様で使用する一切の行為 <br />
  77 + </p>
  78 + <p>
  79 + 第5条 免責等<br />
  80 +  (1) お客様は、アプリのいかなる使用についても自己の責任で行うものであることに同意したものとみなされます。同アプリは現状有姿で何らの保証なくお客様に提供されるものであり、メディアテックは、同アプリの機能、性能及び表示内容についての正確性、信頼性、安全性、商業上の利用可能性及び第三者の権利を侵害していないこと等について明示的にも黙示的にも保証するものではありません。また、メディアテックから口頭又は書面により提供されるいかなる情報も、これらのメディアテックの保証の責任等を生じさせるものではありません。<br />
  81 +  (2) メディアテックは、お客様がアプリを利用することに関連して生じる可能性のある、利益・収入等の逸失、データ及び対応端末等の損壊に伴う損害を含む一切の損害についてお客様に対して責任を負いません。 <br />
  82 + </p>
  83 + <p>
  84 + 第6条 お客様の責任<br />
  85 +  (1)お客様が本規約等に違反し、これによりメディアテックまたは第三者に損害が発生した場合、お客様は当該損害の全額(弁護士費用を含みます)を賠償するものとします。<br />
  86 +  (2) 利用者は、本規約等の違反、第三者の権利侵害その他アプリおよびモバイルサービスの利用に起因もしくは関連して第三者から生じた問合せ、クレーム、請求等については、自らの責任と負担において解決するものとし、メディアテックに一切迷惑をかけないものとします。 <br />
  87 + </p>
  88 + <p>
  89 + 第7条 アプリのアップデート、変更等<br />
  90 +  (1) メディアテックは、いつでもお客様への通知なく、アプリのアップデートを行うことができます。ただし、メディアテックはアップデートを行う義務を負うものではなく、特定のサポート等の提供を決定した場合でも、いつでもお客様への通知なく当該サポート等の提供を終了することができます。<br />
  91 +  (2) メディアテックは、いつでもお客様への通知なく、アプリが操作不可能となるよう同アプリを改変することで、お客様の同アプリ又はモバイルサービスを使用する権利の全部又は一部を変更、中断、中止又は終了することができます。メディアテックは、この権利を行使したことによりお客様に対して損害が発生した場合であっても、一切これを賠償する責を負いません。<br />
  92 +  (3)前2項の対象とするお客様とは、不特定多数のお客様であると、任意に選んだ特定の一部のお客様であるとを問わないもので、いずれの場合でもメディアテックは一切の責任を負いません。
  93 + </p>
  94 + <p>
  95 + 第8条 利用終了等及びお客様のお立場<br />
  96 +  (1)お客様は、ご自身の対応端末にインストールされているアプリの全てのコピーをアンインストール又は削除することで、いつでもその使用を終了することができます。
  97 +  (2) お客様が本規約に違反した場合には、メディアテックからの通知なく、本規約に基づくお客様の権利は自動的に消滅するものとし、お客様はアプリの一切の使用を中断すると共に同アプリの全てのコピーを削除するものとします。この場合、メディアテックはいつでもお客様への通知なく直ちにお客様によるモバイルサービスへのアクセスを無効にする権限を有します。また、メディアテックはお客様の同アプリを使用する権利を終了させる権利を有し、この場合には、同アプリが操作不可能となるよう同アプリを改変する権利を有します。メディアテックは、これらの権利を行使したことによりお客様に損害が発生した場合であっても一切これを賠償する責を負いません。<br />
  98 +  (3)メディアテックが、お客様に対し、本規約に定める処置を直ちに取らずに、本規約を遵守するよう要求したり又は本規約に基づく権利の行使をしなかった場合であっても、本規約に基づく権利を放棄しまたは行使の猶予をすることを、何ら意味するものではありません。<br />
  99 + </p>
  100 + <p>
  101 + 第9条 本規約及び本規約等の変更<br />
  102 +  メディアテックは任意に予告なく本規約及びそれ以外の本規約等の各内容を、加除を含め変更する場合があります。お客様が変更を知らなくとも、変更が生じた後に同アプリを使用したことをもって、お客様は変更後の本規約等に同意したものとみなします。なお、お客様は、前条第1項に従い、保有する同アプリの全てのコピーをアンインストール又は削除することで、いつでも同アプリの使用を終了することができます。<br />
  103 + </p>
  104 + <p>
  105 + 第10条 規約の適用等<br />
  106 +  本規約は、アプリ(第一条のとおり将来メディアテックが提供する同アプリのアップデート版等を含みます)に将来にわたり適用されます。但し、将来についてはメディアテックが第9条のとおりに任意に本規約等について加除を含め変更することがあります。<br />
  107 + </p>
  108 +
  109 + </div>
  110 +
  111 + </div>
  112 +</ion-content>
  1 +page-about {
  2 +
  3 +
  4 +}
  1 +import { Component } from '@angular/core';
  2 +import { NavController, NavParams } from 'ionic-angular';
  3 +
  4 +/*
  5 + Generated class for the About page.
  6 +
  7 + See http://ionicframework.com/docs/v2/components/#navigation for more info on
  8 + Ionic pages and navigation.
  9 +*/
  10 +@Component({
  11 + selector: 'page-about',
  12 + templateUrl: 'about.html'
  13 +})
  14 +export class AboutPage {
  15 + about: string = "credit";
  16 +
  17 + constructor(public navCtrl: NavController, public navParams: NavParams) {
  18 +
  19 + }
  20 +
  21 + ionViewDidLoad() {
  22 + console.log('ionViewDidLoad AboutPage');
  23 + }
  24 +
  25 +}
1 -<!--  
2 - Generated template for the Extqa page.  
3 -  
4 - See http://ionicframework.com/docs/v2/components/#navigation for more info on  
5 - Ionic pages and navigation.  
6 --->  
7 -<ion-header>  
8 -  
9 - <ion-navbar color="primary">  
10 - <ion-title>{{title}}</ion-title>  
11 - </ion-navbar>  
12 -  
13 -</ion-header>  
14 -  
15 -  
16 -<ion-content padding class="extqa-page">  
17 -  
18 - <ion-card class="question-card">  
19 - <ion-card-content class="question-content">  
20 - <p>  
21 - 問題 {{qa1.qaId+1}} / 全 {{qaList.length}} 問  
22 - </p>  
23 - <font size="5" [innerHTML] = "qa1.questionString"></font>  
24 -  
25 - <img src="assets/img/extq/{{qa1.questionImage}}" *ngIf="qa1.questionImage != ''" />  
26 -  
27 - </ion-card-content>  
28 - <br /><br />  
29 - <p *ngFor="let choice of qa1.choicesId">  
30 - <button ion-button full color="secondary" (click)="itemSelected(choice)" [outline]="selectstate[choice]" [disabled]="buttonDisabled" large>  
31 - {{qa1.choicesString[choice]}}  
32 - </button>  
33 - </p>  
34 -  
35 - <ion-buttons end padding class="question-button">  
36 - <button ion-button icon-left (click)="openAnswer()" [disabled]="buttonDisabled">  
37 - <ion-icon name="checkmark"></ion-icon>  
38 - 解答  
39 - </button>  
40 - </ion-buttons>  
41 - </ion-card>  
42 -  
43 - <ion-card *ngIf="buttonDisabled" class="answer-card">  
44 - <ion-card-content class="answer-content">  
45 - <ion-grid>  
46 - <ion-row align-items-center>  
47 - <ion-col>  
48 - <img src="assets/img/ok.png" *ngIf="result == '正解'">  
49 - <img src="assets/img/ng.png" *ngIf="result != '正解'">  
50 - </ion-col>  
51 - <ion-col col-auto><font size="5" [innerHTML] = "result" [color]="result != '正解' ? 'blue' : 'red'"></font></ion-col>  
52 - <ion-col></ion-col>  
53 - </ion-row>  
54 - </ion-grid>  
55 -  
56 - <p><br>解答</p>  
57 - <font size="5" [innerHTML] = "qa1.answerString"></font>  
58 - <br /><br />  
59 - <img src="assets/img/exta/{{qa1.answerImage}}" *ngIf="qa1.answerImage != ''" />  
60 - </ion-card-content>  
61 -  
62 - <ion-buttons end padding class="answer-button">  
63 - <button ion-button *ngIf="index < (qaList.length-1)" color="dark" icon-left (click)="goToNext()">  
64 - <ion-icon name="arrow-forward"></ion-icon>  
65 - 次の問題  
66 - </button>  
67 - <button ion-button *ngIf="index >= (qaList.length-1)" color="dark" icon-left (click)="backToUnit()">  
68 - <ion-icon name="done-all"></ion-icon>  
69 - 終了  
70 - </button>  
71 - </ion-buttons>  
72 - </ion-card>  
73 -  
74 -</ion-content>  
1 -page-extqa {  
2 - .extqa-page {  
3 - background-image: url('../assets/img/extqabackground.png');  
4 -  
5 - .button-md {  
6 - text-transform: none;  
7 - }  
8 - }  
9 -}  
1 -import { Component } from '@angular/core';  
2 -import { NavController, NavParams } from 'ionic-angular';  
3 -import { DataService } from '../../providers/data-service';  
4 -import { Qa } from '../../providers/define-qa';  
5 -import { Content } from 'ionic-angular';  
6 -import { ViewChild } from '@angular/core';  
7 -import { Observable } from 'rxjs/Rx';  
8 -  
9 -/*  
10 - Generated class for the Extqa page.  
11 -  
12 - See http://ionicframework.com/docs/v2/components/#navigation for more info on  
13 - Ionic pages and navigation.  
14 -*/  
15 -@Component({  
16 - selector: 'page-extqa',  
17 - templateUrl: 'extqa.html'  
18 -})  
19 -export class ExtqaPage {  
20 - @ViewChild(Content) content: Content;  
21 -  
22 - qaList: Qa[];  
23 - qa1: Qa;  
24 - menuId: number;  
25 - unitId: number;  
26 - index: number;  
27 - title: string;  
28 - buttonDisabled: boolean;  
29 - ds: DataService;  
30 - nv: NavController;  
31 - selected: number;  
32 - result: string;  
33 - selectstate: Array<boolean> = new Array();  
34 - subscription;  
35 - screenHeight:number;  
36 - positiveCnt: number;  
37 -  
38 - constructor(public navCtrl: NavController, public navParams: NavParams, private dataSevice: DataService) {  
39 - this.menuId = navParams.get("menuId");  
40 - this.unitId = navParams.get("unitId");  
41 - this.title = navParams.get("title");  
42 -  
43 - this.index = 0;  
44 - this.qaList = dataSevice.getExtqa(this.menuId, this.unitId);  
45 - this.qa1 = this.qaList[this.index];  
46 - this.buttonDisabled = null;  
47 - this.ds = dataSevice;  
48 - this.nv = navCtrl;  
49 - this.selected = -1;  
50 - this.positiveCnt = 0;  
51 - for (var i = 0; i < this.qa1.choicesId.length; i++) {  
52 - this.selectstate.push(false);  
53 - }  
54 -  
55 - }  
56 -  
57 - ionViewDidLoad() {  
58 - console.log('ionViewDidLoad ExtqaPage');  
59 - }  
60 -  
61 - itemSelected(id: number) {  
62 - for (var i = 0; i < this.qa1.choicesId.length; i++) {  
63 - this.selectstate[i] = false;  
64 - }  
65 - this.selectstate[id] = true;  
66 - this.selected = id;  
67 - this.content.scrollToBottom(300);  
68 - }  
69 -  
70 - openAnswer() {  
71 - if (this.buttonDisabled == null)  
72 - {  
73 - this.result = "解答";  
74 -  
75 - if (this.selected === this.qa1.answerId) { //正解  
76 - this.result = "正解";  
77 - this.positiveCnt++;  
78 - }  
79 - else {  
80 - this.result = "不正解";  
81 - }  
82 -  
83 - this.buttonDisabled = true;  
84 - if (this.index >= (this.qaList.length - 1))  
85 - {  
86 - var key: string;  
87 - var value: string;  
88 - key = this.qa1.menuId + ":" + this.qa1.unitId;  
89 - value = this.positiveCnt + ":" + this.qaList.length;  
90 - this.dataSevice.saveInfo(key, value);  
91 - }  
92 -  
93 - var element = document.getElementsByClassName('question-card');  
94 - this.screenHeight = element[0].clientHeight;  
95 - this.subscription = Observable.timer(300)  
96 - .subscribe(x => {  
97 - this.content.scrollToBottom(300);  
98 - }  
99 - );  
100 - }  
101 - }  
102 -  
103 - goToNext() {  
104 - this.index++;  
105 - this.qa1 = this.qaList[this.index];  
106 - this.buttonDisabled = null;  
107 - this.selected = -1;  
108 - this.selectstate = new Array();  
109 - for (var i = 0; i < this.qa1.choicesId.length; i++) {  
110 - this.selectstate.push(false);  
111 - }  
112 - this.content.scrollToTop(300);  
113 - }  
114 -  
115 - backToUnit() {  
116 - this.nv.pop();  
117 - }  
118 -}  
1 -<!--  
2 - Generated template for the Extunit page.  
3 -  
4 - See http://ionicframework.com/docs/v2/components/#navigation for more info on  
5 - Ionic pages and navigation.  
6 --->  
7 -<ion-header>  
8 -  
9 - <ion-navbar color="primary">  
10 - <ion-title>{{title}}</ion-title>  
11 - </ion-navbar>  
12 -  
13 -</ion-header>  
14 -  
15 -  
16 -<ion-content padding class="extunit-page">  
17 - <ion-card *ngFor="let ptn1 of list1; let i = index;" class="extunit-card">  
18 - <ion-card-header class="unit-card-header">  
19 - 応用{{i+1}}  
20 - </ion-card-header>  
21 -  
22 - <ion-list>  
23 - <ion-item (click)="itemSelected(ptn1)">  
24 - <ion-icon name='ribbon' item-left [color]="list1state[i] != done ? 'secondary' : 'light'"></ion-icon>  
25 - {{ptn1.unitName}}  
26 - <ion-note item-right *ngIf="list1state[i] != done">{{list1state[i]}}</ion-note>  
27 - <ion-note item-right *ngIf="list1state[i] == done">未実施</ion-note>  
28 - </ion-item>  
29 - </ion-list>  
30 - </ion-card>  
31 -  
32 -  
33 -</ion-content>  
1 -page-extunit {  
2 - .extunit-page {  
3 - background-image: url('../assets/img/extunitbackground.png');  
4 -  
5 - .card {  
6 - background: #505050;  
7 - .item {  
8 - background: #505050;  
9 - }  
10 - }  
11 -  
12 - .extunit-card {  
13 - .unit-card-header {  
14 - font-weight: bold;  
15 - color: white  
16 - }  
17 -  
18 - .label {  
19 - color: white  
20 - }  
21 - }  
22 - }  
23 -}  
1 -import { Component } from '@angular/core';  
2 -import { NavController, NavParams } from 'ionic-angular';  
3 -import { ExtqaPage } from '../extqa/extqa';  
4 -import { DataService } from '../../providers/data-service';  
5 -import { Unit } from '../../providers/define-unit';  
6 -  
7 -/*  
8 - Generated class for the Extunit page.  
9 -  
10 - See http://ionicframework.com/docs/v2/components/#navigation for more info on  
11 - Ionic pages and navigation.  
12 -*/  
13 -@Component({  
14 - selector: 'page-extunit',  
15 - templateUrl: 'extunit.html'  
16 -})  
17 -export class ExtunitPage {  
18 - menuId:number;  
19 - allNum: number;  
20 - title: string;  
21 -  
22 - list1: Unit[];  
23 - list1state: Array<String> = new Array();  
24 - list1num: number;  
25 -  
26 - currentItem: Unit;  
27 - positiveCnt: number;  
28 -  
29 - constructor(public navCtrl: NavController, public navParams: NavParams, private dataSevice: DataService) {  
30 - this.menuId = navParams.get("menuId");  
31 - this.title = navParams.get("title");  
32 -  
33 - this.currentItem = null;  
34 -  
35 - this.list1 = dataSevice.getExtUnit(this.menuId);  
36 - this.list1num = this.list1.length;  
37 -  
38 - this.updateStatus();  
39 - }  
40 -  
41 - ionViewDidLoad() {  
42 - console.log('ionViewDidLoad ExtunitPage');  
43 - }  
44 -  
45 - ionViewWillEnter() {  
46 - if(this.currentItem != null)  
47 - {  
48 - var key: string;  
49 - key = this.menuId + ":" + this.currentItem.unitId;  
50 - this.dataSevice.getInfo(key)  
51 - .then(data => {  
52 - this.updateStatus();  
53 - });  
54 - }  
55 - }  
56 -  
57 - ionViewWillLeave(){  
58 - var key: string;  
59 - var value: string;  
60 - key = this.menuId.toString() + "ext";  
61 - value = this.positiveCnt.toString();  
62 - this.dataSevice.savePositiveInfo(key, value);  
63 - }  
64 -  
65 - itemSelected(item: Unit) {  
66 - this.currentItem = item;  
67 - this.navCtrl.push(ExtqaPage,{menuId: this.menuId, unitId: item.unitId, title:item.unitName});  
68 - }  
69 -  
70 - updateStatus()  
71 - {  
72 - var promiseArray1 = new Array();  
73 - for (var i = 0; i < this.list1num; i++) {  
74 - var key: string;  
75 - key = this.menuId + ":" + this.list1[i].unitId;  
76 - promiseArray1.push(this.dataSevice.getInfo(key));  
77 - }  
78 -  
79 - Promise.all(promiseArray1)  
80 - .then(val =>  
81 - {  
82 - for(var i = 0; i< this.list1num; i++)  
83 - {  
84 - this.list1state[i] = val[i];  
85 - if(val[i] != null)  
86 - {  
87 - var svdata = val[i].toString().split(":");  
88 - this.list1state[i] = svdata[1] + "問中" + svdata[0] + "問正解!";  
89 - this.positiveCnt = +svdata[0];  
90 - }  
91 - }  
92 - });  
93 - }  
94 -}  
1 -<!--  
2 - Generated template for the Help page.  
3 -  
4 - See http://ionicframework.com/docs/v2/components/#navigation for more info on  
5 - Ionic pages and navigation.  
6 --->  
7 -<ion-header>  
8 -  
9 - <ion-navbar color="primary">  
10 - <ion-title>学習の進め方</ion-title>  
11 - </ion-navbar>  
12 -  
13 -</ion-header>  
14 -  
15 -  
16 -<ion-content padding>  
17 -  
18 - <ion-slides pager>  
19 - <ion-slide *ngFor="let slide of slides">  
20 -  
21 - <img [src]="slide.image" class="slide-image"/>  
22 - <h2 class="slide-title" [innerHTML]="slide.title"></h2>  
23 - <p class="slide-description" [innerHTML]="slide.description"></p>  
24 - </ion-slide>  
25 -  
26 - </ion-slides>  
27 -  
28 -</ion-content>  
1 -page-help {  
2 -  
3 - .slide-title {  
4 - margin-top: 2.8rem;  
5 - }  
6 -  
7 - .slide-image {  
8 - max-height: 50%;  
9 - max-width: 60%;  
10 - margin: 18px 0;  
11 - }  
12 -  
13 - .slide-description {  
14 - text-align: left  
15 - }  
16 -}  
1 -import { Component } from '@angular/core';  
2 -import { NavController, NavParams } from 'ionic-angular';  
3 -  
4 -/*  
5 - Generated class for the Help page.  
6 -  
7 - See http://ionicframework.com/docs/v2/components/#navigation for more info on  
8 - Ionic pages and navigation.  
9 -*/  
10 -@Component({  
11 - selector: 'page-help',  
12 - templateUrl: 'help.html'  
13 -})  
14 -export class HelpPage {  
15 -  
16 - slides = [  
17 - {  
18 - title: "問題について",  
19 - description: "問題は正解、不正解に関わらず1問挑戦すると次の1問が開きます。",  
20 - image: "assets/img/help/help1.png",  
21 - },  
22 - {  
23 - title: "キーワードについて",  
24 - description: "1問終わるごとに、1文字のキーワードを入手できます。",  
25 - image: "assets/img/help/help2.png",  
26 - },  
27 - {  
28 - title: "次のステージについて",  
29 - description: "すべての問題が終わったら、入手したキーワードを並び替えてひとつの単語を作成してください。正しい単語を入力すると、次のステージが入手できます。",  
30 - image: "assets/img/help/help3.png",  
31 - }  
32 - ];  
33 -  
34 - constructor(public navCtrl: NavController, public navParams: NavParams) {}  
35 -  
36 - ionViewDidLoad() {  
37 - console.log('ionViewDidLoad HelpPage');  
38 - }  
39 -  
40 -}  
@@ -8,6 +8,14 @@ @@ -8,6 +8,14 @@
8 8
9 <ion-navbar color="primary"> 9 <ion-navbar color="primary">
10 <ion-title text-center>Top</ion-title> 10 <ion-title text-center>Top</ion-title>
  11 +
  12 + <ion-buttons end>
  13 + <button ion-button icon-left (click)="gotoAbout()">
  14 + <ion-icon name="information-circle"></ion-icon>
  15 + <div class="menu-header">About</div>
  16 + </button>
  17 + </ion-buttons>
  18 +
11 </ion-navbar> 19 </ion-navbar>
12 20
13 </ion-header> 21 </ion-header>
@@ -16,20 +24,19 @@ @@ -16,20 +24,19 @@
16 <ion-content padding class="top-menu-page"> 24 <ion-content padding class="top-menu-page">
17 <ion-card class="title"> 25 <ion-card class="title">
18 <img src="assets/img/menuTitle.png"/> 26 <img src="assets/img/menuTitle.png"/>
19 - <div class="card-title">中学問題集</div>  
20 - <div class="card-subtitle">理科</div>  
21 </ion-card> 27 </ion-card>
22 28
23 - <button ion-button full large>1・2年生の復習</button>  
24 -  
25 <ion-buttons end> 29 <ion-buttons end>
26 - <button ion-button center color="danger" round (click)="gotoStatus()" icon-left> 30 + <button ion-button center color="primary" round (click)="gotoStatus()" icon-left>
27 <ion-icon name="stats"></ion-icon>達成状況を確認 31 <ion-icon name="stats"></ion-icon>達成状況を確認
28 </button> 32 </button>
29 </ion-buttons> 33 </ion-buttons>
30 34
31 - <p *ngFor="let item_f of list_f">  
32 - <button ion-button color="light" block round (click)="itemSelected(item_f)">{{item_f.title}}</button> 35 + <p *ngFor="let item_f of list_f; let i = index;">
  36 + <button ion-button icon-left [color]="list1state[i] != done ? 'danger' : 'light'" block round (click)="itemSelected(item_f)">
  37 + <ion-icon name="trophy" class="done-icon" *ngIf="list1state[i] != done"></ion-icon>
  38 + {{item_f.title}}
  39 + </button>
33 </p> 40 </p>
34 41
35 <!-- 42 <!--
1 page-menu { 1 page-menu {
  2 + .menu-header{
  3 + text-transform: none;
  4 + }
  5 +
2 .top-menu-page { 6 .top-menu-page {
3 background-image: url('../assets/img/background.png'); 7 background-image: url('../assets/img/background.png');
4 background-size: cover; 8 background-size: cover;
5 - 9 +
6 .title{ 10 .title{
7 position: relative; 11 position: relative;
8 text-align: center; 12 text-align: center;
@@ -25,5 +29,9 @@ page-menu { @@ -25,5 +29,9 @@ page-menu {
25 } 29 }
26 30
27 } 31 }
  32 +
  33 + .done-icon{
  34 + color : yellow;
  35 + }
28 } 36 }
29 } 37 }
@@ -4,6 +4,7 @@ import { DataService } from '../../providers/data-service'; @@ -4,6 +4,7 @@ import { DataService } from '../../providers/data-service';
4 import { Menu } from '../../providers/define-menu'; 4 import { Menu } from '../../providers/define-menu';
5 import { UnitPage } from '../unit/unit'; 5 import { UnitPage } from '../unit/unit';
6 import { StatusPage } from '../status/status'; 6 import { StatusPage } from '../status/status';
  7 +import { AboutPage } from '../about/about';
7 8
8 /* 9 /*
9 Generated class for the Menu page. 10 Generated class for the Menu page.
@@ -17,26 +18,63 @@ import { StatusPage } from '../status/status'; @@ -17,26 +18,63 @@ import { StatusPage } from '../status/status';
17 }) 18 })
18 export class MenuPage { 19 export class MenuPage {
19 list_f: Menu[]; 20 list_f: Menu[];
20 - list_s: Menu[];  
21 - list_t: Menu[]; 21 +
  22 + list1state: Array<String> = new Array();
22 23
23 constructor(public navCtrl: NavController, private dataSevice: DataService) { 24 constructor(public navCtrl: NavController, private dataSevice: DataService) {
24 this.list_f = dataSevice.getMenuFirst(); 25 this.list_f = dataSevice.getMenuFirst();
25 -  
26 - this.list_s = dataSevice.getMenuSecond();  
27 -  
28 - this.list_t = dataSevice.getMenuThird();  
29 } 26 }
30 27
31 ionViewDidLoad() { 28 ionViewDidLoad() {
32 console.log('ionViewDidLoad MenuPage'); 29 console.log('ionViewDidLoad MenuPage');
33 } 30 }
34 31
35 - itemSelected(item: Menu) {  
36 - this.navCtrl.push(UnitPage, {menuId: item.menuId, title:item.title}); 32 + ionViewWillEnter() {
  33 + this.getChartData();
  34 + }
  35 +
  36 + getChartData() {
  37 +
  38 + var promiseArray1 = new Array();
  39 + for (var i = 0; i < this.list_f.length; i++) {
  40 + var key: string;
  41 + key = this.list_f[i].menuId.toString();
  42 + promiseArray1.push(this.dataSevice.getInfo(key));
37 } 43 }
38 44
39 - gotoStatus() {  
40 - this.navCtrl.push(StatusPage); 45 + Promise.all(promiseArray1)
  46 + .then(val =>
  47 + {
  48 + for(var i = 0; i< this.list_f.length; i++)
  49 + {
  50 + var num: number;
  51 + if(val[i] == null)
  52 + {
  53 + num = 0;
  54 + }
  55 + else
  56 + {
  57 + num = +val[i];
  58 + }
  59 +
  60 + if(this.dataSevice.getQaCnt(this.list_f[i].menuId) == num)
  61 + {
  62 + this.list1state[i] = "done";
  63 + }
  64 + }
  65 +
  66 + });
  67 + }
  68 +
  69 + itemSelected(item: Menu) {
  70 + this.navCtrl.push(UnitPage, {menuId: item.menuId, title:item.title});
  71 + }
  72 +
  73 + gotoStatus() {
  74 + this.navCtrl.push(StatusPage);
  75 + }
  76 +
  77 + gotoAbout() {
  78 + this.navCtrl.push(AboutPage);
41 } 79 }
42 } 80 }
@@ -7,6 +7,14 @@ @@ -7,6 +7,14 @@
7 <ion-header> 7 <ion-header>
8 <ion-navbar color="primary"> 8 <ion-navbar color="primary">
9 <ion-title>{{title}}</ion-title> 9 <ion-title>{{title}}</ion-title>
  10 +
  11 + <ion-buttons end>
  12 + <button ion-button icon-left (click)="backToTop()">
  13 + <ion-icon name="home"></ion-icon>
  14 + <div class="qa-header">Topへ</div>
  15 + </button>
  16 + </ion-buttons>
  17 +
10 </ion-navbar> 18 </ion-navbar>
11 </ion-header> 19 </ion-header>
12 20
@@ -14,9 +22,9 @@ @@ -14,9 +22,9 @@
14 <ion-card class="question-card"> 22 <ion-card class="question-card">
15 <ion-card-content class="question-content"> 23 <ion-card-content class="question-content">
16 <p> 24 <p>
17 - 問題 {{qa1.qaId+1}} / 全 {{qaList.length}} 問  
18 - </p>  
19 - <font size="5" [innerHTML] = "qa1.questionString"></font> 25 + 問題 {{index+1}} / 全 {{qaList.length}} 問
  26 + </p><br />
  27 + <font size=4 [innerHTML] = "qa1.questionString"></font>
20 28
21 <img src="assets/img/q/{{qa1.questionImage}}" *ngIf="qa1.questionImage != ''" /> 29 <img src="assets/img/q/{{qa1.questionImage}}" *ngIf="qa1.questionImage != ''" />
22 30
@@ -30,8 +38,8 @@ @@ -30,8 +38,8 @@
30 38
31 <ion-buttons end padding class="question-button"> 39 <ion-buttons end padding class="question-button">
32 <button ion-button icon-left (click)="openAnswer()" [disabled]="buttonDisabled"> 40 <button ion-button icon-left (click)="openAnswer()" [disabled]="buttonDisabled">
33 - <ion-icon name="checkmark"></ion-icon>  
34 - 解答 41 + <ion-icon name="redo"></ion-icon>
  42 + 解説へ
35 </button> 43 </button>
36 </ion-buttons> 44 </ion-buttons>
37 </ion-card> 45 </ion-card>
@@ -44,14 +52,14 @@ @@ -44,14 +52,14 @@
44 <img src="assets/img/ok.png" *ngIf="result == '正解'"> 52 <img src="assets/img/ok.png" *ngIf="result == '正解'">
45 <img src="assets/img/ng.png" *ngIf="result != '正解'"> 53 <img src="assets/img/ng.png" *ngIf="result != '正解'">
46 </ion-col> 54 </ion-col>
47 - <ion-col col-auto><font size="5" [innerHTML] = "result" [color]="result != '正解' ? 'blue' : 'red'"></font></ion-col> 55 + <ion-col col-auto><font size=5 [innerHTML] = "result" [color]="result != '正解' ? 'blue' : 'red'"></font></ion-col>
48 <ion-col> 56 <ion-col>
49 </ion-col> 57 </ion-col>
50 </ion-row> 58 </ion-row>
51 </ion-grid> 59 </ion-grid>
52 60
53 <p><br>解答</p> 61 <p><br>解答</p>
54 - <font size="5" [innerHTML] = "qa1.answerString"></font> 62 + <font size=4 [innerHTML] = "qa1.answerString"></font>
55 <br /><br /> 63 <br /><br />
56 <img src="assets/img/a/{{qa1.answerImage}}" *ngIf="qa1.answerImage != ''" /> 64 <img src="assets/img/a/{{qa1.answerImage}}" *ngIf="qa1.answerImage != ''" />
57 </ion-card-content> 65 </ion-card-content>
@@ -68,3 +76,20 @@ @@ -68,3 +76,20 @@
68 </ion-buttons> 76 </ion-buttons>
69 </ion-card> 77 </ion-card>
70 </ion-content> 78 </ion-content>
  79 +
  80 +<ion-footer>
  81 + <ion-toolbar color="primary">
  82 +
  83 + <ion-buttons >
  84 + <button ion-button icon-only (click)="goToPrev()" *ngIf="index > 0">
  85 + <ion-icon name="skip-backward"></ion-icon>
  86 + </button>
  87 + </ion-buttons>
  88 + <ion-buttons end>
  89 + <button ion-button icon-only (click)="goToNext()" *ngIf="index < (qaList.length-1)">
  90 + <ion-icon name="skip-forward"></ion-icon>
  91 + </button>
  92 + </ion-buttons>
  93 +
  94 + </ion-toolbar>
  95 +</ion-footer>
1 page-qa { 1 page-qa {
  2 + .qa-header{
  3 + text-transform: none;
  4 + }
2 .qa-page { 5 .qa-page {
3 background-image: url('../assets/img/qabackground.png'); 6 background-image: url('../assets/img/qabackground.png');
4 7
@@ -67,7 +67,8 @@ export class QaPage { @@ -67,7 +67,8 @@ export class QaPage {
67 } 67 }
68 this.selectstate[id] = true; 68 this.selectstate[id] = true;
69 this.selected = id; 69 this.selected = id;
70 - this.content.scrollToBottom(300); 70 +// this.content.scrollToBottom(300);
  71 + this.openAnswer();
71 } 72 }
72 73
73 openAnswer() { 74 openAnswer() {
@@ -104,19 +105,40 @@ export class QaPage { @@ -104,19 +105,40 @@ export class QaPage {
104 } 105 }
105 106
106 goToNext() { 107 goToNext() {
107 - this.index++;  
108 - this.buttonDisabled = null;  
109 - this.selected = -1;  
110 - this.qa1 = this.qaList[this.index];  
111 - this.selectstate = new Array();  
112 - for (var i = 0; i < this.qa1.choicesId.length; i++) {  
113 - this.selectstate.push(false); 108 + if(this.index < this.qaList.length-1)
  109 + {
  110 + this.index++;
  111 + this.buttonDisabled = null;
  112 + this.selected = -1;
  113 + this.qa1 = this.qaList[this.index];
  114 + this.selectstate = new Array();
  115 + for (var i = 0; i < this.qa1.choicesId.length; i++) {
  116 + this.selectstate.push(false);
  117 + }
  118 + this.content.scrollToTop(300);
114 } 119 }
115 - this.content.scrollToTop(300); 120 + }
116 121
  122 + goToPrev() {
  123 + if(this.index > 0)
  124 + {
  125 + this.index--;
  126 + this.buttonDisabled = null;
  127 + this.selected = -1;
  128 + this.qa1 = this.qaList[this.index];
  129 + this.selectstate = new Array();
  130 + for (var i = 0; i < this.qa1.choicesId.length; i++) {
  131 + this.selectstate.push(false);
  132 + }
  133 + this.content.scrollToTop(300);
  134 + }
117 } 135 }
118 136
119 backToUnit() { 137 backToUnit() {
120 this.nv.pop(); 138 this.nv.pop();
121 } 139 }
  140 +
  141 + backToTop() {
  142 + this.nv.popToRoot();
  143 + }
122 } 144 }
@@ -15,55 +15,55 @@ @@ -15,55 +15,55 @@
15 <ion-item-divider color="light">> 15 <ion-item-divider color="light">>
16 {{list_f[0].title}} 16 {{list_f[0].title}}
17 </ion-item-divider> 17 </ion-item-divider>
18 - <canvas #baseChart0 height="120" class="status-canvas"></canvas> 18 + <canvas #baseChart0 height="70" class="status-canvas"></canvas>
19 </ion-item-group> 19 </ion-item-group>
20 20
21 <ion-item-group> 21 <ion-item-group>
22 <ion-item-divider color="light">> 22 <ion-item-divider color="light">>
23 {{list_f[1].title}} 23 {{list_f[1].title}}
24 </ion-item-divider> 24 </ion-item-divider>
25 - <canvas #baseChart1 height="120" class="status-canvas"></canvas> 25 + <canvas #baseChart1 height="70" class="status-canvas"></canvas>
26 </ion-item-group> 26 </ion-item-group>
27 27
28 <ion-item-group> 28 <ion-item-group>
29 <ion-item-divider color="light">> 29 <ion-item-divider color="light">>
30 {{list_f[2].title}} 30 {{list_f[2].title}}
31 </ion-item-divider> 31 </ion-item-divider>
32 - <canvas #baseChart2 height="120" class="status-canvas"></canvas> 32 + <canvas #baseChart2 height="70" class="status-canvas"></canvas>
33 </ion-item-group> 33 </ion-item-group>
34 34
35 <ion-item-group> 35 <ion-item-group>
36 <ion-item-divider color="light">> 36 <ion-item-divider color="light">>
37 {{list_f[3].title}} 37 {{list_f[3].title}}
38 </ion-item-divider> 38 </ion-item-divider>
39 - <canvas #baseChart3 height="120" class="status-canvas"></canvas> 39 + <canvas #baseChart3 height="70" class="status-canvas"></canvas>
40 </ion-item-group> 40 </ion-item-group>
41 41
42 <ion-item-group> 42 <ion-item-group>
43 <ion-item-divider color="light">> 43 <ion-item-divider color="light">>
44 {{list_f[4].title}} 44 {{list_f[4].title}}
45 </ion-item-divider> 45 </ion-item-divider>
46 - <canvas #baseChart4 height="120" class="status-canvas"></canvas> 46 + <canvas #baseChart4 height="70" class="status-canvas"></canvas>
47 </ion-item-group> 47 </ion-item-group>
48 48
49 <ion-item-group> 49 <ion-item-group>
50 <ion-item-divider color="light">> 50 <ion-item-divider color="light">>
51 {{list_f[5].title}} 51 {{list_f[5].title}}
52 </ion-item-divider> 52 </ion-item-divider>
53 - <canvas #baseChart5 height="120" class="status-canvas"></canvas> 53 + <canvas #baseChart5 height="70" class="status-canvas"></canvas>
54 </ion-item-group> 54 </ion-item-group>
55 55
56 <ion-item-group> 56 <ion-item-group>
57 <ion-item-divider color="light">> 57 <ion-item-divider color="light">>
58 {{list_f[6].title}} 58 {{list_f[6].title}}
59 </ion-item-divider> 59 </ion-item-divider>
60 - <canvas #baseChart6 height="120" class="status-canvas"></canvas> 60 + <canvas #baseChart6 height="70" class="status-canvas"></canvas>
61 </ion-item-group> 61 </ion-item-group>
62 62
63 <ion-item-group> 63 <ion-item-group>
64 <ion-item-divider color="light">> 64 <ion-item-divider color="light">>
65 {{list_f[7].title}} 65 {{list_f[7].title}}
66 </ion-item-divider> 66 </ion-item-divider>
67 - <canvas #baseChart7 height="120" class="status-canvas"></canvas> 67 + <canvas #baseChart7 height="70" class="status-canvas"></canvas>
68 </ion-item-group> 68 </ion-item-group>
69 </ion-content> 69 </ion-content>
@@ -72,9 +72,7 @@ export class StatusPage { @@ -72,9 +72,7 @@ export class StatusPage {
72 72
73 this.list_f = dataSevice.getMenuFirst(); 73 this.list_f = dataSevice.getMenuFirst();
74 74
75 -//   this.chartLabels.push("");  
76 -   this.chartLabels.push("基礎");  
77 -   this.chartLabels.push("応用"); 75 +   this.chartLabels.push("");
78 76
79 this.getChartData(); 77 this.getChartData();
80 } 78 }
@@ -103,23 +101,20 @@ export class StatusPage { @@ -103,23 +101,20 @@ export class StatusPage {
103 var key: string; 101 var key: string;
104 key = this.list_f[i].menuId.toString(); 102 key = this.list_f[i].menuId.toString();
105 promiseArray1.push(this.dataSevice.getInfo(key)); 103 promiseArray1.push(this.dataSevice.getInfo(key));
106 - promiseArray1.push(this.dataSevice.getInfo(key+"ext"));  
107 } 104 }
108 105
109 Promise.all(promiseArray1) 106 Promise.all(promiseArray1)
110 .then(val => 107 .then(val =>
111 { 108 {
112 - for(var i = 0; i< (this.list_f.length * 2); i++) 109 + for(var i = 0; i< this.list_f.length; i++)
113 { 110 {
114 var cdata: ChartData = { label:'正答率', 111 var cdata: ChartData = { label:'正答率',
115 data: new Array(), 112 data: new Array(),
116 - backgroundColor:['rgba(255, 99, 132, 0.2)','rgba(255, 159, 64, 0.2)'],  
117 - borderColor:['rgba(255,99,132,1)','rgba(255, 159, 64, 1)'], 113 + backgroundColor:['rgba(255, 99, 132, 0.2)'],
  114 + borderColor:['rgba(255,99,132,1)'],
118 borderWidth:2 }; 115 borderWidth:2 };
119 var num: number; 116 var num: number;
120 var score: number; 117 var score: number;
121 - var numext: number;  
122 - var scoreext: number;  
123 if(val[i] == null) 118 if(val[i] == null)
124 { 119 {
125 num = 0; 120 num = 0;
@@ -128,25 +123,14 @@ export class StatusPage { @@ -128,25 +123,14 @@ export class StatusPage {
128 { 123 {
129 num = +val[i]; 124 num = +val[i];
130 } 125 }
131 - if(val[i+1] == null)  
132 - {  
133 - numext = 0;  
134 - }  
135 - else  
136 - {  
137 - numext = +val[i+1];  
138 - }  
139 - score = Math.floor((num / this.dataSevice.getQaCnt(this.list_f[i / 2].menuId)) * 100); 126 + score = Math.floor((num / this.dataSevice.getQaCnt(this.list_f[i].menuId)) * 100);
140 // score = 10*i + 10; 127 // score = 10*i + 10;
141 - scoreext = Math.floor((numext / this.dataSevice.getExtQaCnt(this.list_f[i / 2].menuId)) * 100);  
142 cdata.data.push(score); 128 cdata.data.push(score);
143 - cdata.data.push(scoreext);  
144 129
145 this.chartData = new Array(); 130 this.chartData = new Array();
146 this.chartData.push(cdata); 131 this.chartData.push(cdata);
147 - this.getChart(this.getCanvas(i / 2).nativeElement); 132 + this.getChart(this.getCanvas(i).nativeElement);
148 133
149 - i++;  
150 } 134 }
151 135
152 }); 136 });
@@ -15,222 +15,16 @@ @@ -15,222 +15,16 @@
15 15
16 <ion-content padding class="unit-page"> 16 <ion-content padding class="unit-page">
17 17
18 - <ion-row>  
19 - <ion-col>  
20 - <ion-buttons start>  
21 - <button ion-button icon-left (click) ="gotoHelp()">  
22 - <ion-icon name="help-circle"></ion-icon>  
23 - 進め方  
24 - </button>  
25 - </ion-buttons>  
26 - </ion-col>  
27 -  
28 - <ion-col>  
29 - <ion-buttons end>  
30 - <button ion-button icon-left (click)="inputKey()" *ngIf="isOpenNext == false">  
31 - <ion-icon name="lock"></ion-icon>  
32 - 次のステージへ  
33 - </button>  
34 - <button ion-button icon-left color="danger" (click)="nextStage()" *ngIf="isOpenNext">  
35 - <ion-icon name="unlock"></ion-icon>  
36 - 次のステージへ  
37 - </button>  
38 - </ion-buttons>  
39 - </ion-col>  
40 - </ion-row>  
41 -  
42 - <ion-card class="unit-card">  
43 - <ion-card-header class="unit-card-header">  
44 - 学習1  
45 - </ion-card-header>  
46 -  
47 - <ion-fab right top>  
48 - <button ion-fab color="danger" >  
49 - <ion-icon *ngIf="openkeyword1" name="bowtie"></ion-icon>  
50 - <ion-icon *ngIf="openkeyword1 == false" name="key"></ion-icon>  
51 - </button>  
52 - <ion-fab-list side="left">  
53 - <button ion-fab *ngIf="openkeyword1"><b>{{keyword.words[0]}}</b></button>  
54 - <button ion-fab *ngIf="openkeyword1 == false"><ion-icon name="help"></ion-icon></button>  
55 - </ion-fab-list>  
56 - </ion-fab>  
57 -  
58 - <ion-list class="unit-list" padding>  
59 - <ion-item *ngFor="let ptn1 of list1; let i = index;" (click)="itemSelected(ptn1)">  
60 - <ion-icon name='ribbon' item-left [color]="list1state[i] != null ? 'secondary' : 'light'"></ion-icon>  
61 - {{ptn1.unitName}}  
62 - <ion-note item-right *ngIf="list1state[i] != null">{{list1state[i]}}</ion-note>  
63 - <ion-note item-right *ngIf="list1state[i] == null">未実施</ion-note>  
64 - </ion-item>  
65 - </ion-list>  
66 - </ion-card>  
67 -  
68 - <ion-card class="unit-card">  
69 - <ion-card-header class="unit-card-header">  
70 - 学習2  
71 - </ion-card-header>  
72 -  
73 - <img src="assets/img/unitdisable.png" *ngIf="list2dsp == false"/>  
74 -  
75 - <ion-fab right top *ngIf="list2dsp">  
76 - <button ion-fab color="danger">  
77 - <ion-icon *ngIf="openkeyword2" name="bowtie"></ion-icon>  
78 - <ion-icon *ngIf="openkeyword2 == false" name="key"></ion-icon>  
79 - </button>  
80 - <ion-fab-list side="left">  
81 - <button ion-fab *ngIf="openkeyword2"><b>{{keyword.words[1]}}</b></button>  
82 - <button ion-fab *ngIf="openkeyword2 == false"><ion-icon name="help"></ion-icon></button>  
83 - </ion-fab-list>  
84 - </ion-fab>  
85 -  
86 - <ion-list class="unit-list" *ngIf="list2dsp" padding>  
87 - <ion-item *ngFor="let ptn2 of list2; let i = index;" (click)="itemSelected(ptn2)">  
88 - <ion-icon name='ribbon' item-left [color]="list2state[i] != null ? 'secondary' : 'light'"></ion-icon>  
89 - {{ptn2.unitName}}  
90 - <ion-note item-right *ngIf="list2state[i] != null">{{list2state[i]}}</ion-note>  
91 - <ion-note item-right *ngIf="list2state[i] == null">未実施</ion-note>  
92 - </ion-item>  
93 - </ion-list>  
94 - </ion-card>  
95 -  
96 - <ion-card class="unit-card">  
97 - <ion-card-header class="unit-card-header">  
98 - 学習3  
99 - </ion-card-header>  
100 -  
101 - <img src="assets/img/unitdisable.png" *ngIf="list3dsp == false"/>  
102 -  
103 - <ion-fab right top *ngIf="list3dsp">  
104 - <button ion-fab color="danger">  
105 - <ion-icon *ngIf="openkeyword3" name="bowtie"></ion-icon>  
106 - <ion-icon *ngIf="openkeyword3 == false" name="key"></ion-icon>  
107 - </button>  
108 - <ion-fab-list side="left">  
109 - <button ion-fab *ngIf="openkeyword3"><b>{{keyword.words[2]}}</b></button>  
110 - <button ion-fab *ngIf="openkeyword3 == false"><ion-icon name="help"></ion-icon></button>  
111 - </ion-fab-list>  
112 - </ion-fab>  
113 -  
114 - <ion-list class="unit-list" *ngIf="list3dsp" padding>  
115 - <ion-item *ngFor="let ptn3 of list3; let i = index;" (click)="itemSelected(ptn3)">  
116 - <ion-icon name='ribbon' item-left [color]="list3state[i] != null ? 'secondary' : 'light'"></ion-icon>  
117 - {{ptn3.unitName}}  
118 - <ion-note item-right *ngIf="list3state[i] != null">{{list3state[i]}}</ion-note>  
119 - <ion-note item-right *ngIf="list3state[i] == null">未実施</ion-note>  
120 - </ion-item>  
121 - </ion-list>  
122 - </ion-card>  
123 -  
124 - <ion-card class="unit-card">  
125 - <ion-card-header class="unit-card-header">  
126 - 学習4  
127 - </ion-card-header>  
128 -  
129 - <img src="assets/img/unitdisable.png" *ngIf="list4dsp == false"/>  
130 -  
131 - <ion-fab right top *ngIf="list4dsp">  
132 - <button ion-fab color="danger">  
133 - <ion-icon *ngIf="openkeyword4" name="bowtie"></ion-icon>  
134 - <ion-icon *ngIf="openkeyword4 == false" name="key"></ion-icon>  
135 - </button>  
136 - <ion-fab-list side="left">  
137 - <button ion-fab *ngIf="openkeyword4"><b>{{keyword.words[3]}}</b></button>  
138 - <button ion-fab *ngIf="openkeyword4 == false"><ion-icon name="help"></ion-icon></button>  
139 - </ion-fab-list>  
140 - </ion-fab>  
141 -  
142 - <ion-list class="unit-list" *ngIf="list4dsp" padding>  
143 - <ion-item *ngFor="let ptn4 of list4; let i = index;" (click)="itemSelected(ptn4)">  
144 - <ion-icon name='ribbon' item-left [color]="list4state[i] != null ? 'secondary' : 'light'"></ion-icon>  
145 - {{ptn4.unitName}}  
146 - <ion-note item-right *ngIf="list4state[i] != null">{{list4state[i]}}</ion-note>  
147 - <ion-note item-right *ngIf="list4state[i] == null">未実施</ion-note>  
148 - </ion-item>  
149 - </ion-list>  
150 - </ion-card>  
151 -  
152 - <ion-card class="unit-card">  
153 - <ion-card-header class="unit-card-header">  
154 - 学習5  
155 - </ion-card-header>  
156 -  
157 - <img src="assets/img/unitdisable.png" *ngIf="list5dsp == false"/>  
158 -  
159 - <ion-fab right top *ngIf="list5dsp">  
160 - <button ion-fab color="danger">  
161 - <ion-icon *ngIf="openkeyword5" name="bowtie"></ion-icon>  
162 - <ion-icon *ngIf="openkeyword5 == false" name="key"></ion-icon>  
163 - </button>  
164 - <ion-fab-list side="left">  
165 - <button ion-fab *ngIf="openkeyword5"><b>{{keyword.words[4]}}</b></button>  
166 - <button ion-fab *ngIf="openkeyword5 == false"><ion-icon name="help"></ion-icon></button>  
167 - </ion-fab-list>  
168 - </ion-fab>  
169 -  
170 - <ion-list class="unit-list" *ngIf="list5dsp" padding>  
171 - <ion-item *ngFor="let ptn5 of list5; let i = index;" (click)="itemSelected(ptn5)">  
172 - <ion-icon name='ribbon' item-left [color]="list5state[i] != null ? 'secondary' : 'light'"></ion-icon>  
173 - {{ptn5.unitName}}  
174 - <ion-note item-right *ngIf="list5state[i] != null">{{list5state[i]}}</ion-note>  
175 - <ion-note item-right *ngIf="list5state[i] == null">未実施</ion-note>  
176 - </ion-item>  
177 - </ion-list>  
178 - </ion-card>  
179 -  
180 - <ion-card class="unit-card" *ngIf="isList6exist">  
181 - <ion-card-header class="unit-card-header">  
182 - 学習6  
183 - </ion-card-header>  
184 -  
185 - <img src="assets/img/unitdisable.png" *ngIf="list6dsp == false"/>  
186 -  
187 - <ion-fab right top *ngIf="list6dsp">  
188 - <button ion-fab color="danger">  
189 - <ion-icon *ngIf="openkeyword6" name="bowtie"></ion-icon>  
190 - <ion-icon *ngIf="openkeyword6 == false" name="key"></ion-icon>  
191 - </button>  
192 - <ion-fab-list side="left">  
193 - <button ion-fab *ngIf="openkeyword6"><b>{{keyword.words[5]}}</b></button>  
194 - <button ion-fab *ngIf="openkeyword6 == false"><ion-icon name="help"></ion-icon></button>  
195 - </ion-fab-list>  
196 - </ion-fab>  
197 -  
198 - <ion-list class="unit-list" *ngIf="list6dsp" padding>  
199 - <ion-item *ngFor="let ptn6 of list6; let i = index;" (click)="itemSelected(ptn6)">  
200 - <ion-icon name='ribbon' item-left [color]="list6state[i] != null ? 'secondary' : 'light'"></ion-icon>  
201 - {{ptn6.unitName}}  
202 - <ion-note item-right *ngIf="list6state[i] != null">{{list6state[i]}}</ion-note>  
203 - <ion-note item-right *ngIf="list6state[i] == null">未実施</ion-note>  
204 - </ion-item>  
205 - </ion-list>  
206 - </ion-card>  
207 -  
208 - <ion-card class="unit-card" *ngIf="isList7exist">  
209 - <ion-card-header class="unit-card-header">  
210 - 学習7  
211 - </ion-card-header>  
212 -  
213 - <img src="assets/img/unitdisable.png" *ngIf="list7dsp == false"/>  
214 -  
215 - <ion-fab right top *ngIf="list7dsp">  
216 - <button ion-fab color="danger">  
217 - <ion-icon *ngIf="openkeyword7" name="bowtie"></ion-icon>  
218 - <ion-icon *ngIf="openkeyword7 == false" name="key"></ion-icon>  
219 - </button>  
220 - <ion-fab-list side="left">  
221 - <button ion-fab *ngIf="openkeyword7"><b>{{keyword.words[6]}}</b></button>  
222 - <button ion-fab *ngIf="openkeyword7 == false"><ion-icon name="help"></ion-icon></button>  
223 - </ion-fab-list>  
224 - </ion-fab>  
225 -  
226 - <ion-list class="unit-list" *ngIf="list7dsp" padding>  
227 - <ion-item *ngFor="let ptn7 of list7; let i = index;" (click)="itemSelected(ptn7)">  
228 - <ion-icon name='ribbon' item-left [color]="list7state[i] != null ? 'secondary' : 'light'"></ion-icon>  
229 - {{ptn7.unitName}}  
230 - <ion-note item-right *ngIf="list7state[i] != null">{{list7state[i]}}</ion-note>  
231 - <ion-note item-right *ngIf="list7state[i] == null">未実施</ion-note>  
232 - </ion-item>  
233 - </ion-list>  
234 - </ion-card> 18 + <ion-card *ngFor="let ptn1 of list1; let i = index;" class="unit-card" (click)="itemSelected(ptn1)">
  19 + <h2 padding class="unit-card-header">
  20 + 学習{{i+1}}
  21 + </h2>
  22 + <ion-item>
  23 + <ion-icon name='ribbon' item-left [color]="list1state[i] != done ? 'secondary' : 'dark'" large></ion-icon>
  24 + <h2 padding>{{ptn1.unitName}}</h2>
  25 + <p *ngIf="list1state[i] != done">{{list1state[i]}}</p>
  26 + <p *ngIf="list1state[i] == done">未実施</p>
  27 + </ion-item>
  28 + </ion-card>
235 29
236 </ion-content> 30 </ion-content>
@@ -3,21 +3,28 @@ page-unit { @@ -3,21 +3,28 @@ page-unit {
3 background-image: url('../assets/img/unitbackground.png'); 3 background-image: url('../assets/img/unitbackground.png');
4 4
5 .card { 5 .card {
6 - background: #076B31; 6 + background: #EEE;
7 .item { 7 .item {
8 - background: #076B31; 8 + background: #EEE;
9 } 9 }
10 } 10 }
11 .unit-card{ 11 .unit-card{
12 - position: relative;  
13 12
14 .unit-card-header { 13 .unit-card-header {
15 font-weight: bold; 14 font-weight: bold;
16 - color: white 15 + color: black
17 } 16 }
18 17
19 .label { 18 .label {
20 - color: white 19 + color: black
  20 + }
  21 +
  22 + h2 {
  23 + color: black
  24 + }
  25 +
  26 + p {
  27 + color: #808080
21 } 28 }
22 29
23 } 30 }
@@ -2,12 +2,7 @@ import { Component } from '@angular/core'; @@ -2,12 +2,7 @@ import { Component } from '@angular/core';
2 import { NavController, NavParams } from 'ionic-angular'; 2 import { NavController, NavParams } from 'ionic-angular';
3 import { DataService } from '../../providers/data-service'; 3 import { DataService } from '../../providers/data-service';
4 import { Unit } from '../../providers/define-unit'; 4 import { Unit } from '../../providers/define-unit';
5 -import { Keyword } from '../../providers/define-keyword';  
6 import { QaPage } from '../qa/qa'; 5 import { QaPage } from '../qa/qa';
7 -import { ExtunitPage } from '../extunit/extunit';  
8 -import { HelpPage } from '../help/help';  
9 -import { AlertController } from 'ionic-angular';  
10 -import { ToastController } from 'ionic-angular';  
11 6
12 /* 7 /*
13 Generated class for the Unit page. 8 Generated class for the Unit page.
@@ -25,156 +20,23 @@ export class UnitPage { @@ -25,156 +20,23 @@ export class UnitPage {
25 title:string; 20 title:string;
26 21
27 list1: Unit[]; 22 list1: Unit[];
28 - list2: Unit[];  
29 - list3: Unit[];  
30 - list4: Unit[];  
31 - list5: Unit[];  
32 - list6: Unit[];  
33 - list7: Unit[];  
34 -  
35 - list2dsp: boolean;  
36 - list3dsp: boolean;  
37 - list4dsp: boolean;  
38 - list5dsp: boolean;  
39 - list6dsp: boolean;  
40 - list7dsp: boolean;  
41 - isList6exist: boolean;  
42 - isList7exist: boolean;  
43 -  
44 list1state: Array<String> = new Array(); 23 list1state: Array<String> = new Array();
45 - list2state: Array<String> = new Array();  
46 - list3state: Array<String> = new Array();  
47 - list4state: Array<String> = new Array();  
48 - list5state: Array<String> = new Array();  
49 - list6state: Array<String> = new Array();  
50 - list7state: Array<String> = new Array();  
51 -  
52 list1num: number; 24 list1num: number;
53 - list2num: number;  
54 - list3num: number;  
55 - list4num: number;  
56 - list5num: number;  
57 - list6num: number;  
58 - list7num: number;  
59 -  
60 - keyword: Keyword;  
61 - openkeyword1: boolean;  
62 - openkeyword2: boolean;  
63 - openkeyword3: boolean;  
64 - openkeyword4: boolean;  
65 - openkeyword5: boolean;  
66 - openkeyword6: boolean;  
67 - openkeyword7: boolean;  
68 -  
69 - isOpenNext:boolean;  
70 25
71 currentItem: Unit; 26 currentItem: Unit;
  27 + positiveCnt: number;
72 28
73 - stageStateKey: string;  
74 -  
75 - positiveCnt1: number;  
76 - positiveCnt2: number;  
77 - positiveCnt3: number;  
78 - positiveCnt4: number;  
79 - positiveCnt5: number;  
80 - positiveCnt6: number;  
81 - positiveCnt7: number;  
82 -  
83 - constructor(public navCtrl: NavController, private navParams: NavParams,  
84 - public alertCtrl: AlertController, public toastCtrl: ToastController, private dataSevice: DataService) {  
85 -  
86 - this.menuId = navParams.get("menuId");  
87 - this.title = navParams.get("title");  
88 - this.stageStateKey = "stageState" + this.menuId;  
89 -  
90 - this.currentItem = null;  
91 - this.positiveCnt1 = 0;  
92 - this.positiveCnt2 = 0;  
93 - this.positiveCnt3 = 0;  
94 - this.positiveCnt4 = 0;  
95 - this.positiveCnt5 = 0;  
96 - this.positiveCnt6 = 0;  
97 - this.positiveCnt7 = 0;  
98 -  
99 - this.list2dsp = false;  
100 - this.list3dsp = false;  
101 - this.list4dsp = false;  
102 - this.list5dsp = false;  
103 - this.list6dsp = false;  
104 - this.list7dsp = false;  
105 -  
106 - this.keyword = dataSevice.getKeyword(this.menuId);  
107 - this.openkeyword1 = false;  
108 - this.openkeyword2 = false;  
109 - this.openkeyword3 = false;  
110 - this.openkeyword4 = false;  
111 - this.openkeyword5 = false;  
112 - this.openkeyword6 = false;  
113 - this.openkeyword7 = false;  
114 -  
115 - this.isOpenNext = false;  
116 - this.dataSevice.getInfo(this.stageStateKey)  
117 - .then(val =>  
118 - {  
119 - if(val == "done")  
120 - {  
121 - this.isOpenNext = true;  
122 - }else {  
123 - this.isOpenNext = false;  
124 - }  
125 - });  
126 -  
127 - this.allNum = dataSevice.getUnitNum(this.menuId);  
128 -  
129 - this.isList6exist = true;  
130 - this.isList7exist = true;  
131 - if(this.allNum < 6)  
132 - {  
133 - this.isList6exist = false;  
134 - this.isList7exist = false;  
135 - }  
136 - else if(this.allNum < 7)  
137 - {  
138 - this.isList7exist = false;  
139 - }  
140 -  
141 - var cnt=0;  
142 - this.list1 = dataSevice.getUnit(this.menuId,cnt); cnt++;  
143 - this.list2 = dataSevice.getUnit(this.menuId,cnt); cnt++;  
144 - this.list3 = dataSevice.getUnit(this.menuId,cnt); cnt++;  
145 - this.list4 = dataSevice.getUnit(this.menuId,cnt); cnt++;  
146 - this.list5 = dataSevice.getUnit(this.menuId,cnt); cnt++;  
147 -  
148 - this.list1num = this.list1.length;  
149 - this.list2num = this.list2.length;  
150 - this.list3num = this.list3.length;  
151 - this.list4num = this.list4.length;  
152 - this.list5num = this.list5.length;  
153 -  
154 - this.updateStatus(1);  
155 - this.updateStatus(2);  
156 - this.updateStatus(3);  
157 - this.updateStatus(4);  
158 - this.updateStatus(5);  
159 - 29 + constructor(public navCtrl: NavController, private navParams: NavParams, private dataSevice: DataService) {
160 30
161 - if(this.isList6exist)  
162 - {  
163 - this.list6 = dataSevice.getUnit(this.menuId,cnt); cnt++; 31 + this.menuId = navParams.get("menuId");
  32 + this.title = navParams.get("title");
164 33
165 - this.list6num = this.list6.length; 34 + this.currentItem = null;
166 35
167 - this.updateStatus(6);  
168 - } 36 + this.list1 = dataSevice.getUnit(this.menuId);
  37 + this.list1num = this.list1.length;
169 38
170 - if(this.isList7exist)  
171 - {  
172 - this.list7 = dataSevice.getUnit(this.menuId,cnt); cnt++;  
173 -  
174 - this.list7num = this.list7.length;  
175 -  
176 - this.updateStatus(7);  
177 - } 39 + this.updateStatus();
178 40
179 } 41 }
180 42
@@ -185,7 +47,7 @@ export class UnitPage { @@ -185,7 +47,7 @@ export class UnitPage {
185 key = this.menuId + ":" + this.currentItem.unitId; 47 key = this.menuId + ":" + this.currentItem.unitId;
186 this.dataSevice.getInfo(key) 48 this.dataSevice.getInfo(key)
187 .then(data => { 49 .then(data => {
188 - this.updateStatus(this.currentItem.unitId + 1); 50 + this.updateStatus();
189 }); 51 });
190 } 52 }
191 } 53 }
@@ -198,10 +60,7 @@ export class UnitPage { @@ -198,10 +60,7 @@ export class UnitPage {
198 var key: string; 60 var key: string;
199 var value: string; 61 var value: string;
200 key = this.menuId.toString(); 62 key = this.menuId.toString();
201 - value = (this.positiveCnt1 + this.positiveCnt2  
202 - + this.positiveCnt3 + this.positiveCnt4  
203 - + this.positiveCnt5 + this.positiveCnt6  
204 - + this.positiveCnt7).toString(); 63 + value = this.positiveCnt.toString();
205 this.dataSevice.savePositiveInfo(key, value); 64 this.dataSevice.savePositiveInfo(key, value);
206 } 65 }
207 66
@@ -210,337 +69,31 @@ export class UnitPage { @@ -210,337 +69,31 @@ export class UnitPage {
210 this.navCtrl.push(QaPage,{menuId: this.menuId, unitId: item.unitId, title: item.unitName}); 69 this.navCtrl.push(QaPage,{menuId: this.menuId, unitId: item.unitId, title: item.unitName});
211 } 70 }
212 71
213 - inputKey() {  
214 - var isAllClear = false;  
215 - if(this.isList7exist)  
216 - {  
217 - if(this.openkeyword7)  
218 - {  
219 - isAllClear = true;  
220 - }  
221 - }  
222 - else if(this.isList6exist)  
223 - {  
224 - if(this.openkeyword6)  
225 - {  
226 - isAllClear = true;  
227 - }  
228 - }  
229 - else  
230 - {  
231 - if(this.openkeyword5)  
232 - {  
233 - isAllClear = true;  
234 - }  
235 - } 72 + updateStatus()
  73 + {
  74 + this.positiveCnt = 0;
236 75
237 - if(!isAllClear)  
238 - {  
239 - let alert = this.alertCtrl.create({  
240 - title: '次のステージへ',  
241 - subTitle: 'すべての問題に挑戦すると、新しいステージを入手できます',  
242 - buttons: ['OK']  
243 - });  
244 - alert.present();  
245 - return; 76 + var promiseArray1 = new Array();
  77 + for (var i = 0; i < this.list1num; i++) {
  78 + var key: string;
  79 + key = this.menuId + ":" + this.list1[i].unitId;
  80 + promiseArray1.push(this.dataSevice.getInfo(key));
246 } 81 }
247 82
248 - let prompt = this.alertCtrl.create({  
249 - title: '次のステージへ',  
250 - message: "各単元で入手した文字を並び替え、キーワードをひらがなで入力してください",  
251 - inputs: [  
252 - {  
253 - name: 'keyword',  
254 - placeholder: 'キーワード'  
255 - },  
256 - ],  
257 - buttons: [  
258 - {  
259 - text: 'Cancel',  
260 - handler: data => {  
261 - }  
262 - },  
263 - {  
264 - text: 'OK',  
265 - handler: data => {  
266 - var msg = "キーワードが違います";  
267 - if(data.keyword == this.keyword.answer) 83 + Promise.all(promiseArray1)
  84 + .then(val =>
  85 + {
  86 + for(var i = 0; i< this.list1num; i++)
  87 + {
  88 + this.list1state[i] = val[i];
  89 + if(val[i] != null)
268 { 90 {
269 - msg = "次のステージを獲得しました!"  
270 - this.isOpenNext = true;  
271 - this.dataSevice.saveDone(this.stageStateKey); 91 + var svdata = val[i].toString().split(":");
  92 + this.list1state[i] = svdata[1] + "問中" + svdata[0] + "問正解!";
  93 + this.positiveCnt += +svdata[0];
272 } 94 }
273 -  
274 - const toast = this.toastCtrl.create({  
275 - message: msg,  
276 - position: 'middle',  
277 - duration: 2000  
278 - });  
279 -  
280 - toast.present();  
281 } 95 }
282 - }  
283 - ]  
284 - });  
285 - prompt.present();  
286 -  
287 - }  
288 -  
289 - updateStatus(num: number)  
290 - {  
291 - switch(num)  
292 - {  
293 - case 1:  
294 - var promiseArray1 = new Array();  
295 - for (var i = 0; i < this.list1num; i++) {  
296 - var key: string;  
297 - key = this.menuId + ":" + this.list1[i].unitId;  
298 - promiseArray1.push(this.dataSevice.getInfo(key));  
299 - }  
300 -  
301 - Promise.all(promiseArray1)  
302 - .then(val =>  
303 - {  
304 - var alldone = true;  
305 - for(var i = 0; i< this.list1num; i++)  
306 - {  
307 - this.list1state[i] = val[i];  
308 - if(val[i] == null)  
309 - {  
310 - alldone = false;  
311 - }  
312 - else  
313 - {  
314 - var svdata = val[i].toString().split(":");  
315 - this.list1state[i] = svdata[1] + "問中" + svdata[0] + "問正解!";  
316 - this.positiveCnt1 = +svdata[0];  
317 - }  
318 - }  
319 -  
320 - if(alldone)  
321 - {  
322 - this.openkeyword1 = true;  
323 - this.list2dsp = true;  
324 - }  
325 - });  
326 - break;  
327 - case 2:  
328 - var promiseArray2 = new Array();  
329 - for (var i = 0; i < this.list2num; i++) {  
330 - var key: string;  
331 - key = this.menuId + ":" + this.list2[i].unitId;  
332 - promiseArray2.push(this.dataSevice.getInfo(key));  
333 - }  
334 -  
335 - Promise.all(promiseArray2)  
336 - .then(val =>  
337 - {  
338 - var alldone = true;  
339 - for(var i = 0; i< this.list2num; i++)  
340 - {  
341 - this.list2state[i] = val[i];  
342 - if(val[i] == null)  
343 - {  
344 - alldone = false;  
345 - }  
346 - else  
347 - {  
348 - var svdata = val[i].toString().split(":");  
349 - this.list2state[i] = svdata[1] + "問中" + svdata[0] + "問正解!";  
350 - this.positiveCnt2 = +svdata[0];  
351 - }  
352 - }  
353 -  
354 - if(alldone)  
355 - {  
356 - this.openkeyword2 = true;  
357 - this.list3dsp = true;  
358 - }  
359 - });  
360 -  
361 - break;  
362 - case 3:  
363 - var promiseArray3 = new Array();  
364 - for (var i = 0; i < this.list3num; i++) {  
365 - var key: string;  
366 - key = this.menuId + ":" + this.list3[i].unitId;  
367 - promiseArray3.push(this.dataSevice.getInfo(key));  
368 - }  
369 -  
370 - Promise.all(promiseArray3)  
371 - .then(val =>  
372 - {  
373 - var alldone = true;  
374 - for(var i = 0; i< this.list3num; i++)  
375 - {  
376 - this.list3state[i] = val[i];  
377 - if(val[i] == null)  
378 - {  
379 - alldone = false;  
380 - }  
381 - else  
382 - {  
383 - var svdata = val[i].toString().split(":");  
384 - this.list3state[i] = svdata[1] + "問中" + svdata[0] + "問正解!";  
385 - this.positiveCnt3 = +svdata[0];  
386 - }  
387 - }  
388 -  
389 - if(alldone)  
390 - {  
391 - this.openkeyword3 = true;  
392 - this.list4dsp = true;  
393 - }  
394 - });  
395 -  
396 - break;  
397 - case 4:  
398 - var promiseArray4 = new Array();  
399 - for (var i = 0; i < this.list4num; i++) {  
400 - var key: string;  
401 - key = this.menuId + ":" + this.list4[i].unitId;  
402 - promiseArray4.push(this.dataSevice.getInfo(key));  
403 - }  
404 -  
405 - Promise.all(promiseArray4)  
406 - .then(val =>  
407 - {  
408 - var alldone = true;  
409 - for(var i = 0; i< this.list4num; i++)  
410 - {  
411 - this.list4state[i] = val[i];  
412 - if(val[i] == null)  
413 - {  
414 - alldone = false;  
415 - }  
416 - else  
417 - {  
418 - var svdata = val[i].toString().split(":");  
419 - this.list4state[i] = svdata[1] + "問中" + svdata[0] + "問正解!";  
420 - this.positiveCnt4 = +svdata[0];  
421 - }  
422 - }  
423 -  
424 - if(alldone)  
425 - {  
426 - this.openkeyword4 = true;  
427 - this.list5dsp = true;  
428 - }  
429 - });  
430 - break;  
431 - case 5:  
432 -  
433 - var promiseArray5 = new Array();  
434 - for (var i = 0; i < this.list5num; i++) {  
435 - var key: string;  
436 - key = this.menuId + ":" + this.list5[i].unitId;  
437 - promiseArray5.push(this.dataSevice.getInfo(key));  
438 - }  
439 -  
440 - Promise.all(promiseArray5)  
441 - .then(val =>  
442 - {  
443 - var alldone = true;  
444 - for(var i = 0; i< this.list5num; i++)  
445 - {  
446 - this.list5state[i] = val[i];  
447 - if(val[i] == null)  
448 - {  
449 - alldone = false;  
450 - }  
451 - else  
452 - {  
453 - var svdata = val[i].toString().split(":");  
454 - this.list5state[i] = svdata[1] + "問中" + svdata[0] + "問正解!";  
455 - this.positiveCnt5 = +svdata[0];  
456 - }  
457 - }  
458 -  
459 - if(alldone)  
460 - {  
461 - this.openkeyword5 = true;  
462 - this.list6dsp = true;  
463 - }  
464 - });  
465 - break;  
466 - case 6:  
467 - var promiseArray6 = new Array();  
468 - for (var i = 0; i < this.list6num; i++) {  
469 - var key: string;  
470 - key = this.menuId + ":" + this.list6[i].unitId;  
471 - promiseArray6.push(this.dataSevice.getInfo(key));  
472 - }  
473 -  
474 - Promise.all(promiseArray6)  
475 - .then(val =>  
476 - {  
477 - var alldone = true;  
478 - for(var i = 0; i< this.list6num; i++)  
479 - {  
480 - this.list6state[i] = val[i];  
481 - if(val[i] == null)  
482 - {  
483 - alldone = false;  
484 - }  
485 - else  
486 - {  
487 - var svdata = val[i].toString().split(":");  
488 - this.list6state[i] = svdata[1] + "問中" + svdata[0] + "問正解!";  
489 - this.positiveCnt6 = +svdata[0];  
490 - }  
491 - }  
492 -  
493 - if(alldone)  
494 - {  
495 - this.openkeyword6 = true;  
496 - this.list7dsp = true;  
497 - }  
498 - });  
499 - break;  
500 - case 7:  
501 - var promiseArray7 = new Array();  
502 - for (var i = 0; i < this.list7num; i++) {  
503 - var key: string;  
504 - key = this.menuId + ":" + this.list7[i].unitId;  
505 - promiseArray7.push(this.dataSevice.getInfo(key));  
506 - }  
507 -  
508 - Promise.all(promiseArray7)  
509 - .then(val =>  
510 - {  
511 - var alldone = true;  
512 - for(var i = 0; i< this.list7num; i++)  
513 - {  
514 - this.list7state[i] = val[i];  
515 - if(val[i] == null)  
516 - {  
517 - alldone = false;  
518 - }  
519 - else  
520 - {  
521 - var svdata = val[i].toString().split(":");  
522 - this.list7state[i] = svdata[1] + "問中" + svdata[0] + "問正解!";  
523 - this.positiveCnt7 = +svdata[0];  
524 - }  
525 - }  
526 -  
527 - if(alldone)  
528 - {  
529 - this.openkeyword7 = true;  
530 - }  
531 - });  
532 - break;  
533 - default:  
534 - break;  
535 - }  
536 - }  
537 -  
538 - nextStage() {  
539 - this.navCtrl.push(ExtunitPage, {menuId: this.menuId, title: this.title});  
540 - }  
541 -  
542 - gotoHelp(){  
543 - this.navCtrl.push(HelpPage); 96 + });
544 } 97 }
545 98
546 } 99 }
1 -import { Injectable } from '@angular/core';  
2 -import { Qa } from './define-qa';  
3 -/*  
4 - Generated class for the DataService provider.  
5 -  
6 - See https://angular.io/docs/ts/latest/guide/dependency-injection.html  
7 - for more info on providers and Angular 2 DI.  
8 -*/  
9 -@Injectable()  
10 -export class ContentsExtqa {  
11 - extqa :Qa[];  
12 -  
13 - constructor() {  
14 - this.extqa = this.createExtqa();  
15 - }  
16 -  
17 - private createExtqa(): Qa[] {  
18 - var qa = [{  
19 - menuId: 0,  
20 - unitId: 100,  
21 - qaId: 0,  
22 - questionString: '図で、∠ P と ∠ Q の大きさは{ ? }、また、このようになる法則を{ ? }という',  
23 - questionImage: 'q0010000.png',  
24 - choicesId: [0,1,2,3],  
25 - choicesString: [ '∠ P < ∠ Q、反射の法則','∠ P = ∠ Q、反射の法則','∠ P > ∠ Q、全反射' , '∠ P = ∠ Q、全反射'],  
26 - answerId: 1,  
27 - answerString: '∠ P = ∠ Q、反射の法則',  
28 - answerImage: ''  
29 - }, {  
30 - menuId: 0,  
31 - unitId: 100,  
32 - qaId: 1,  
33 - questionString: '図で、光は水中を{ ? }のように進む、また、このような光の性質を、光の{ ? }という',  
34 - questionImage: 'q0010001.png',  
35 - choicesId: [0, 1, 2, 3],  
36 - choicesString: ['ア、屈折', 'イ、屈折', 'ウ、反射', 'イ、反射'],  
37 - answerId: 0,  
38 - answerString: 'ア、屈折',  
39 - answerImage: ''  
40 - }, {  
41 - menuId: 0,  
42 - unitId: 101,  
43 - qaId: 0,  
44 - questionString: '鏡にうつって見える小球 P の像は、実像か、それとも虚像か',  
45 - questionImage: 'q0010100.png',  
46 - choicesId: [0, 1],  
47 - choicesString: ['実像', '虚像'],  
48 - answerId: 1,  
49 - answerString: '虚像',  
50 - answerImage: ''  
51 - }, {  
52 - menuId: 0,  
53 - unitId: 102,  
54 - qaId: 0,  
55 - questionString: '物体をさらにレンズに近づけて、F とレンズの間に置いたとき、できる像は何という像か',  
56 - questionImage: 'q0010200.png',  
57 - choicesId: [0, 1],  
58 - choicesString: ['実像', '虚像'],  
59 - answerId: 1,  
60 - answerString: '虚像',  
61 - answerImage: ''  
62 - }, {  
63 - menuId: 0,  
64 - unitId: 103,  
65 - qaId: 0,  
66 - questionString: '図のモノコードの弦をはじいたときの音を、オシロスコープで調べると、波形は A のようになった。'  
67 - +'<br />弦をはじく強さは変えないで、R を Pに近づけてはじいたときの波形はどのようになるか。',  
68 - questionImage: 'q0010300.png',  
69 - choicesId: [0, 1, 2],  
70 - choicesString: ['①', '②', '③'],  
71 - answerId: 1,  
72 - answerString: '②',  
73 - answerImage: ''  
74 - }, {  
75 - menuId: 0,  
76 - unitId: 103,  
77 - qaId: 1,  
78 - questionString: '花火が打ち上げられてから 5 秒後にドーンという音が聞こえた。音の速さを 340 m/秒 とすると、花火を打ち上げたところまでの距離は何 m か',  
79 - questionImage: '',  
80 - choicesId: [0, 1, 2, 3],  
81 - choicesString: ['1700', '680', '1600', '1520'],  
82 - answerId: 0,  
83 - answerString: '1700',  
84 - answerImage: ''  
85 - }, {  
86 - menuId: 0,  
87 - unitId: 104,  
88 - qaId: 0,  
89 - questionString: '図のように、天井から糸で 200g の球がつり下がっている。球にはたらく重力の大きさはいくらか。ただし、100g の物体にはたらく重力の大きさを 1N とする',  
90 - questionImage: 'q0010400.png',  
91 - choicesId: [0, 1, 2, 3],  
92 - choicesString: ['1N', '2N', '3N', '4N'],  
93 - answerId: 1,  
94 - answerString: '2N',  
95 - answerImage: ''  
96 - }, {  
97 - menuId: 0,  
98 - unitId: 105,  
99 - qaId: 0,  
100 - questionString: '質量 180g の木片の、面積が 45㎠ の面を下にして机に置いた。木片が机の面におよぼす圧力は何パスカルか',  
101 - questionImage: '',  
102 - choicesId: [0, 1, 2, 3],  
103 - choicesString: ['180 Pa', '4 Pa', '400 Pa', '8.1 Pa'],  
104 - answerId: 2,  
105 - answerString: '400 Pa <br />1 Pa = 1N/㎡ で、質量 180g の木片にはたらく重力の大きさは 1.8N 、45㎠ = 0.0045㎡ なので、求める圧力は、1.8 ÷ 0.0045 = 400[Pa]',  
106 - answerImage: ''  
107 - }, {  
108 - menuId: 0,  
109 - unitId: 105,  
110 - qaId: 1,  
111 - questionString: '質量 180g 、体積360㎠ の木片やばねばかり、水などを用意し、実験を行った。'  
112 - +'<br />図の A のように、木片に質量 300g のおもりをつけ、図の B のようにおもりだけを水中にいれたところ、ばねばかりの目もりは 4.3 N を示した。このときの浮力の大きさはいくらか',  
113 - questionImage: 'q0010501.png',  
114 - choicesId: [0, 1, 2, 3],  
115 - choicesString: ['3 N', '1.5 N', '2 N', '0.5 N'],  
116 - answerId: 3,  
117 - answerString: '0.5 N<br />空気中での木片とおもりの重さの合計は、1.8 + 3.0 = 4.8[N] したがって、Bでの浮力の大きさは、4.8 - 4.3 = 0.5[N]',  
118 - answerImage: ''  
119 - }, {  
120 - menuId: 1,  
121 - unitId: 100,  
122 - qaId: 0,  
123 - questionString: '図のように、砂糖、木片、食塩、プラスチック片、金属片をそれぞれ燃焼さじにのせて加熱し、石灰水を入れた集気びんの中で燃えるものはすべて燃やした。'  
124 - +'<br />その後、物質をとり出して集気びんをふると、砂糖、木片、プラスチック片の場合は石灰水が白くにごり、食塩、金属片は変化しなかった。'  
125 - +'<br />石灰水が白くにごったことから、燃えて何が発生したとわかるか',  
126 - questionImage: 'q0110000.png',  
127 - choicesId: [0, 1, 2, 3],  
128 - choicesString: ['酸素', '水素', '二酸化炭素', 'アンモニア'],  
129 - answerId: 2,  
130 - answerString: '二酸化炭素',  
131 - answerImage: ''  
132 - }, {  
133 - menuId: 1,  
134 - unitId: 100,  
135 - qaId: 1,  
136 - questionString: 'プラスチックについて正しいものを選べ',  
137 - questionImage: 'q0110001.png',  
138 - choicesId: [0, 1, 2, 3],  
139 - choicesString: ['①', '②', '①、②', '②、③'],  
140 - answerId: 2,  
141 - answerString: '①、②',  
142 - answerImage: ''  
143 - }, {  
144 - menuId: 1,  
145 - unitId: 100,  
146 - qaId: 2,  
147 - questionString: '金属をみがくと光を受けて輝く性質がある。この性質を何というか',  
148 - questionImage: '',  
149 - choicesId: [0, 1, 2, 3],  
150 - choicesString: ['金属光沢', '輝度', '屈折', '反射'],  
151 - answerId: 0,  
152 - answerString: '金属光沢',  
153 - answerImage: ''  
154 - }, {  
155 - menuId: 1,  
156 - unitId: 101,  
157 - qaId: 0,  
158 - questionString: '個体の氷が液体の水や気体の水蒸気にすがたを変えることを何というか',  
159 - questionImage: 'q0110100.png',  
160 - choicesId: [0, 1, 2],  
161 - choicesString: ['沸点', '状態変化', '融解'],  
162 - answerId: 1,  
163 - answerString: '状態変化',  
164 - answerImage: ''  
165 - }, {  
166 - menuId: 1,  
167 - unitId: 101,  
168 - qaId: 1,  
169 - questionString: '次のア~エから増加しているものを選べ',  
170 - questionImage: 'q0110101.png',  
171 - choicesId: [0, 1, 2, 3],  
172 - choicesString: ['ア', 'イ', 'ウ', 'エ'],  
173 - answerId: 3,  
174 - answerString: 'エ',  
175 - answerImage: ''  
176 - }, {  
177 - menuId: 1,  
178 - unitId: 101,  
179 - qaId: 2,  
180 - questionString: '物質が個体・液体・気体とすがたを変えたとき、その物質が持っている性質は{ ? }',  
181 - questionImage: '',  
182 - choicesId: [0, 1],  
183 - choicesString: ['変化する', '変わらない'],  
184 - answerId: 1,  
185 - answerString: '変わらない',  
186 - answerImage: ''  
187 - }, {  
188 - menuId: 1,  
189 - unitId: 102,  
190 - qaId: 0,  
191 - questionString: '図の X の物質名と、気体の捕集法の名前を答えよ',  
192 - questionImage: 'q0110200.png',  
193 - choicesId: [0, 1, 2, 3],  
194 - choicesString: ['硫酸、水上置換', '塩酸、水上置換', '塩酸、上方置換', '硫酸、下方置換'],  
195 - answerId: 1,  
196 - answerString: '塩酸、水上置換',  
197 - answerImage: ''  
198 - }, {  
199 - menuId: 1,  
200 - unitId: 102,  
201 - qaId: 1,  
202 - questionString: '図で発生する Y の気体名と、気体の捕集法の名前を答えよ',  
203 - questionImage: 'q0110201.png',  
204 - choicesId: [0, 1, 2, 3],  
205 - choicesString: ['二酸化炭素、下方置換', '酸素、下方置換', '二酸化炭素、上方置換', '水素、上方置換'],  
206 - answerId: 0,  
207 - answerString: '二酸化炭素、下方置換',  
208 - answerImage: ''  
209 - }, {  
210 - menuId: 1,  
211 - unitId: 103,  
212 - qaId: 0,  
213 - questionString: '水とエタノールの混合物を図のような装置で加熱した。図2のグラフのアのとき、図1の A にたまる液体に多くふくまれる物質は何か',  
214 - questionImage: 'q0110300.png',  
215 - choicesId: [0, 1],  
216 - choicesString: ['水', 'エタノール'],  
217 - answerId: 1,  
218 - answerString: 'エタノール',  
219 - answerImage: ''  
220 - }, {  
221 - menuId: 1,  
222 - unitId: 104,  
223 - qaId: 0,  
224 - questionString: '図は、100g の水にとける物質の質量と温度の関係を示したものである。今、70℃ の水 100g に硝酸カリウムをとけるだけとかして水溶液をつくった。'  
225 - +'<br />この硝酸カリウム水溶液を 50℃ まで冷やすと、とけきれなくなって結晶として出てくるのは約何g か',  
226 - questionImage: 'q0110400.png',  
227 - choicesId: [0, 1, 2, 3],  
228 - choicesString: ['20', '40', '60', '80'],  
229 - answerId: 2,  
230 - answerString: '60',  
231 - answerImage: ''  
232 - }, {  
233 - menuId: 1,  
234 - unitId: 105,  
235 - qaId: 0,  
236 - questionString: '水に食塩を完全にとかして食塩水をつくった。A の食塩水にさらに 60g の水を加えると、食塩水の濃度は何%になるか',  
237 - questionImage: 'q0110500.png',  
238 - choicesId: [0, 1, 2, 3],  
239 - choicesString: ['25 %', '12.5 %', '17.5 %', '8.5 %'],  
240 - answerId: 1,  
241 - answerString: '12.5 %',  
242 - answerImage: ''  
243 - }, {  
244 - menuId: 1,  
245 - unitId: 105,  
246 - qaId: 1,  
247 - questionString: '水に食塩を完全にとかして食塩水をつくった。B の食塩水の濃度は何%か。小数第1位を四捨五入して求めよ',  
248 - questionImage: 'q0110501.png',  
249 - choicesId: [0, 1, 2, 3],  
250 - choicesString: ['14 %', '16 %', '12 %', '17 %'],  
251 - answerId: 3,  
252 - answerString: '17 %',  
253 - answerImage: ''  
254 - }, {  
255 - menuId: 2,  
256 - unitId: 100,  
257 - qaId: 0,  
258 - questionString: '図のように乾電池、スイッチ、豆電球、電流計をつないだ回路がある。スイッチを入れたところ、電流計の針は図3のようにさし示した。'  
259 - +'<br />このとき、回路に流れた電流の強さは何 A か。ただし、-端子は 5A につないであるものとする',  
260 - questionImage: 'q0210000.png',  
261 - choicesId: [0, 1, 2, 3],  
262 - choicesString: ['40 A', '35 A', '3.5 A', '2 A'],  
263 - answerId: 2,  
264 - answerString: '3.5 A',  
265 - answerImage: ''  
266 - }, {  
267 - menuId: 2,  
268 - unitId: 101,  
269 - qaId: 0,  
270 - questionString: '図のような回路がある。スイッチを入れたとき、電熱線 a には 3A の電流が流れ、電熱線 b の両端には 6V の電圧が加わった。'  
271 - +'<br />電熱線 b に流れる電流の強さは{ ? }、電熱線 a に加わる電圧の大きさは{ ? }',  
272 - questionImage: 'q0210100.png',  
273 - choicesId: [0, 1, 2, 3],  
274 - choicesString: ['3 A、3 V', '9 A、6 V', '3 A、6 V', '3 A、9 V'],  
275 - answerId: 0,  
276 - answerString: '3 A、3 V',  
277 - answerImage: ''  
278 - }, {  
279 - menuId: 2,  
280 - unitId: 102,  
281 - qaId: 0,  
282 - questionString: '図のような回路がある。スイッチを入れたとき、電熱線 a に 2A の電流が流れ、回路の P 点 には 5 A の電流が流れた。'  
283 - +'<br />電熱線a と電熱線b の抵抗の大きさは、それぞれ何Ωか',  
284 - questionImage: 'q0210200.png',  
285 - choicesId: [0, 1, 2, 3],  
286 - choicesString: ['電熱線a:8Ω、電熱線b:4Ω', '電熱線a:6Ω、電熱線b:4Ω', '電熱線a:4Ω、電熱線b:6Ω', '電熱線a:4Ω、電熱線b:8Ω'],  
287 - answerId: 1,  
288 - answerString: '電熱線a:6Ω、電熱線b:4Ω',  
289 - answerImage: ''  
290 - }, {  
291 - menuId: 2,  
292 - unitId: 103,  
293 - qaId: 0,  
294 - questionString: '2本の電熱線 P , Q について、加えた電圧の大きさと流れた電流の強さの関係を調べたら、グラフのようになった。'  
295 - +'<br />電熱線 P , Q の抵抗の大きさはそれぞれ何Ωか',  
296 - questionImage: 'q0210300.png',  
297 - choicesId: [0, 1, 2, 3],  
298 - choicesString: ['電熱線P:20Ω、電熱線Q:40Ω', '電熱線P:40Ω、電熱線Q:40Ω', '電熱線P:20Ω、電熱線Q:80Ω', '電熱線P:60Ω、電熱線Q:40Ω'],  
299 - answerId: 0,  
300 - answerString: '電熱線P:20Ω、電熱線Q:40Ω',  
301 - answerImage: ''  
302 - }, {  
303 - menuId: 2,  
304 - unitId: 104,  
305 - qaId: 0,  
306 - questionString: '図のように、200gの水の中に電熱線を入れて、回路に 5 V の電圧を加えると、電流計は 1.2 A を示した。5 分間に電熱線から出た熱量はいくらか',  
307 - questionImage: 'q0210400.png',  
308 - choicesId: [0, 1, 2, 3],  
309 - choicesString: ['1200 J', '1800 J', '30 J', '300 J'],  
310 - answerId: 1,  
311 - answerString: '1800 J',  
312 - answerImage: ''  
313 - }, {  
314 - menuId: 2,  
315 - unitId: 105,  
316 - qaId: 0,  
317 - questionString: '図1のように、プラスチックのストロー2本をまとめてティッシュペーパーでこすった。'  
318 - +'<br />次に、図2のように、ストローの1本を糸でつるし、その右端に手前からもう1本のストローやティッシュペーパーを近づけたとき、'  
319 - +'つるしたストローが離れるように動くのは、ストローとティッシュペーパーのどちらを近づけたときか',  
320 - questionImage: 'q0210500.png',  
321 - choicesId: [0, 1],  
322 - choicesString: ['ストロー', 'ティッシュペーパー'],  
323 - answerId: 0,  
324 - answerString: 'ストロー',  
325 - answerImage: ''  
326 - }, {  
327 - menuId: 2,  
328 - unitId: 105,  
329 - qaId: 1,  
330 - questionString: '図のような放電管のア、イの電極に、高電圧をかけたところ、回転車が図の矢印のように回転した。+極はア、イのどちらか',  
331 - questionImage: 'q0210501.png',  
332 - choicesId: [0, 1],  
333 - choicesString: ['ア', 'イ'],  
334 - answerId: 1,  
335 - answerString: 'イ',  
336 - answerImage: ''  
337 - }, {  
338 - menuId: 3,  
339 - unitId: 100,  
340 - qaId: 0,  
341 - questionString: '図は、棒磁石とそのまわりにできる磁界のようすを磁力線で示したものである。ただし磁界の向きは示していない。'  
342 - +'<br />A の位置に磁針を置くとどのようになるか。ア~エから1つ選べ',  
343 - questionImage: 'q0310000.png',  
344 - choicesId: [0, 1, 2, 3],  
345 - choicesString: ['ア', 'イ', 'ウ', 'エ'],  
346 - answerId: 0,  
347 - answerString: 'ア',  
348 - answerImage: ''  
349 - }, {  
350 - menuId: 3,  
351 - unitId: 100,  
352 - qaId: 1,  
353 - questionString: '2本の棒磁石の磁極を図の A、B のように、近づけて置いた。磁極の間に引き合う力がはたらいているのはどちらか',  
354 - questionImage: 'q0310001.png',  
355 - choicesId: [0, 1],  
356 - choicesString: ['A', 'B'],  
357 - answerId: 0,  
358 - answerString: 'A',  
359 - answerImage: ''  
360 - }, {  
361 - menuId: 3,  
362 - unitId: 101,  
363 - qaId: 0,  
364 - questionString: '図は、棒磁石とそのまわりにできる磁界のようすを磁力線で示したものである。ただし磁界の向きは示していない。'  
365 - +'<br />A の位置に磁針を置くとどのようになるか。ア~エから1つ選べ',  
366 - questionImage: 'q0310000.png',  
367 - choicesId: [0, 1, 2, 3],  
368 - choicesString: ['ア', 'イ', 'ウ', 'エ'],  
369 - answerId: 0,  
370 - answerString: 'ア',  
371 - answerImage: ''  
372 - }, {  
373 - menuId: 3,  
374 - unitId: 102,  
375 - qaId: 0,  
376 - questionString: '図は、コイルに電流を流して、まわりにできる磁界のようすを調べようとしたものである。コイルの内側と外側では、磁界の向きは同じか、逆か',  
377 - questionImage: 'q0310200.png',  
378 - choicesId: [0, 1],  
379 - choicesString: ['同じ', '逆'],  
380 - answerId: 1,  
381 - answerString: '逆',  
382 - answerImage: ''  
383 - }, {  
384 - menuId: 3,  
385 - unitId: 103,  
386 - qaId: 0,  
387 - questionString: '図のような装置で、スイッチを入れて導線に電流を流した。'  
388 - +'<br />このとき、磁石の N 極と S 極の間にある導線は、ア~エのどの向きにふれるか',  
389 - questionImage: 'q0310300.png',  
390 - choicesId: [0, 1, 2, 3],  
391 - choicesString: ['ア', 'イ', 'ウ', 'エ'],  
392 - answerId: 0,  
393 - answerString: 'ア',  
394 - answerImage: ''  
395 - }, {  
396 - menuId: 3,  
397 - unitId: 104,  
398 - qaId: 0,  
399 - questionString: '図のように、コイルに棒磁石の N 極をさしこんだら、検流計の針が-極側にふれた。'  
400 - +'<br />棒磁石のN極をコイルに差し込んだままにして止めたとき、検流計の針は+極側と-極側のどちら側にふれるか。それとも、針はふれないか',  
401 - questionImage: 'q0310400.png',  
402 - choicesId: [0, 1, 2],  
403 - choicesString: ['+極側', '-極側', 'ふれない'],  
404 - answerId: 2,  
405 - answerString: 'ふれない',  
406 - answerImage: ''  
407 - }, {  
408 - menuId: 3,  
409 - unitId: 105,  
410 - qaId: 0,  
411 - questionString: 'オシロスコープで電流の表示が波形となるのは、直流、交流のどちらか',  
412 - questionImage: '',  
413 - choicesId: [0, 1],  
414 - choicesString: ['直流', '交流'],  
415 - answerId: 1,  
416 - answerString: '交流',  
417 - answerImage: ''  
418 - }, {  
419 - menuId: 3,  
420 - unitId: 105,  
421 - qaId: 1,  
422 - questionString: '発光ダイオードを用いて回路をつくり、点灯させ、暗い部屋で左右に振ったとき、図のように点線状に見えた。このとき用いた電流は、直流、交流のどちらか',  
423 - questionImage: 'q0310501.png',  
424 - choicesId: [0, 1],  
425 - choicesString: ['直流', '交流'],  
426 - answerId: 1,  
427 - answerString: '交流',  
428 - answerImage: ''  
429 - }, {  
430 - menuId: 3,  
431 - unitId: 105,  
432 - qaId: 2,  
433 - questionString: '変圧器を用いて簡単に電圧を変えることができる電流は、直流、交流のどちらか',  
434 - questionImage: '',  
435 - choicesId: [0, 1],  
436 - choicesString: ['直流', '交流'],  
437 - answerId: 1,  
438 - answerString: '交流',  
439 - answerImage: ''  
440 - }, {  
441 - menuId: 4,  
442 - unitId: 100,  
443 - qaId: 0,  
444 - questionString: '図のような装置で、炭酸水素ナトリウムを加熱した。試験管 B の石灰水はどのような変化をするか。また、試験管 A に白色の固体が残るが、この物質は何か',  
445 - questionImage: 'q0410000.png',  
446 - choicesId: [0, 1, 2, 3],  
447 - choicesString: ['白くにごる、炭酸ナトリウム', '白くにごる、塩化ナトリウム', '変化しない、炭素', '変化しない、炭酸ナトリウム'],  
448 - answerId: 0,  
449 - answerString: '白くにごる、炭酸ナトリウム',  
450 - answerImage: ''  
451 - }, {  
452 - menuId: 4,  
453 - unitId: 101,  
454 - qaId: 0,  
455 - questionString: '図のような装置で、酸化銀を加熱した。実験後、試験管 A に残る物質は何か。また、試験管 B に集まる気体は何か',  
456 - questionImage: 'q0410100.png',  
457 - choicesId: [0, 1, 2, 3],  
458 - choicesString: ['銀、二酸化炭素', '炭素、酸素', '銀、酸素', '炭素、酸素'],  
459 - answerId: 2,  
460 - answerString: '銀、酸素',  
461 - answerImage: ''  
462 - }, {  
463 - menuId: 4,  
464 - unitId: 102,  
465 - qaId: 0,  
466 - questionString: '図のような装置で、水に少量の水酸化ナトリウムを加えて、電流を流したところ、A、B の気体が集まった。集まった気体 A、B はそれぞれ何か',  
467 - questionImage: 'q0410200.png',  
468 - choicesId: [0, 1, 2, 3],  
469 - choicesString: ['酸素、二酸化炭素', '酸素、水素', '二酸化炭素、水素', '水素、酸素'],  
470 - answerId: 3,  
471 - answerString: '水素、酸素',  
472 - answerImage: ''  
473 - }, {  
474 - menuId: 4,  
475 - unitId: 103,  
476 - qaId: 0,  
477 - questionString: '原子の性質について述べた3つの文で、誤っているものはどれか',  
478 - questionImage: 'q0410300.png',  
479 - choicesId: [0, 1, 2],  
480 - choicesString: ['ア', 'イ', 'ウ'],  
481 - answerId: 1,  
482 - answerString: 'イ',  
483 - answerImage: ''  
484 - }, {  
485 - menuId: 4,  
486 - unitId: 103,  
487 - qaId: 1,  
488 - questionString: '次の原子を、それぞれ原子の記号で表せ。'  
489 - +'<br />塩素{ ? } 硫黄{ ? } 銅{ ? } 銀{ ? }',  
490 - questionImage: '',  
491 - choicesId: [0, 1, 2, 3],  
492 - choicesString: ['C、I、Cu、Ag', 'Cl、Ag、Cu、S', 'Cl、S、Cu、Ag', 'Cu、S、Cl、Au'],  
493 - answerId: 2,  
494 - answerString: 'Cl、S、Cu、Ag',  
495 - answerImage: ''  
496 - }, {  
497 - menuId: 4,  
498 - unitId: 104,  
499 - qaId: 0,  
500 - questionString: '鉄と硫黄の粉末をよく混ぜ合わせ、アルミニウムはくで包んだものを2つ用意した。図のように A は一端を加熱し、反応が始まったら砂を入れた皿の上に置いた。B はそのままにした。'  
501 - +'<br />A、B のアルミニウムはくの中の物質をそれぞれ一部とって試験管に入れ、うすい塩酸を加えたとき、卵のくさったようなにおいがするのは A、B のどちらか',  
502 - questionImage: 'q0410400.png',  
503 - choicesId: [0, 1],  
504 - choicesString: ['A', 'B'],  
505 - answerId: 0,  
506 - answerString: 'A',  
507 - answerImage: ''  
508 - }, {  
509 - menuId: 4,  
510 - unitId: 105,  
511 - qaId: 0,  
512 - questionString: '次の化学変化を化学反応式で書け。'  
513 - +'<br />鉄と硫黄を混ぜて加熱したときの変化',  
514 - questionImage: '',  
515 - choicesId: [0, 1, 2, 3],  
516 - choicesString: ['Fe + S → FeS', 'Cu + S → CuS', '2Fe + S → 2FeS', 'Fe + 2S → FeS₂'],  
517 - answerId: 0,  
518 - answerString: 'Fe + S → FeS',  
519 - answerImage: ''  
520 - }, {  
521 - menuId: 4,  
522 - unitId: 105,  
523 - qaId: 1,  
524 - questionString: '次の化学変化を化学反応式で書け。'  
525 - +'<br />炭酸水素ナトリウムを加熱したときの変化',  
526 - questionImage: '',  
527 - choicesId: [0, 1, 2, 3],  
528 - choicesString: ['NaHCO₃ → Na₂CO₃ + CO₂ + H₂O', '2NaHCO₃ → Na₂CO₃ + CO₂ + 2H₂O', '2NaHCO₃ → Na₂CO₃ + CO₂ + H₂O', 'NaHCO₃ → Na₂CO₃ + 2CO₂ + H₂O'],  
529 - answerId: 2,  
530 - answerString: '2NaHCO₃ → Na₂CO₃ + CO₂ + H₂O',  
531 - answerImage: ''  
532 - }, {  
533 - menuId: 5,  
534 - unitId: 100,  
535 - qaId: 0,  
536 - questionString: '図のように銅の粉末 0.8g をステンレスの皿に入れて加熱し、冷えてから質量を測定した。これを何回かくり返したところ,図2のようなグラフになった。銅の粉末 0.8g と化合した酸素の質量は 何g か',  
537 - questionImage: 'q0510000.png',  
538 - choicesId: [0, 1, 2, 3],  
539 - choicesString: ['3.0 g', '0.3 g', '1.0 g', '0.2 g'],  
540 - answerId: 3,  
541 - answerString: '0.2 g',  
542 - answerImage: ''  
543 - }, {  
544 - menuId: 5,  
545 - unitId: 101,  
546 - qaId: 0,  
547 - questionString: '図のように酸化銅の粉末と木炭の粉末を混ぜて加熱した。この実験について次のように表すとき、①、②にあてはまる物質名は何か'  
548 - +'<br />( ① ) + 炭素 → ( ② ) + 二酸化炭素',  
549 - questionImage: 'q0510100.png',  
550 - choicesId: [0, 1, 2, 3],  
551 - choicesString: ['①銅、②酸化銅', '①酸化銅、②銅', '①鉄、②銅', '①鉄、②酸化鉄'],  
552 - answerId: 1,  
553 - answerString: '①酸化銅、②銅',  
554 - answerImage: ''  
555 - }, {  
556 - menuId: 5,  
557 - unitId: 102,  
558 - qaId: 0,  
559 - questionString: '図の実験 A ~ C を行い、反応の前後で全体の質量を測定した。化学変化の前後で質量が増えるのは{ ? }、化学変化の前後で質量が変わらないのは{ ? }',  
560 - questionImage: 'q0510200.png',  
561 - choicesId: [0, 1, 2, 3],  
562 - choicesString: ['A、B', 'B、A', 'A、C', 'B、C'],  
563 - answerId: 3,  
564 - answerString: 'B、C',  
565 - answerImage: ''  
566 - }, {  
567 - menuId: 5,  
568 - unitId: 103,  
569 - qaId: 0,  
570 - questionString: '銅の粉末とマグネシウムの粉末をそれぞれ質量を変えてはかりとり、ステンレスの皿にのせて加熱した。よく冷えてから質量をはかり,また加熱した。これをくり返し,金属の質量とできる酸化物の質量の関係を調べたら,図のグラフを得た。'  
571 - +'<br />酸素 1g と化合する、銅とマグネシウムの質量はそれぞれ何g か',  
572 - questionImage: 'q0510300.png',  
573 - choicesId: [0, 1, 2, 3],  
574 - choicesString: ['銅:4.0 g、マグネシウム:1.5 g', '銅:3.5 g、マグネシウム:1.0 g', '銅:4.0 g、マグネシウム:2.0 g', '銅:5.0 g、マグネシウム:1.5 g'],  
575 - answerId: 0,  
576 - answerString: '銅:4.0 g、マグネシウム:1.5 g',  
577 - answerImage: ''  
578 - }, {  
579 - menuId: 5,  
580 - unitId: 104,  
581 - qaId: 0,  
582 - questionString: 'うすい塩酸 20 c㎥ を入れた三角フラスコに、0.2 g の亜鉛を入れて、発生した気体を集め、その体積をはかった。亜鉛の質量を 0.4 g、0.6 g、0.8 g、1.0 g、1.2 g にして、それぞれ同様の実験を行ったところ、図のようなグラフを得た。'  
583 - +'<br />この実験で用いたうすい塩酸 10 c㎥ に 0.6g の亜鉛を加えたとき、発生する気体の体積は何c㎥か',  
584 - questionImage: 'q0510400.png',  
585 - choicesId: [0, 1, 2, 3],  
586 - choicesString: ['100 c㎥', '150 c㎥', '250 c㎥', '300 c㎥'],  
587 - answerId: 1,  
588 - answerString: '150 c㎥',  
589 - answerImage: ''  
590 - }, {  
591 - menuId: 5,  
592 - unitId: 105,  
593 - qaId: 0,  
594 - questionString: 'ア~ウのうち、発熱反応は{ ? }、吸熱反応は{ ? }',  
595 - questionImage: 'q0510500.png',  
596 - choicesId: [0, 1, 2, 3],  
597 - choicesString: ['発熱反応:ア、吸熱反応:イ・ウ', '発熱反応:ウ、吸熱反応:イ', '発熱反応:ア、吸熱反応:ウ', '発熱反応:ア・ウ、吸熱反応:イ'],  
598 - answerId: 3,  
599 - answerString: '発熱反応:ア・ウ、吸熱反応:イ',  
600 - answerImage: ''  
601 - }, {  
602 - menuId: 6,  
603 - unitId: 100,  
604 - qaId: 0,  
605 - questionString: 'タンポポの花をルーペで観察するとき、動かすのはタンポポの花とルーペのどちらか',  
606 - questionImage: '',  
607 - choicesId: [0, 1],  
608 - choicesString: ['タンポポの花', 'ルーペ'],  
609 - answerId: 0,  
610 - answerString: 'タンポポの花',  
611 - answerImage: ''  
612 - }, {  
613 - menuId: 6,  
614 - unitId: 100,  
615 - qaId: 1,  
616 - questionString: 'タンポポの花で、めしべと子房はどれか。それぞれア~オから選べ',  
617 - questionImage: 'q0610001.png',  
618 - choicesId: [0, 1, 2, 3],  
619 - choicesString: ['めしべ:ア、子房:イ', 'めしべ:イ、子房:エ', 'めしべ:ア、子房:オ', 'めしべ:イ、子房:オ'],  
620 - answerId: 3,  
621 - answerString: 'めしべ:イ、子房:オ',  
622 - answerImage: ''  
623 - }, {  
624 - menuId: 6,  
625 - unitId: 101,  
626 - qaId: 0,  
627 - questionString: '図の A~E から、植物の特徴をもつ生物をすべて選べ',  
628 - questionImage: 'q0610100.png',  
629 - choicesId: [0, 1, 2, 3],  
630 - choicesString: ['B、D、E', 'B、E', 'A、D、E', 'B、D'],  
631 - answerId: 0,  
632 - answerString: 'B、D、E',  
633 - answerImage: ''  
634 - }, {  
635 - menuId: 6,  
636 - unitId: 101,  
637 - qaId: 1,  
638 - questionString: 'アには 10×、イには 40 と示されていた。このときの顕微鏡の倍率はいくらか',  
639 - questionImage: 'q0610101.png',  
640 - choicesId: [0, 1, 2, 3],  
641 - choicesString: ['100 倍', '400 倍', '40 倍', '10 倍'],  
642 - answerId: 1,  
643 - answerString: '400 倍',  
644 - answerImage: ''  
645 - }, {  
646 - menuId: 6,  
647 - unitId: 101,  
648 - qaId: 2,  
649 - questionString: '顕微鏡の倍率を高くすると、視野の広さと明るさはそれぞれどうなるか',  
650 - questionImage: '',  
651 - choicesId: [0, 1, 2, 3],  
652 - choicesString: ['広さ:せまくなる、明るさ:明るくなる', '広さ:広くなる、明るさ:暗くなる', '広さ:せまくなる、明るさ:暗くなる', '広さ:広くなる、明るさ:明るくなる'],  
653 - answerId: 2,  
654 - answerString: '広さ:せまくなる、明るさ:暗くなる',  
655 - answerImage: ''  
656 - }, {  
657 - menuId: 6,  
658 - unitId: 101,  
659 - qaId: 3,  
660 - questionString: '顕微鏡のピントを合わせるとき、対物レンズとプレパラートの距離はどうするか',  
661 - questionImage: '',  
662 - choicesId: [0, 1],  
663 - choicesString: ['遠ざけていく', '近づけていく'],  
664 - answerId: 0,  
665 - answerString: '遠ざけていく',  
666 - answerImage: ''  
667 - }, {  
668 - menuId: 6,  
669 - unitId: 102,  
670 - qaId: 0,  
671 - questionString: '図はサクラの花のつくりを表している。ア~エで、めしべとおしべはそれぞれどれか',  
672 - questionImage: 'q0610200.png',  
673 - choicesId: [0, 1, 2, 3],  
674 - choicesString: ['めしべ:ウ、おしべ:ア', 'めしべ:エ、おしべ:ア', 'めしべ:エ、おしべ:イ', 'めしべ:ア、おしべ:エ'],  
675 - answerId: 1,  
676 - answerString: 'めしべ:エ、おしべ:ア',  
677 - answerImage: ''  
678 - }, {  
679 - menuId: 6,  
680 - unitId: 102,  
681 - qaId: 1,  
682 - questionString: '図はマツの花のつくりを表している。C は何か',  
683 - questionImage: 'q0610201.png',  
684 - choicesId: [0, 1, 2, 3],  
685 - choicesString: ['めしべ', '子房', 'おしべ', '胚珠'],  
686 - answerId: 3,  
687 - answerString: '胚珠',  
688 - answerImage: ''  
689 - }, {  
690 - menuId: 6,  
691 - unitId: 103,  
692 - qaId: 0,  
693 - questionString: '図は被子植物の根のつくりを表したものである。A~C で主根はどれか',  
694 - questionImage: 'q0610300.png',  
695 - choicesId: [0, 1, 2],  
696 - choicesString: ['A', 'B', 'C'],  
697 - answerId: 2,  
698 - answerString: 'C',  
699 - answerImage: ''  
700 - }, {  
701 - menuId: 6,  
702 - unitId: 103,  
703 - qaId: 1,  
704 - questionString: '被子植物の葉の裏側には気孔が多くある。気孔の開閉によって調節されるのは、次のうちのどれか',  
705 - questionImage: '',  
706 - choicesId: [0, 1, 2],  
707 - choicesString: ['呼吸する量', '光合成する量', '蒸散する量'],  
708 - answerId: 2,  
709 - answerString: '蒸散する量',  
710 - answerImage: ''  
711 - }, {  
712 - menuId: 6,  
713 - unitId: 104,  
714 - qaId: 0,  
715 - questionString: '一晩暗いところに置いたはち植えのアサガオの1枚の葉の一部を図の①のようにアルミニウムはくでおおい、十分に日光を当て、②~④のように処理した。'  
716 - +'④の葉で、青紫色に変化するのはア~ウのうちどれか',  
717 - questionImage: 'q0610400.png',  
718 - choicesId: [0, 1, 2],  
719 - choicesString: ['ア', 'イ', 'ウ'],  
720 - answerId: 2,  
721 - answerString: 'ウ',  
722 - answerImage: ''  
723 - }, {  
724 - menuId: 6,  
725 - unitId: 104,  
726 - qaId: 1,  
727 - questionString: '植物が1日中行っていて、酸素を取り入れ、二酸化炭素を出すはたらきを何というか',  
728 - questionImage: '',  
729 - choicesId: [0, 1],  
730 - choicesString: ['呼吸', '光合成'],  
731 - answerId: 0,  
732 - answerString: '呼吸',  
733 - answerImage: ''  
734 - }, {  
735 - menuId: 6,  
736 - unitId: 105,  
737 - qaId: 0,  
738 - questionString: '8種類の植物のうち、裸子植物はどれか。すべて選べ',  
739 - questionImage: 'q0610500.png',  
740 - choicesId: [0, 1, 2, 3],  
741 - choicesString: ['ゼニゴケ', 'ゼニゴケ、ワラビ', 'イチョウ、ソテツ', 'イチョウ、ワラビ'],  
742 - answerId: 2,  
743 - answerString: 'イチョウ、ソテツ',  
744 - answerImage: ''  
745 - }, {  
746 - menuId: 6,  
747 - unitId: 105,  
748 - qaId: 1,  
749 - questionString: '8種類の植物のうち、種子をつくらずに胞子でなかまをふやす植物で、根・茎・葉の区別がある植物はどれか',  
750 - questionImage: 'q0610501.png',  
751 - choicesId: [0, 1, 2, 3],  
752 - choicesString: ['ゼニゴケ', 'ワラビ', 'ソテツ', 'ササ'],  
753 - answerId: 1,  
754 - answerString: 'ワラビ',  
755 - answerImage: ''  
756 - }, {  
757 - menuId: 7,  
758 - unitId: 100,  
759 - qaId: 0,  
760 - questionString: '図は、れき・砂・泥が混ざった土砂が流れこむ、ある河口近くの海岸のようすを断面図で表したものである。'  
761 - +'<br />ア~ウの層をつくっている堆積物の粒の大きい順にア~ウの記号を並べよ',  
762 - questionImage: 'q0710000.png',  
763 - choicesId: [0, 1, 2, 3],  
764 - choicesString: ['ア→イ→ウ', 'ウ→イ→ア', 'ア→ウ→イ', 'ウ→ア→イ'],  
765 - answerId: 0,  
766 - answerString: 'ア→イ→ウ',  
767 - answerImage: ''  
768 - }, {  
769 - menuId: 7,  
770 - unitId: 101,  
771 - qaId: 0,  
772 - questionString: '泥岩は、おもに何が堆積してできた岩石か',  
773 - questionImage: '',  
774 - choicesId: [0, 1, 2],  
775 - choicesString: ['砂', 'れき', '泥'],  
776 - answerId: 2,  
777 - answerString: '泥',  
778 - answerImage: ''  
779 - }, {  
780 - menuId: 7,  
781 - unitId: 101,  
782 - qaId: 1,  
783 - questionString: '図は、ある土地のボーリング資料をもとに、地層の重なりのようすを柱状図で表したものである。'  
784 - +'<br />地層の重なり方から考えて、このあたりの土地の海岸からの距離はどう変化したといえるか',  
785 - questionImage: 'q0710101.png',  
786 - choicesId: [0, 1, 2],  
787 - choicesString: ['海岸から次第に遠くなった', '海岸から次第に近くなった', 'ほとんど変わっていない'],  
788 - answerId: 0,  
789 - answerString: '海岸から次第に遠くなった',  
790 - answerImage: ''  
791 - }, {  
792 - menuId: 7,  
793 - unitId: 102,  
794 - qaId: 0,  
795 - questionString: '図は、火山のしくみを表したものである。'  
796 - +'<br />A は地下の高温の液体状のものである。また、B は A が火口から噴出して流れたものである。A、B をそれぞれ何というか',  
797 - questionImage: 'q0710200.png',  
798 - choicesId: [0, 1, 2, 3],  
799 - choicesString: ['A:溶岩、B:マグマ', 'A:火山ガス、B:マグマ', 'A:マグマ、B:溶岩'],  
800 - answerId: 2,  
801 - answerString: 'A:マグマ、B:溶岩',  
802 - answerImage: ''  
803 - }, {  
804 - menuId: 7,  
805 - unitId: 103,  
806 - qaId: 0,  
807 - questionString: '図は、2種類の火成岩のつくりを示したものである。'  
808 - +'<br />図1、図2は深成岩・火山岩のどちらか',  
809 - questionImage: 'q0710300.png',  
810 - choicesId: [0, 1],  
811 - choicesString: ['図1:深成岩、図2:火山岩', 'A:火山岩、B:深成岩'],  
812 - answerId: 0,  
813 - answerString: 'A:深成岩、B:火山岩',  
814 - answerImage: ''  
815 - }, {  
816 - menuId: 7,  
817 - unitId: 103,  
818 - qaId: 1,  
819 - questionString: '次のア~カの鉱物の中で、有色鉱物はどれか',  
820 - questionImage: 'q0710301.png',  
821 - choicesId: [0, 1, 2, 3],  
822 - choicesString: ['ア、ウ、カ', 'ア、イ、エ、カ', 'ウ、カ', 'ア、ウ、エ、カ'],  
823 - answerId: 3,  
824 - answerString: 'ア、ウ、エ、カ',  
825 - answerImage: ''  
826 - }, {  
827 - menuId: 7,  
828 - unitId: 104,  
829 - qaId: 0,  
830 - questionString: 'グラフは、ある地震の波について、震源からの距離と地震の波の到着時刻の関係を示したものである。グラフ A で表される波の伝わる速さは、毎秒何kmか',  
831 - questionImage: 'q0710400.png',  
832 - choicesId: [0, 1, 2, 3],  
833 - choicesString: ['4 km', '8 km', '12 km', '16 km'],  
834 - answerId: 1,  
835 - answerString: '8 km',  
836 - answerImage: ''  
837 - }, {  
838 - menuId: 7,  
839 - unitId: 104,  
840 - qaId: 1,  
841 - questionString: '地震ではマグニチュードが大きいほど、何が大きくなるのか',  
842 - questionImage: '',  
843 - choicesId: [0, 1],  
844 - choicesString: ['地震の規模', '揺れの大きさ'],  
845 - answerId: 0,  
846 - answerString: '地震の規模',  
847 - answerImage: ''  
848 - }, {  
849 - menuId: 7,  
850 - unitId: 105,  
851 - qaId: 0,  
852 - questionString: '図のように、地層に大きな力がはたらき、ある面を境にして地層がくいちがう変動を何というか',  
853 - questionImage: 'q0710500.png',  
854 - choicesId: [0, 1],  
855 - choicesString: ['断層', 'しゅう曲'],  
856 - answerId: 0,  
857 - answerString: '断層',  
858 - answerImage: ''  
859 - }, {  
860 - menuId: 7,  
861 - unitId: 105,  
862 - qaId: 1,  
863 - questionString: '図のように、地層に大きな力がはたらき、地層がおし曲げられる変動を何というか',  
864 - questionImage: 'q0710501.png',  
865 - choicesId: [0, 1],  
866 - choicesString: ['断層', 'しゅう曲'],  
867 - answerId: 1,  
868 - answerString: 'しゅう曲',  
869 - answerImage: ''  
870 - }, {  
871 - menuId: 7,  
872 - unitId: 105,  
873 - qaId: 2,  
874 - questionString: '大きな地震によってつくられる土地の変化として適当なものを、ア~ウから1つ選べ',  
875 - questionImage: 'q0710502.png',  
876 - choicesId: [0, 1, 2],  
877 - choicesString: ['ア', 'イ', 'ウ'],  
878 - answerId: 0,  
879 - answerString: 'ア',  
880 - answerImage: ''  
881 - }];  
882 -  
883 - return qa;  
884 - }  
885 -  
886 -}  
1 -import { Injectable } from '@angular/core';  
2 -import { Unit } from './define-unit';  
3 -/*  
4 - Generated class for the DataService provider.  
5 -  
6 - See https://angular.io/docs/ts/latest/guide/dependency-injection.html  
7 - for more info on providers and Angular 2 DI.  
8 -*/  
9 -@Injectable()  
10 -export class ContentsExtunit {  
11 - extunit: Unit[];  
12 -  
13 - constructor() {  
14 - this.extunit = this.createExtUnit();  
15 - }  
16 -  
17 - private createExtUnit(): Unit[] {  
18 - var unit = [{  
19 - menuId: 0,  
20 - unitId: 100,  
21 - level: '10',  
22 - unitName: '光の反射'  
23 - }, {  
24 - menuId: 0,  
25 - unitId: 101,  
26 - level: '10',  
27 - unitName: '光の屈折'  
28 - }, {  
29 - menuId: 0,  
30 - unitId: 102,  
31 - level: '10',  
32 - unitName: '凸レンズと像'  
33 - }, {  
34 - menuId: 0,  
35 - unitId: 103,  
36 - level: '10',  
37 - unitName: '音の性質と速さ'  
38 - }, {  
39 - menuId: 0,  
40 - unitId: 104,  
41 - level: '10',  
42 - unitName: '力とばねののび'  
43 - }, {  
44 - menuId: 0,  
45 - unitId: 105,  
46 - level: '10',  
47 - unitName: '圧力・浮力'  
48 - }, {  
49 - menuId: 1,  
50 - unitId: 100,  
51 - level: '10',  
52 - unitName: '物質の性質'  
53 - }, {  
54 - menuId: 1,  
55 - unitId: 101,  
56 - level: '10',  
57 - unitName: '物質の状態変化'  
58 - }, {  
59 - menuId: 1,  
60 - unitId: 102,  
61 - level: '10',  
62 - unitName: '気体の性質'  
63 - }, {  
64 - menuId: 1,  
65 - unitId: 103,  
66 - level: '10',  
67 - unitName: '融点と沸点'  
68 - }, {  
69 - menuId: 1,  
70 - unitId: 104,  
71 - level: '10',  
72 - unitName: '水溶液の性質'  
73 - }, {  
74 - menuId: 1,  
75 - unitId: 105,  
76 - level: '10',  
77 - unitName: '水溶液の濃度'  
78 - }, {  
79 - menuId: 2,  
80 - unitId: 100,  
81 - level: '10',  
82 - unitName: '回路(1)'  
83 - }, {  
84 - menuId: 2,  
85 - unitId: 101,  
86 - level: '10',  
87 - unitName: '回路(2)'  
88 - }, {  
89 - menuId: 2,  
90 - unitId: 102,  
91 - level: '10',  
92 - unitName: '回路(3)'  
93 - }, {  
94 - menuId: 2,  
95 - unitId: 103,  
96 - level: '10',  
97 - unitName: '抵抗'  
98 - }, {  
99 - menuId: 2,  
100 - unitId: 104,  
101 - level: '10',  
102 - unitName: '電流による発熱'  
103 - }, {  
104 - menuId: 2,  
105 - unitId: 105,  
106 - level: '10',  
107 - unitName: '静電気'  
108 - }, {  
109 - menuId: 3,  
110 - unitId: 100,  
111 - level: '10',  
112 - unitName: '磁石の磁界(1)'  
113 - }, {  
114 - menuId: 3,  
115 - unitId: 101,  
116 - level: '10',  
117 - unitName: '磁石の磁界(2)'  
118 - }, {  
119 - menuId: 3,  
120 - unitId: 102,  
121 - level: '10',  
122 - unitName: 'コイルのまわりの磁界'  
123 - }, {  
124 - menuId: 3,  
125 - unitId: 103,  
126 - level: '10',  
127 - unitName: '電流が磁界から受ける力'  
128 - }, {  
129 - menuId: 3,  
130 - unitId: 104,  
131 - level: '10',  
132 - unitName: '電磁誘導'  
133 - }, {  
134 - menuId: 3,  
135 - unitId: 105,  
136 - level: '10',  
137 - unitName: '直流と交流'  
138 - }, {  
139 - menuId: 4,  
140 - unitId: 100,  
141 - level: '10',  
142 - unitName: '分解(1)'  
143 - }, {  
144 - menuId: 4,  
145 - unitId: 101,  
146 - level: '10',  
147 - unitName: '分解(2)'  
148 - }, {  
149 - menuId: 4,  
150 - unitId: 102,  
151 - level: '10',  
152 - unitName: '分解(3)'  
153 - }, {  
154 - menuId: 4,  
155 - unitId: 103,  
156 - level: '10',  
157 - unitName: '原子と分子'  
158 - }, {  
159 - menuId: 4,  
160 - unitId: 104,  
161 - level: '10',  
162 - unitName: '化合'  
163 - }, {  
164 - menuId: 4,  
165 - unitId: 105,  
166 - level: '10',  
167 - unitName: '化学反応式'  
168 - }, {  
169 - menuId: 5,  
170 - unitId: 100,  
171 - level: '10',  
172 - unitName: '酸化'  
173 - }, {  
174 - menuId: 5,  
175 - unitId: 101,  
176 - level: '10',  
177 - unitName: '還元'  
178 - }, {  
179 - menuId: 5,  
180 - unitId: 102,  
181 - level: '10',  
182 - unitName: '化学変化の前後の質量'  
183 - }, {  
184 - menuId: 5,  
185 - unitId: 103,  
186 - level: '10',  
187 - unitName: '金属と化合する酸素の質量'  
188 - }, {  
189 - menuId: 5,  
190 - unitId: 104,  
191 - level: '10',  
192 - unitName: '化合する物質の質量の割合'  
193 - }, {  
194 - menuId: 5,  
195 - unitId: 105,  
196 - level: '10',  
197 - unitName: '化学変化と熱'  
198 - }, {  
199 - menuId: 6,  
200 - unitId: 100,  
201 - level: '10',  
202 - unitName: '身近な生物の観察'  
203 - }, {  
204 - menuId: 6,  
205 - unitId: 101,  
206 - level: '10',  
207 - unitName: '水中の小さな生物と顕微鏡'  
208 - }, {  
209 - menuId: 6,  
210 - unitId: 102,  
211 - level: '10',  
212 - unitName: '花のつくり'  
213 - }, {  
214 - menuId: 6,  
215 - unitId: 103,  
216 - level: '10',  
217 - unitName: '根・茎・葉のつくり'  
218 - }, {  
219 - menuId: 6,  
220 - unitId: 104,  
221 - level: '10',  
222 - unitName: '光合成と呼吸'  
223 - }, {  
224 - menuId: 6,  
225 - unitId: 105,  
226 - level: '10',  
227 - unitName: '植物のなかま'  
228 - }, {  
229 - menuId: 7,  
230 - unitId: 100,  
231 - level: '10',  
232 - unitName: '地層のでき方'  
233 - }, {  
234 - menuId: 7,  
235 - unitId: 101,  
236 - level: '10',  
237 - unitName: '堆積岩と化石'  
238 - }, {  
239 - menuId: 7,  
240 - unitId: 102,  
241 - level: '10',  
242 - unitName: '火山とマグマ'  
243 - }, {  
244 - menuId: 7,  
245 - unitId: 103,  
246 - level: '10',  
247 - unitName: '火成岩と鉱物'  
248 - }, {  
249 - menuId: 7,  
250 - unitId: 104,  
251 - level: '10',  
252 - unitName: '地震のゆれと伝わり方'  
253 - }, {  
254 - menuId: 7,  
255 - unitId: 105,  
256 - level: '10',  
257 - unitName: '地層の変形'  
258 - }];  
259 -  
260 - return unit;  
261 - }  
262 -  
263 -  
264 -}  
1 -import { Injectable } from '@angular/core';  
2 -import { Keyword } from './define-keyword';  
3 -/*  
4 - Generated class for the DataService provider.  
5 -  
6 - See https://angular.io/docs/ts/latest/guide/dependency-injection.html  
7 - for more info on providers and Angular 2 DI.  
8 -*/  
9 -@Injectable()  
10 -export class ContentsKeyword {  
11 - keyword: Keyword[];  
12 -  
13 - constructor() {  
14 - this.keyword = this.createKeyword();  
15 - }  
16 -  
17 - private createKeyword(): Keyword[] {  
18 - var keyword = [{  
19 - menuId: 0, //6文字  
20 - words: ["う","ご","う","こ","い","せ"],  
21 - answer: 'こうごうせい'  
22 - }, {  
23 - menuId: 1, //7文字  
24 - words: ["あ","ん","り","べ","し","だ","き"],  
25 - answer: 'しべりあきだん'  
26 - }, {  
27 - menuId: 2, //7文字  
28 - words: ["し","う","る","い","そ","よ","う"],  
29 - answer: 'そうしようるい'  
30 - }, {  
31 - menuId: 3, //6文字  
32 - words: ["へ","く","ん","か","が","か"],  
33 - answer: 'かがくへんか'  
34 - }, {  
35 - menuId: 4, //5文字  
36 - words: ["ゆ","ぶ","う","き","つ"],  
37 - answer: 'ゆうきぶつ'  
38 - }, {  
39 - menuId: 5, //7文字  
40 - words: ["こ","と","ど","み","ん","あ","り"],  
41 - answer: 'みとこんどりあ'  
42 - }, {  
43 - menuId: 6, //6文字  
44 - words: ["か","お","せ","い","う","い"],  
45 - answer: 'かいおうせい'  
46 - }, {  
47 - menuId: 7, //6文字  
48 - words: ["く","ぼ","ま","さ","い","う"],  
49 - answer: 'さいぼうまく'  
50 - }];  
51 -  
52 - return keyword;  
53 - }  
54 -  
55 -}  
@@ -19,12 +19,12 @@ export class ContentsQa { @@ -19,12 +19,12 @@ export class ContentsQa {
19 menuId: 0, 19 menuId: 0,
20 unitId: 0, 20 unitId: 0,
21 qaId: 0, 21 qaId: 0,
22 - questionString: '光が、鏡で反射するとき、入射角と反射角の大きさは{ ? }', 22 + questionString: '村松さとしは課長から,「君は場の空気が読めないときがある」と言われた。次は村松が、どのようなことを言われているのか考えたことである。中から不適当と思われるものを一つ選びなさい。',
23 questionImage: '', 23 questionImage: '',
24 - choicesId: [0,1,2],  
25 - choicesString: [ '反射角が大きい','入射角が大きい','等しい'], 24 + choicesId: [0,1,2,3,4],
  25 + choicesString: [ '反射角が大きい','入射角が大きい','等しい','等しい','等しい'],
26 answerId: 2, 26 answerId: 2,
27 - answerString: '等しい', 27 + answerString: '場の空気が読めないと言われたのは, 村松の言動がその場に合っていないから。会議は皆で話し合い改善などをする場なのだから, 課長と反対の意見を言っても差し支えない。それを, 空気が読めない例と考えたのは不適当ということになる。',
28 answerImage: 'a000000.png' 28 answerImage: 'a000000.png'
29 }, { 29 }, {
30 menuId: 0, 30 menuId: 0,
1 -import { Injectable } from '@angular/core'; 1 +import { Injectable } from '@angular/core';
2 import 'rxjs/add/operator/map'; 2 import 'rxjs/add/operator/map';
3 import { Menu } from './define-menu'; 3 import { Menu } from './define-menu';
4 import { Unit } from './define-unit'; 4 import { Unit } from './define-unit';
5 import { Qa } from './define-qa'; 5 import { Qa } from './define-qa';
6 -import { Keyword } from './define-keyword';  
7 import { Contents } from './define-contents'; 6 import { Contents } from './define-contents';
8 import { Storage } from '@ionic/storage'; 7 import { Storage } from '@ionic/storage';
9 /* 8 /*
@@ -20,9 +19,6 @@ export class DataService { @@ -20,9 +19,6 @@ export class DataService {
20 menu: Menu[]; 19 menu: Menu[];
21 unit: Unit[]; 20 unit: Unit[];
22 subject: Qa[]; 21 subject: Qa[];
23 - extunit: Unit[];  
24 - extqa: Qa[];  
25 - keyword: Keyword[];  
26 22
27 constructor(st: Storage) { 23 constructor(st: Storage) {
28 this.st = st; 24 this.st = st;
@@ -30,9 +26,6 @@ export class DataService { @@ -30,9 +26,6 @@ export class DataService {
30 this.menu = this.contents.menu; 26 this.menu = this.contents.menu;
31 this.unit = this.contents.unit; 27 this.unit = this.contents.unit;
32 this.subject = this.contents.qa; 28 this.subject = this.contents.qa;
33 - this.extunit = this.contents.extunit;  
34 - this.extqa = this.contents.extqa;  
35 - this.keyword = this.contents.keyword;  
36 } 29 }
37 30
38 public getMenuFirst(): Menu[]{ 31 public getMenuFirst(): Menu[]{
@@ -80,26 +73,16 @@ export class DataService { @@ -80,26 +73,16 @@ export class DataService {
80 return num; 73 return num;
81 } 74 }
82 75
83 - public getUnit(menuId: number, unitId:number): Unit[] { 76 + public getUnit(menuId: number): Unit[] {
84 var subjectList: Unit[] = new Array(); 77 var subjectList: Unit[] = new Array();
85 for (var i = 0; i < this.unit.length; i++) { 78 for (var i = 0; i < this.unit.length; i++) {
86 - if ((this.unit[i].unitId === unitId) && (this.unit[i].menuId === menuId)) { 79 + if (this.unit[i].menuId === menuId) {
87 subjectList.push(this.unit[i]); 80 subjectList.push(this.unit[i]);
88 } 81 }
89 } 82 }
90 return subjectList; 83 return subjectList;
91 } 84 }
92 85
93 - public getExtUnit(menuId: number): Unit[] {  
94 - var subjectList: Unit[] = new Array();  
95 - for (var i = 0; i < this.extunit.length; i++) {  
96 - if (this.extunit[i].menuId === menuId) {  
97 - subjectList.push(this.extunit[i]);  
98 - }  
99 - }  
100 - return subjectList;  
101 - }  
102 -  
103 public getQaCnt(menuId:number): number { 86 public getQaCnt(menuId:number): number {
104 var num = 0; 87 var num = 0;
105 for (var i = 0; i < this.subject.length; i++) { 88 for (var i = 0; i < this.subject.length; i++) {
@@ -110,16 +93,6 @@ export class DataService { @@ -110,16 +93,6 @@ export class DataService {
110 return num; 93 return num;
111 } 94 }
112 95
113 - public getExtQaCnt(menuId:number): number {  
114 - var num = 0;  
115 - for (var i = 0; i < this.extqa.length; i++) {  
116 - if (this.extqa[i].menuId === menuId) {  
117 - num++;  
118 - }  
119 - }  
120 - return num;  
121 - }  
122 -  
123 public getQa(menuId: number, unitId: number): Qa[] { 96 public getQa(menuId: number, unitId: number): Qa[] {
124 var qaItem: Qa[] = new Array(); 97 var qaItem: Qa[] = new Array();
125 for (var i = 0; i < this.subject.length; i++) { 98 for (var i = 0; i < this.subject.length; i++) {
@@ -127,29 +100,38 @@ export class DataService { @@ -127,29 +100,38 @@ export class DataService {
127 qaItem.push(this.subject[i]); 100 qaItem.push(this.subject[i]);
128 } 101 }
129 } 102 }
130 - return qaItem;  
131 - }  
132 103
133 - public getExtqa(menuId: number, unitId: number): Qa[] {  
134 - var qaItem: Qa[] = new Array();  
135 - for (var i = 0; i < this.extqa.length; i++) {  
136 - if ((this.extqa[i].menuId === menuId) && (this.extqa[i].unitId === unitId)) {  
137 - qaItem.push(this.extqa[i]); 104 + //解答並び替え
  105 + for(var j=0; j<qaItem.length; j++)
  106 + {
  107 + qaItem[j].choicesId.sort(function() {
  108 +         return Math.random() - 0.5;
  109 + });
  110 +
  111 + var chString: string[] = new Array(qaItem[j].choicesId.length);
  112 + var chId:number[] = new Array(qaItem[j].choicesId.length);
  113 + var aId:number = qaItem[j].answerId;
  114 + for(var k=0; k<qaItem[j].choicesId.length; k++)
  115 + {
  116 + chString[k] = qaItem[j].choicesString[qaItem[j].choicesId[k]];
  117 + chId[k] = k;
  118 + if(qaItem[j].choicesId[k] == qaItem[j].answerId)
  119 + {
  120 + aId = k;
  121 + }
138 } 122 }
139 - } 123 + qaItem[j].choicesId = chId;
  124 + qaItem[j].choicesString = chString;
  125 + qaItem[j].answerId = aId;
  126 + }
  127 +
  128 + //問題並び替え
  129 + qaItem.sort(function() {
  130 +         return Math.random() - 0.5;
  131 + });
140 return qaItem; 132 return qaItem;
141 } 133 }
142 134
143 - public getKeyword(menuId: number): Keyword {  
144 - var key: Keyword;  
145 - for (var i = 0; i < this.keyword.length; i++) {  
146 - if (this.keyword[i].menuId === menuId) {  
147 - key = this.keyword[i];  
148 - }  
149 - }  
150 - return key;  
151 - }  
152 -  
153 public saveDone(key: string) { 135 public saveDone(key: string) {
154 this.st.get(key).then(val => { 136 this.st.get(key).then(val => {
155 if (val == "done") { 137 if (val == "done") {
@@ -2,13 +2,9 @@ import { Injectable } from '@angular/core'; @@ -2,13 +2,9 @@ import { Injectable } from '@angular/core';
2 import { Menu } from './define-menu'; 2 import { Menu } from './define-menu';
3 import { Unit } from './define-unit'; 3 import { Unit } from './define-unit';
4 import { Qa } from './define-qa'; 4 import { Qa } from './define-qa';
5 -import { Keyword } from './define-keyword';  
6 import { ContentsMenu } from './content-menu'; 5 import { ContentsMenu } from './content-menu';
7 import { ContentsUnit } from './content-unit'; 6 import { ContentsUnit } from './content-unit';
8 import { ContentsQa } from './content-qa'; 7 import { ContentsQa } from './content-qa';
9 -import { ContentsExtunit } from './content-extunit';  
10 -import { ContentsExtqa } from './content-extqa';  
11 -import { ContentsKeyword } from './content-keyword';  
12 /* 8 /*
13 Generated class for the DataService provider. 9 Generated class for the DataService provider.
14 10
@@ -20,9 +16,6 @@ export class Contents { @@ -20,9 +16,6 @@ export class Contents {
20 menu: Menu[]; 16 menu: Menu[];
21 unit: Unit[]; 17 unit: Unit[];
22 qa :Qa[]; 18 qa :Qa[];
23 - extunit: Unit[];  
24 - extqa :Qa[];  
25 - keyword: Keyword[];  
26 19
27 constructor() { 20 constructor() {
28 var menu = new ContentsMenu(); 21 var menu = new ContentsMenu();
@@ -34,14 +27,6 @@ export class Contents { @@ -34,14 +27,6 @@ export class Contents {
34 var qa = new ContentsQa(); 27 var qa = new ContentsQa();
35 this.qa = qa.qa; 28 this.qa = qa.qa;
36 29
37 - var extunit = new ContentsExtunit();  
38 - this.extunit = extunit.extunit;  
39 -  
40 - var extqa = new ContentsExtqa();  
41 - this.extqa = extqa.extqa;  
42 -  
43 - var keyword = new ContentsKeyword();  
44 - this.keyword = keyword.keyword;  
45 } 30 }
46 31
47 } 32 }
1 -export interface Keyword {  
2 - menuId: number;  
3 - words: string[];  
4 - answer: string;  
5 -}  
Please register or login to post a comment