MIF_E31222854/database/seeders/QuizTableSeeder.php

289 lines
7.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class QuizTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$questions = [
[
'id_materi' => 2,
'question' => 'Ada berapa jumlah huruf yang memiliki sifat Jahr?',
'option_a' => '19',
'option_b' => '20',
'option_c' => '21',
'option_d' => '10',
'correct_option' => 'b',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Ada berapa jumlah huruf yang memiliki sifat Tawassuth?',
'option_a' => '4',
'option_b' => '5',
'option_c' => '10',
'option_d' => '7',
'correct_option' => 'b',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Ada berapa jumlah huruf yang memiliki sifat Tafasysyi?',
'option_a' => '1',
'option_b' => '4',
'option_c' => '5',
'option_d' => '7',
'correct_option' => 'a',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Ada berapa jumlah huruf yang memiliki sifat Qalqalah?',
'option_a' => '1',
'option_b' => '4',
'option_c' => '5',
'option_d' => '7',
'correct_option' => 'b',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Ada berapa jumlah huruf yang memiliki sifat Shafir?',
'option_a' => '1',
'option_b' => '4',
'option_c' => '5',
'option_d' => '3',
'correct_option' => 'd',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Sifat apa yang berlawanan dari sifat Hams?',
'option_a' => 'Syiddah',
'option_b' => 'Tawassuth',
'option_c' => 'Istila',
'option_d' => 'Jahr',
'correct_option' => 'd',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Sifat apa yang berlawanan dari sifat Ishmat?',
'option_a' => 'Infitah',
'option_b' => 'Idzlaq',
'option_c' => 'Istila',
'option_d' => 'Tawassuth',
'correct_option' => 'b',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Sifat apa yang berlawanan dari sifat Istila?',
'option_a' => 'Infitah',
'option_b' => 'Istifal',
'option_c' => 'Lin',
'option_d' => 'Shafir',
'correct_option' => 'b',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Sifat apa yang berlawanan dari sifat Shafir?',
'option_a' => 'Lin',
'option_b' => 'Qalqalah',
'option_c' => 'Hams',
'option_d' => 'Tidak ada',
'correct_option' => 'd',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Sifat apa yang berlawanan dari sifat Infitah?',
'option_a' => 'Ithbaq',
'option_b' => 'Idzlaq',
'option_c' => 'Jahr',
'option_d' => 'Hams',
'correct_option' => 'a',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Berikut ini adalah sifat-sifat yang dimiliki huruf ba (ب) kecuali...',
'option_a' => 'Qalqalah',
'option_b' => 'Jahr',
'option_c' => 'Syiddah',
'option_d' => 'Istila',
'correct_option' => 'd',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Berikut ini adalah sifat-sifat yang dimiliki huruf ro (ر) kecuali...',
'option_a' => 'Jahr',
'option_b' => 'Syiddah',
'option_c' => 'Takrir',
'option_d' => 'Infitah',
'correct_option' => 'd',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Berikut ini adalah sifat-sifat yang dimiliki huruf syin (ش) kecuali...',
'option_a' => 'Hams',
'option_b' => 'Rakhawah',
'option_c' => 'Qalqalah',
'option_d' => 'Tafasysyi',
'correct_option' => 'c',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Berikut ini adalah sifat-sifat yang dimiliki huruf ta (ت) kecuali...',
'option_a' => 'Hams',
'option_b' => 'Syiddah',
'option_c' => 'Istifal',
'option_d' => 'Ithbaq',
'correct_option' => 'd',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Berikut ini adalah sifat-sifat yang dimiliki huruf kho (خ) kecuali...',
'option_a' => 'Hams',
'option_b' => 'Rakhawah',
'option_c' => 'Idzlaq',
'option_d' => 'Istila',
'correct_option' => 'b',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Manakah huruf berikut yang memiliki sifat Syiddah?',
'option_a' => 'Syin',
'option_b' => 'Qaf',
'option_c' => 'Nun',
'option_d' => 'Lam',
'correct_option' => 'b',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Manakah huruf berikut yang memiliki sifat Inhiraf?',
'option_a' => 'Syin',
'option_b' => 'Qaf',
'option_c' => 'Nun',
'option_d' => 'Lam',
'correct_option' => 'a',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Manakah huruf berikut yang memiliki sifat Istithalah?',
'option_a' => 'Ro',
'option_b' => 'Dhad',
'option_c' => 'Mim',
'option_d' => 'Ain',
'correct_option' => 'b',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Manakah huruf berikut yang memiliki sifat Ghunnah?',
'option_a' => 'Ro',
'option_b' => 'Dhad',
'option_c' => 'Mim',
'option_d' => 'Ain',
'correct_option' => 'c',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Manakah huruf berikut yang memiliki sifat Idzlaq?',
'option_a' => 'Ro',
'option_b' => 'Dhad',
'option_c' => 'Syin',
'option_d' => 'Ain',
'correct_option' => 'c',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Pilih pernyataan benar berikut ini!',
'option_a' => 'Jahr adalah tertahannya aliran nafas ketika mengucapkan huruf',
'option_b' => 'Syiddah adalah mengalirnya suara ketika mengucapkan huruf',
'option_c' => 'Istila adalah turunnya pangkal lidah ketika mengucapkan huruf',
'option_d' => 'Tawassuth adalah tertahannya suara ketika mengucapkan huruf',
'correct_option' => 'b',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Huruf ro dan lam memiliki sifat yang hampir sama, namun ada satu sifat yang membedakan keduanya. Sifat itu adalah sifat....',
'option_a' => 'Istithalah',
'option_b' => 'Tafasysyi',
'option_c' => 'Takrir',
'option_d' => 'Lin',
'correct_option' => 'c',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Pilih pernyataan benar berikut ini!',
'option_a' => 'Tawassuth merupakan sifat pertengahan antara Istila dan Istifal',
'option_b' => 'Sifat Qalqalah merupakan sifat yang tidak memiliki lawan',
'option_c' => 'Ada 10 huruf yang memiliki sifat Istila',
'option_d' => 'Jumlah sifat yang dimiliki huruf hamzah adalah 9 sifat.',
'correct_option' => 'a',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Sifat Inhiraf hanya dimiliki oleh dua huruf, yaitu',
'option_a' => 'Lam dan Ro',
'option_b' => 'Nun dan Mim',
'option_c' => 'Hamzah dan Alif',
'option_d' => 'Sin dan Shad',
'correct_option' => 'a',
'score' => 20,
],
[
'id_materi' => 2,
'question' => 'Pilih pernyataan benar berikut ini!',
'option_a' => 'Sifat Takrir adalah bergetarnya bibir ketika mengucapkan huruf',
'option_b' => 'Sifat Ishmat adalah cepatnya suara ketika mengucapkan huruf',
'option_c' => 'Sifat Tafasysyi adalah lawan kata dari sifat Inhiraf',
'option_d' => 'Sifat Lin adalah mengucapkan huruf dengan lentur',
'correct_option' => 'd',
'score' => 20,
]
];
// Insert data soal ke dalam tabel quiz
foreach ($questions as $question) {
DB::table('quiz')->insert([
'id_materi' => $question['id_materi'],
'question' => $question['question'],
'option_a' => $question['option_a'],
'option_b' => $question['option_b'],
'option_c' => $question['option_c'],
'option_d' => $question['option_d'],
'correct_option' => $question['correct_option'],
'score' => $question['score'],
'status' => 'unanswered',
'created_at' => now(),
'updated_at' => now(),
]);
}
}
}