From 92d38c90c714f02b72c94491c402ea29cd854a82 Mon Sep 17 00:00:00 2001 From: Hasib Mahmud Date: Fri, 24 Jul 2020 22:34:27 +0600 Subject: [PATCH 1/2] Add Certificate upload feature --- .phpunit.result.cache | 2 +- app/Certificate.php | 23 +++++ .../Controllers/CertificateController.php | 93 +++++++++++++++++++ app/Http/Controllers/NoticeController.php | 1 - app/Http/Controllers/UploadController.php | 14 +++ database/factories/CertificateFactory.php | 25 +++++ ...07_24_201246_create_certificates_table.php | 37 ++++++++ database/seeds/CertificateTableSeeder.php | 16 ++++ database/seeds/DatabaseSeeder.php | 1 + readme.md | 17 +++- resources/views/certificates/create.blade.php | 28 ++++++ resources/views/certificates/index.blade.php | 26 ++++++ .../components/certificate-list.blade.php | 22 +++++ .../views/components/file-uploader.blade.php | 9 +- .../views/components/navbar-top.blade.php | 2 +- .../components/uploaded-files-list.blade.php | 9 ++ .../views/layouts/leftside-menubar.blade.php | 18 ++++ routes/web.php | 9 +- tests/Feature/CertificateTest.php | 41 ++++++++ 19 files changed, 386 insertions(+), 7 deletions(-) create mode 100644 app/Certificate.php create mode 100644 app/Http/Controllers/CertificateController.php create mode 100644 database/factories/CertificateFactory.php create mode 100644 database/migrations/2020_07_24_201246_create_certificates_table.php create mode 100644 database/seeds/CertificateTableSeeder.php create mode 100644 resources/views/certificates/create.blade.php create mode 100644 resources/views/certificates/index.blade.php create mode 100644 resources/views/components/certificate-list.blade.php create mode 100644 tests/Feature/CertificateTest.php diff --git a/.phpunit.result.cache b/.phpunit.result.cache index 33014bb79..e7c69bcbe 100644 --- a/.phpunit.result.cache +++ b/.phpunit.result.cache @@ -1 +1 @@ -C:37:"PHPUnit\Runner\DefaultTestResultCache":19353:{a:2:{s:7:"defects";a:95:{s:74:"Tests\Feature\AttendanceModuleTest::can_view_student_attendance_by_section";i:4;s:92:"Tests\Feature\AttendanceModuleTest::students_are_added_to_a_section_before_taking_attendance";i:4;s:82:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_adjust_student_attendance";i:4;s:62:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_be_created";i:3;s:58:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_log_in";i:3;s:112:"Tests\Feature\GradeModuleTest::teacher_can_get_total_calculated_marks_of_each_student_of_a_section_of_his_course";i:4;s:81:"Tests\Feature\GradeModuleTest::teacher_can_save_grade_for_a_section_of_his_course";i:4;s:70:"Tests\Feature\LibrarianTest::can_see_some_personal_student_information";i:4;s:72:"Tests\Feature\LibrarianTest::can_see_some_personal_librarian_information";i:4;s:47:"Tests\Feature\LibrarianTest::can_add_a_new_book";i:4;s:64:"Tests\Feature\Library\BookModuleTest::it_loads_the_new_book_page";i:3;s:85:"Tests\Feature\UserModuleTest::admin_redirected_to_register_with_register_role_student";i:4;s:70:"Tests\Feature\LibrarianTest::can_see_some_personal_teacher_information";i:4;s:53:"Tests\Feature\LibrarianTest::can_see_list_of_students";i:4;s:72:"Tests\Feature\AccountingModuleTest::accountant_can_view_edit_sector_form";i:4;s:62:"Tests\Feature\AccountingModuleTest::accountant_can_edit_sector";i:4;s:43:"Tests\Feature\AccountingModuleTest::view_is";i:4;s:64:"Tests\Feature\AccountingModuleTest::accountant_can_create_sector";i:4;s:67:"Tests\Feature\AccountingModuleTest::accountant_can_view_income_list";i:4;s:61:"Tests\Feature\AccountingModuleTest::accountant_can_add_income";i:4;s:68:"Tests\Feature\AccountingModuleTest::accountant_can_view_expense_list";i:4;s:62:"Tests\Feature\AccountingModuleTest::accountant_can_add_expense";i:4;s:64:"Tests\Feature\AttendanceModuleTest::can_view_students_by_section";i:4;s:73:"Tests\Feature\AttendanceModuleTest::view_student_attendance_by_student_id";i:4;s:92:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_view_adjust_student_attendance_form";i:4;s:81:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_take_students_attendance";i:4;s:83:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_update_students_attendance";i:4;s:91:"Tests\Feature\Auth\RegisterLoginTest::test_unauthenticated_user_cannot_view_a_register_form";i:3;s:69:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_view_a_login_form";i:3;s:79:"Tests\Feature\CourseModuleTest::admin_or_teacher_can_view_courses_by_teacher_id";i:4;s:79:"Tests\Feature\CourseModuleTest::admin_or_teacher_can_view_courses_by_section_id";i:4;s:85:"Tests\Feature\CourseModuleTest::can_view_students_from_grade_table_by_course_and_exam";i:4;s:52:"Tests\Feature\CourseModuleTest::admin_can_add_course";i:4;s:67:"Tests\Feature\CourseModuleTest::admin_can_save_course_configuration";i:4;s:40:"Tests\Feature\ExampleTest::testBasicTest";i:3;s:75:"Tests\Feature\GradeModuleTest::can_view_classes_sections_for_students_grade";i:4;s:74:"Tests\Feature\GradeModuleTest::can_view_all_students_marks_under_a_section";i:4;s:58:"Tests\Feature\GradeModuleTest::can_view_grade_of_a_student";i:4;s:90:"Tests\Feature\GradeModuleTest::teacher_can_view_students_grades_of_a_section_of_his_course";i:4;s:92:"Tests\Feature\GradeModuleTest::teacher_can_submit_students_grades_of_a_section_of_his_course";i:4;s:44:"Tests\Feature\GradeSystemModuleTest::view_is";i:4;s:76:"Tests\Feature\GradeSystemModuleTest::admin_can_view_grade_system_create_form";i:4;s:66:"Tests\Feature\GradeSystemModuleTest::admin_can_create_grade_system";i:4;s:66:"Tests\Feature\GradeSystemModuleTest::admin_can_delete_grade_system";i:4;s:73:"Tests\Feature\LibrarianTest::can_see_dashboard_as_a_home_page_after_login";i:4;s:53:"Tests\Feature\LibrarianTest::can_see_list_of_teachers";i:4;s:55:"Tests\Feature\LibrarianTest::can_see_list_of_librarians";i:4;s:46:"Tests\Feature\LibrarianTest::can_see_all_books";i:4;s:49:"Tests\Feature\LibrarianTest::can_see_book_details";i:4;s:50:"Tests\Feature\LibrarianTest::can_edit_book_details";i:4;s:49:"Tests\Feature\LibrarianTest::can_see_issued_books";i:4;s:61:"Tests\Feature\Library\BookModuleTest::it_shows_the_books_list";i:3;s:67:"Tests\Feature\Library\BookModuleTest::it_displays_the_books_details";i:3;s:59:"Tests\Feature\Library\BookModuleTest::it_creates_a_new_book";i:4;s:74:"Tests\Feature\Library\BookModuleTest::the_book_attributes_must_be_required";i:3;s:66:"Tests\Feature\Library\BookModuleTest::the_book_code_must_be_unique";i:3;s:65:"Tests\Feature\Library\BookModuleTest::it_loads_the_edit_book_page";i:3;s:58:"Tests\Feature\Library\BookModuleTest::a_book_can_be_edited";i:3;s:69:"Tests\Feature\Library\IssuedBookModuleTest::librarian_can_issue_books";i:4;s:45:"Tests\Feature\Manage\ClassModuleTest::view_is";i:4;s:61:"Tests\Feature\Manage\ClassModuleTest::it_shows_the_class_list";i:4;s:60:"Tests\Feature\Manage\ClassModuleTest::admin_can_create_class";i:4;s:46:"Tests\Feature\Manage\CourseModuleTest::view_is";i:4;s:63:"Tests\Feature\Manage\CourseModuleTest::it_shows_the_course_list";i:4;s:62:"Tests\Feature\Manage\CourseModuleTest::admin_can_create_course";i:4;s:59:"Tests\Feature\Manage\ExamModuleTest::it_shows_the_exam_list";i:4;s:70:"Tests\Feature\Manage\ExamModuleTest::can_view_active_exams_of_a_school";i:4;s:70:"Tests\Feature\Manage\ExamModuleTest::admin_can_view_exam_creation_form";i:4;s:58:"Tests\Feature\Manage\ExamModuleTest::admin_can_create_exam";i:4;s:60:"Tests\Feature\Manage\ExamModuleTest::admin_can_activate_exam";i:4;s:62:"Tests\Feature\Manage\ExamModuleTest::admin_can_deactivate_exam";i:4;s:60:"Tests\Feature\Manage\SchoolModuleTest::it_shows_schools_list";i:4;s:62:"Tests\Feature\Manage\SchoolModuleTest::it_creates_a_new_school";i:4;s:59:"Tests\Feature\Manage\SchoolModuleTest::it_shows_edit_school";i:4;s:64:"Tests\Feature\Manage\SchoolModuleTest::a_school_can_being_edited";i:4;s:47:"Tests\Feature\Manage\SectionModuleTest::view_is";i:4;s:65:"Tests\Feature\Manage\SectionModuleTest::it_shows_the_section_list";i:4;s:64:"Tests\Feature\Manage\SectionModuleTest::admin_can_create_section";i:4;s:66:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_teachers_list";i:4;s:69:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_departments_list";i:4;s:65:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_classes_list";i:4;s:66:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_sections_list";i:4;s:71:"Tests\Feature\Manage\SettingModuleTest::admin_can_create_new_department";i:4;s:62:"Tests\Feature\PaymentModuleTest::student_can_view_payment_page";i:4;s:63:"Tests\Feature\PaymentModuleTest::student_can_view_receipts_page";i:4;s:59:"Tests\Feature\UserModuleTest::can_view_students_of_a_school";i:4;s:59:"Tests\Feature\UserModuleTest::can_view_teachers_of_a_school";i:4;s:62:"Tests\Feature\UserModuleTest::can_view_accountants_of_a_school";i:4;s:61:"Tests\Feature\UserModuleTest::can_view_librarians_of_a_school";i:4;s:60:"Tests\Feature\UserModuleTest::can_view_students_of_a_section";i:4;s:68:"Tests\Feature\UserModuleTest::can_view_promote_section_students_form";i:4;s:58:"Tests\Feature\UserModuleTest::can_promote_section_students";i:4;s:68:"Tests\Feature\UsersExcelExportTest::admin_can_download_students_list";i:4;s:68:"Tests\Feature\UsersExcelExportTest::admin_can_download_teachers_list";i:4;s:82:"Tests\Feature\UsersExcelExportTest::non_admin_users_can_not_see_export_users_forms";i:4;}s:5:"times";a:151:{s:43:"Tests\Feature\AccountingModuleTest::view_is";d:0.405;s:64:"Tests\Feature\AccountingModuleTest::accountant_can_create_sector";d:0.136;s:72:"Tests\Feature\AccountingModuleTest::accountant_can_view_edit_sector_form";d:0.136;s:62:"Tests\Feature\AccountingModuleTest::accountant_can_edit_sector";d:0.128;s:67:"Tests\Feature\AccountingModuleTest::accountant_can_view_income_list";d:0.139;s:61:"Tests\Feature\AccountingModuleTest::accountant_can_add_income";d:0.128;s:68:"Tests\Feature\AccountingModuleTest::accountant_can_view_expense_list";d:0.14;s:62:"Tests\Feature\AccountingModuleTest::accountant_can_add_expense";d:0.135;s:74:"Tests\Feature\AttendanceModuleTest::can_view_student_attendance_by_section";d:0.135;s:64:"Tests\Feature\AttendanceModuleTest::can_view_students_by_section";d:0.131;s:92:"Tests\Feature\AttendanceModuleTest::students_are_added_to_a_section_before_taking_attendance";d:0.143;s:73:"Tests\Feature\AttendanceModuleTest::view_student_attendance_by_student_id";d:0.141;s:92:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_view_adjust_student_attendance_form";d:0.14;s:82:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_adjust_student_attendance";d:0.137;s:81:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_take_students_attendance";d:0.139;s:83:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_update_students_attendance";d:0.138;s:91:"Tests\Feature\Auth\RegisterLoginTest::test_unauthenticated_user_cannot_view_a_register_form";d:0.043;s:62:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_be_created";d:0.146;s:69:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_view_a_login_form";d:0.046;s:58:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_log_in";d:0.27;s:79:"Tests\Feature\CourseModuleTest::admin_or_teacher_can_view_courses_by_teacher_id";d:0.133;s:79:"Tests\Feature\CourseModuleTest::admin_or_teacher_can_view_courses_by_section_id";d:0.131;s:85:"Tests\Feature\CourseModuleTest::can_view_students_from_grade_table_by_course_and_exam";d:0.147;s:52:"Tests\Feature\CourseModuleTest::admin_can_add_course";d:0.134;s:67:"Tests\Feature\CourseModuleTest::admin_can_save_course_configuration";d:0.152;s:40:"Tests\Feature\ExampleTest::testBasicTest";d:0.017;s:75:"Tests\Feature\GradeModuleTest::can_view_classes_sections_for_students_grade";d:0.13;s:74:"Tests\Feature\GradeModuleTest::can_view_all_students_marks_under_a_section";d:0.141;s:58:"Tests\Feature\GradeModuleTest::can_view_grade_of_a_student";d:0.139;s:90:"Tests\Feature\GradeModuleTest::teacher_can_view_students_grades_of_a_section_of_his_course";d:0.177;s:92:"Tests\Feature\GradeModuleTest::teacher_can_submit_students_grades_of_a_section_of_his_course";d:0.177;s:112:"Tests\Feature\GradeModuleTest::teacher_can_get_total_calculated_marks_of_each_student_of_a_section_of_his_course";d:0.261;s:81:"Tests\Feature\GradeModuleTest::teacher_can_save_grade_for_a_section_of_his_course";d:0.2;s:44:"Tests\Feature\GradeSystemModuleTest::view_is";d:0.17;s:76:"Tests\Feature\GradeSystemModuleTest::admin_can_view_grade_system_create_form";d:0.171;s:66:"Tests\Feature\GradeSystemModuleTest::admin_can_create_grade_system";d:0.169;s:66:"Tests\Feature\GradeSystemModuleTest::admin_can_delete_grade_system";d:0.164;s:73:"Tests\Feature\LibrarianTest::can_see_dashboard_as_a_home_page_after_login";d:0.187;s:53:"Tests\Feature\LibrarianTest::can_see_list_of_students";d:0.189;s:70:"Tests\Feature\LibrarianTest::can_see_some_personal_student_information";d:0.188;s:53:"Tests\Feature\LibrarianTest::can_see_list_of_teachers";d:0.173;s:70:"Tests\Feature\LibrarianTest::can_see_some_personal_teacher_information";d:0.184;s:55:"Tests\Feature\LibrarianTest::can_see_list_of_librarians";d:0.184;s:72:"Tests\Feature\LibrarianTest::can_see_some_personal_librarian_information";d:0.169;s:46:"Tests\Feature\LibrarianTest::can_see_all_books";d:0.177;s:49:"Tests\Feature\LibrarianTest::can_see_book_details";d:0.172;s:50:"Tests\Feature\LibrarianTest::can_edit_book_details";d:0.171;s:49:"Tests\Feature\LibrarianTest::can_see_issued_books";d:0.182;s:47:"Tests\Feature\LibrarianTest::can_add_a_new_book";d:0.166;s:61:"Tests\Feature\Library\BookModuleTest::it_shows_the_books_list";d:0.169;s:67:"Tests\Feature\Library\BookModuleTest::it_displays_the_books_details";d:0.169;s:64:"Tests\Feature\Library\BookModuleTest::it_loads_the_new_book_page";d:0.183;s:59:"Tests\Feature\Library\BookModuleTest::it_creates_a_new_book";d:0.163;s:74:"Tests\Feature\Library\BookModuleTest::the_book_attributes_must_be_required";d:0.184;s:66:"Tests\Feature\Library\BookModuleTest::the_book_code_must_be_unique";d:0.175;s:65:"Tests\Feature\Library\BookModuleTest::it_loads_the_edit_book_page";d:0.172;s:58:"Tests\Feature\Library\BookModuleTest::a_book_can_be_edited";d:0.174;s:69:"Tests\Feature\Library\IssuedBookModuleTest::librarian_can_issue_books";d:0.168;s:45:"Tests\Feature\Manage\ClassModuleTest::view_is";d:0.171;s:61:"Tests\Feature\Manage\ClassModuleTest::it_shows_the_class_list";d:0.169;s:60:"Tests\Feature\Manage\ClassModuleTest::admin_can_create_class";d:0.179;s:46:"Tests\Feature\Manage\CourseModuleTest::view_is";d:0.167;s:63:"Tests\Feature\Manage\CourseModuleTest::it_shows_the_course_list";d:0.18;s:62:"Tests\Feature\Manage\CourseModuleTest::admin_can_create_course";d:0.184;s:59:"Tests\Feature\Manage\ExamModuleTest::it_shows_the_exam_list";d:0.17;s:70:"Tests\Feature\Manage\ExamModuleTest::can_view_active_exams_of_a_school";d:0.179;s:70:"Tests\Feature\Manage\ExamModuleTest::admin_can_view_exam_creation_form";d:0.169;s:58:"Tests\Feature\Manage\ExamModuleTest::admin_can_create_exam";d:0.177;s:60:"Tests\Feature\Manage\ExamModuleTest::admin_can_activate_exam";d:0.167;s:62:"Tests\Feature\Manage\ExamModuleTest::admin_can_deactivate_exam";d:0.165;s:60:"Tests\Feature\Manage\SchoolModuleTest::it_shows_schools_list";d:0.175;s:62:"Tests\Feature\Manage\SchoolModuleTest::it_creates_a_new_school";d:0.162;s:59:"Tests\Feature\Manage\SchoolModuleTest::it_shows_edit_school";d:0.165;s:64:"Tests\Feature\Manage\SchoolModuleTest::a_school_can_being_edited";d:0.161;s:47:"Tests\Feature\Manage\SectionModuleTest::view_is";d:0.161;s:65:"Tests\Feature\Manage\SectionModuleTest::it_shows_the_section_list";d:0.14;s:64:"Tests\Feature\Manage\SectionModuleTest::admin_can_create_section";d:0.143;s:66:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_teachers_list";d:0.136;s:69:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_departments_list";d:0.136;s:65:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_classes_list";d:0.147;s:66:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_sections_list";d:0.136;s:71:"Tests\Feature\Manage\SettingModuleTest::admin_can_create_new_department";d:0.14;s:62:"Tests\Feature\PaymentModuleTest::student_can_view_payment_page";d:0.131;s:63:"Tests\Feature\PaymentModuleTest::student_can_view_receipts_page";d:0.131;s:59:"Tests\Feature\UserModuleTest::can_view_students_of_a_school";d:0.143;s:59:"Tests\Feature\UserModuleTest::can_view_teachers_of_a_school";d:0.132;s:62:"Tests\Feature\UserModuleTest::can_view_accountants_of_a_school";d:0.134;s:61:"Tests\Feature\UserModuleTest::can_view_librarians_of_a_school";d:0.132;s:60:"Tests\Feature\UserModuleTest::can_view_students_of_a_section";d:0.133;s:68:"Tests\Feature\UserModuleTest::can_view_promote_section_students_form";d:0.146;s:58:"Tests\Feature\UserModuleTest::can_promote_section_students";d:0.135;s:85:"Tests\Feature\UserModuleTest::admin_redirected_to_register_with_register_role_student";d:0.137;s:68:"Tests\Feature\UsersExcelExportTest::admin_can_download_students_list";d:0.126;s:68:"Tests\Feature\UsersExcelExportTest::admin_can_download_teachers_list";d:0.135;s:82:"Tests\Feature\UsersExcelExportTest::non_admin_users_can_not_see_export_users_forms";d:0.138;s:60:"Test\Unit\App\AccountTest::the_accounts_are_filter_by_school";d:0.208;s:73:"Tests\Unit\App\AttendanceTest::an_attendance_is_an_instance_of_Attendance";d:0.177;s:63:"Tests\Unit\App\AttendanceTest::an_attendance_belongs_to_student";d:0.167;s:63:"Tests\Unit\App\AttendanceTest::an_attendance_belongs_to_section";d:0.173;s:60:"Tests\Unit\App\AttendanceTest::an_attendance_belongs_to_exam";d:0.161;s:55:"Tests\Unit\App\BookTest::a_class_is_an_instance_of_Book";d:0.16;s:49:"Tests\Unit\App\BookTest::a_book_belongs_to_school";d:0.167;s:48:"Tests\Unit\App\BookTest::a_book_belongs_to_class";d:0.195;s:47:"Tests\Unit\App\BookTest::a_book_belongs_to_user";d:0.159;s:55:"Tests\Unit\App\BookTest::the_books_are_filter_by_school";d:0.182;s:66:"Test\Unit\App\DepartmentTest::the_departments_are_filter_by_school";d:0.062;s:56:"Test\Unit\App\EventTest::the_events_are_filter_by_school";d:0.163;s:54:"Test\Unit\App\ExamTest::the_exams_are_filter_by_school";d:0.193;s:52:"Test\Unit\App\FeeTest::the_fees_are_filter_by_school";d:0.195;s:54:"Test\Unit\App\FormTest::the_forms_are_filter_by_school";d:0.177;s:57:"Tests\Unit\App\GradeTest::a_grade_is_an_instance_of_Grade";d:0.17;s:51:"Tests\Unit\App\GradeTest::a_grade_belongs_to_course";d:0.17;s:52:"Tests\Unit\App\GradeTest::a_grade_belongs_to_student";d:0.168;s:52:"Tests\Unit\App\GradeTest::a_grade_belongs_to_teacher";d:0.17;s:49:"Tests\Unit\App\GradeTest::a_grade_belongs_to_exam";d:0.169;s:75:"Tests\Unit\App\GradesystemTest::a_gradesystem_is_an_instance_of_Gradesystem";d:0.157;s:63:"Tests\Unit\App\GradesystemTest::a_gradesystem_belongs_to_school";d:0.159;s:69:"Tests\Unit\App\GradesystemTest::the_gradesystems_are_filter_by_school";d:0.164;s:73:"Tests\Unit\App\IssuedBookTest::an_Issuedbook_is_an_instance_of_Issuedbook";d:0.162;s:60:"Tests\Unit\App\IssuedBookTest::an_issuedbook_belongs_to_book";d:0.164;s:68:"Tests\Unit\App\IssuedBookTest::the_issued_books_are_filter_by_school";d:0.157;s:60:"Test\Unit\App\MessageTest::the_messages_are_filter_by_school";d:0.127;s:61:"Tests\Unit\App\MyclassTest::a_class_is_an_instance_of_Myclass";d:0.049;s:53:"Tests\Unit\App\MyclassTest::a_class_belongs_to_school";d:0.048;s:48:"Tests\Unit\App\MyclassTest::a_class_has_sections";d:0.048;s:45:"Tests\Unit\App\MyclassTest::a_class_has_books";d:0.049;s:57:"Tests\Unit\App\MyclassTest::my_class_are_filter_by_school";d:0.086;s:58:"Test\Unit\App\NoticeTest::the_notices_are_filter_by_school";d:0.156;s:60:"Test\Unit\App\RoutineTest::the_routines_are_filter_by_school";d:0.137;s:60:"Tests\Unit\App\SchoolTest::a_school_is_an_instance_of_School";d:0.047;s:45:"Tests\Unit\App\SchoolTest::a_school_has_users";d:0.048;s:51:"Tests\Unit\App\SchoolTest::a_school_has_departments";d:0.051;s:63:"Tests\Unit\App\SectionTest::a_section_is_an_instance_of_Section";d:0.049;s:54:"Tests\Unit\App\SectionTest::a_section_belongs_to_class";d:0.048;s:63:"Test\Unit\App\SyllabusTest::the_syllabuses_are_filter_by_school";d:0.127;s:56:"Tests\Unit\App\UsersTest::an_user_is_an_instance_of_User";d:0.141;s:52:"Tests\Unit\App\UsersTest::an_user_belongs_to_section";d:0.123;s:51:"Tests\Unit\App\UsersTest::an_user_belongs_to_school";d:0.137;s:55:"Tests\Unit\App\UsersTest::an_user_belongs_to_department";d:0.122;s:42:"Tests\Unit\App\UsersTest::an_user_has_role";d:0.132;s:56:"Tests\Unit\App\UsersTest::the_users_are_filter_by_school";d:0.132;s:37:"Tests\Unit\ExampleTest::testBasicTest";d:0.014;s:84:"Tests\Unit\IssuedBookTest::test_insert_each_issued_book_in_an_array with data set #0";d:0.041;s:59:"Tests\Unit\MarkCalculationTest::getMarkSum with data set #0";d:0.055;s:59:"Tests\Unit\MarkCalculationTest::getMarkSum with data set #1";d:0.04;s:59:"Tests\Unit\MarkCalculationTest::getMarkSum with data set #2";d:0.041;s:66:"Tests\Unit\MarkCalculationTest::getFieldFinalMark with data set #0";d:0.041;s:66:"Tests\Unit\MarkCalculationTest::getFieldFinalMark with data set #1";d:0.041;s:66:"Tests\Unit\MarkCalculationTest::getFieldFinalMark with data set #2";d:0.044;s:72:"Tests\Unit\MarkCalculationTest::getTotalCalculatedMarks with data set #0";d:0.041;s:72:"Tests\Unit\MarkCalculationTest::getTotalCalculatedMarks with data set #1";d:0.056;}}} \ No newline at end of file +C:37:"PHPUnit\Runner\DefaultTestResultCache":19597:{a:2:{s:7:"defects";a:96:{s:74:"Tests\Feature\AttendanceModuleTest::can_view_student_attendance_by_section";i:4;s:92:"Tests\Feature\AttendanceModuleTest::students_are_added_to_a_section_before_taking_attendance";i:4;s:82:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_adjust_student_attendance";i:4;s:62:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_be_created";i:3;s:58:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_log_in";i:3;s:112:"Tests\Feature\GradeModuleTest::teacher_can_get_total_calculated_marks_of_each_student_of_a_section_of_his_course";i:4;s:81:"Tests\Feature\GradeModuleTest::teacher_can_save_grade_for_a_section_of_his_course";i:4;s:70:"Tests\Feature\LibrarianTest::can_see_some_personal_student_information";i:4;s:72:"Tests\Feature\LibrarianTest::can_see_some_personal_librarian_information";i:4;s:47:"Tests\Feature\LibrarianTest::can_add_a_new_book";i:4;s:64:"Tests\Feature\Library\BookModuleTest::it_loads_the_new_book_page";i:3;s:85:"Tests\Feature\UserModuleTest::admin_redirected_to_register_with_register_role_student";i:4;s:70:"Tests\Feature\LibrarianTest::can_see_some_personal_teacher_information";i:4;s:53:"Tests\Feature\LibrarianTest::can_see_list_of_students";i:4;s:72:"Tests\Feature\AccountingModuleTest::accountant_can_view_edit_sector_form";i:4;s:62:"Tests\Feature\AccountingModuleTest::accountant_can_edit_sector";i:4;s:43:"Tests\Feature\AccountingModuleTest::view_is";i:4;s:64:"Tests\Feature\AccountingModuleTest::accountant_can_create_sector";i:4;s:67:"Tests\Feature\AccountingModuleTest::accountant_can_view_income_list";i:4;s:61:"Tests\Feature\AccountingModuleTest::accountant_can_add_income";i:4;s:68:"Tests\Feature\AccountingModuleTest::accountant_can_view_expense_list";i:4;s:62:"Tests\Feature\AccountingModuleTest::accountant_can_add_expense";i:4;s:64:"Tests\Feature\AttendanceModuleTest::can_view_students_by_section";i:4;s:73:"Tests\Feature\AttendanceModuleTest::view_student_attendance_by_student_id";i:4;s:92:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_view_adjust_student_attendance_form";i:4;s:81:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_take_students_attendance";i:4;s:83:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_update_students_attendance";i:4;s:91:"Tests\Feature\Auth\RegisterLoginTest::test_unauthenticated_user_cannot_view_a_register_form";i:3;s:69:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_view_a_login_form";i:3;s:79:"Tests\Feature\CourseModuleTest::admin_or_teacher_can_view_courses_by_teacher_id";i:4;s:79:"Tests\Feature\CourseModuleTest::admin_or_teacher_can_view_courses_by_section_id";i:4;s:85:"Tests\Feature\CourseModuleTest::can_view_students_from_grade_table_by_course_and_exam";i:4;s:52:"Tests\Feature\CourseModuleTest::admin_can_add_course";i:4;s:67:"Tests\Feature\CourseModuleTest::admin_can_save_course_configuration";i:4;s:40:"Tests\Feature\ExampleTest::testBasicTest";i:3;s:75:"Tests\Feature\GradeModuleTest::can_view_classes_sections_for_students_grade";i:4;s:74:"Tests\Feature\GradeModuleTest::can_view_all_students_marks_under_a_section";i:4;s:58:"Tests\Feature\GradeModuleTest::can_view_grade_of_a_student";i:4;s:90:"Tests\Feature\GradeModuleTest::teacher_can_view_students_grades_of_a_section_of_his_course";i:4;s:92:"Tests\Feature\GradeModuleTest::teacher_can_submit_students_grades_of_a_section_of_his_course";i:4;s:44:"Tests\Feature\GradeSystemModuleTest::view_is";i:4;s:76:"Tests\Feature\GradeSystemModuleTest::admin_can_view_grade_system_create_form";i:4;s:66:"Tests\Feature\GradeSystemModuleTest::admin_can_create_grade_system";i:4;s:66:"Tests\Feature\GradeSystemModuleTest::admin_can_delete_grade_system";i:4;s:73:"Tests\Feature\LibrarianTest::can_see_dashboard_as_a_home_page_after_login";i:4;s:53:"Tests\Feature\LibrarianTest::can_see_list_of_teachers";i:4;s:55:"Tests\Feature\LibrarianTest::can_see_list_of_librarians";i:4;s:46:"Tests\Feature\LibrarianTest::can_see_all_books";i:4;s:49:"Tests\Feature\LibrarianTest::can_see_book_details";i:4;s:50:"Tests\Feature\LibrarianTest::can_edit_book_details";i:4;s:49:"Tests\Feature\LibrarianTest::can_see_issued_books";i:4;s:61:"Tests\Feature\Library\BookModuleTest::it_shows_the_books_list";i:3;s:67:"Tests\Feature\Library\BookModuleTest::it_displays_the_books_details";i:3;s:59:"Tests\Feature\Library\BookModuleTest::it_creates_a_new_book";i:4;s:74:"Tests\Feature\Library\BookModuleTest::the_book_attributes_must_be_required";i:3;s:66:"Tests\Feature\Library\BookModuleTest::the_book_code_must_be_unique";i:3;s:65:"Tests\Feature\Library\BookModuleTest::it_loads_the_edit_book_page";i:3;s:58:"Tests\Feature\Library\BookModuleTest::a_book_can_be_edited";i:3;s:69:"Tests\Feature\Library\IssuedBookModuleTest::librarian_can_issue_books";i:4;s:45:"Tests\Feature\Manage\ClassModuleTest::view_is";i:4;s:61:"Tests\Feature\Manage\ClassModuleTest::it_shows_the_class_list";i:4;s:60:"Tests\Feature\Manage\ClassModuleTest::admin_can_create_class";i:4;s:46:"Tests\Feature\Manage\CourseModuleTest::view_is";i:4;s:63:"Tests\Feature\Manage\CourseModuleTest::it_shows_the_course_list";i:4;s:62:"Tests\Feature\Manage\CourseModuleTest::admin_can_create_course";i:4;s:59:"Tests\Feature\Manage\ExamModuleTest::it_shows_the_exam_list";i:4;s:70:"Tests\Feature\Manage\ExamModuleTest::can_view_active_exams_of_a_school";i:4;s:70:"Tests\Feature\Manage\ExamModuleTest::admin_can_view_exam_creation_form";i:4;s:58:"Tests\Feature\Manage\ExamModuleTest::admin_can_create_exam";i:4;s:60:"Tests\Feature\Manage\ExamModuleTest::admin_can_activate_exam";i:4;s:62:"Tests\Feature\Manage\ExamModuleTest::admin_can_deactivate_exam";i:4;s:60:"Tests\Feature\Manage\SchoolModuleTest::it_shows_schools_list";i:4;s:62:"Tests\Feature\Manage\SchoolModuleTest::it_creates_a_new_school";i:4;s:59:"Tests\Feature\Manage\SchoolModuleTest::it_shows_edit_school";i:4;s:64:"Tests\Feature\Manage\SchoolModuleTest::a_school_can_being_edited";i:4;s:47:"Tests\Feature\Manage\SectionModuleTest::view_is";i:4;s:65:"Tests\Feature\Manage\SectionModuleTest::it_shows_the_section_list";i:4;s:64:"Tests\Feature\Manage\SectionModuleTest::admin_can_create_section";i:4;s:66:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_teachers_list";i:4;s:69:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_departments_list";i:4;s:65:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_classes_list";i:4;s:66:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_sections_list";i:4;s:71:"Tests\Feature\Manage\SettingModuleTest::admin_can_create_new_department";i:4;s:62:"Tests\Feature\PaymentModuleTest::student_can_view_payment_page";i:4;s:63:"Tests\Feature\PaymentModuleTest::student_can_view_receipts_page";i:4;s:59:"Tests\Feature\UserModuleTest::can_view_students_of_a_school";i:4;s:59:"Tests\Feature\UserModuleTest::can_view_teachers_of_a_school";i:4;s:62:"Tests\Feature\UserModuleTest::can_view_accountants_of_a_school";i:4;s:61:"Tests\Feature\UserModuleTest::can_view_librarians_of_a_school";i:4;s:60:"Tests\Feature\UserModuleTest::can_view_students_of_a_section";i:4;s:68:"Tests\Feature\UserModuleTest::can_view_promote_section_students_form";i:4;s:58:"Tests\Feature\UserModuleTest::can_promote_section_students";i:4;s:68:"Tests\Feature\UsersExcelExportTest::admin_can_download_students_list";i:4;s:68:"Tests\Feature\UsersExcelExportTest::admin_can_download_teachers_list";i:4;s:82:"Tests\Feature\UsersExcelExportTest::non_admin_users_can_not_see_export_users_forms";i:4;s:69:"Tests\Feature\CertificateTest::admin_can_view_upload_certificate_page";i:4;}s:5:"times";a:153:{s:43:"Tests\Feature\AccountingModuleTest::view_is";d:0.351;s:64:"Tests\Feature\AccountingModuleTest::accountant_can_create_sector";d:0.118;s:72:"Tests\Feature\AccountingModuleTest::accountant_can_view_edit_sector_form";d:0.115;s:62:"Tests\Feature\AccountingModuleTest::accountant_can_edit_sector";d:0.115;s:67:"Tests\Feature\AccountingModuleTest::accountant_can_view_income_list";d:0.12;s:61:"Tests\Feature\AccountingModuleTest::accountant_can_add_income";d:0.111;s:68:"Tests\Feature\AccountingModuleTest::accountant_can_view_expense_list";d:0.121;s:62:"Tests\Feature\AccountingModuleTest::accountant_can_add_expense";d:0.109;s:74:"Tests\Feature\AttendanceModuleTest::can_view_student_attendance_by_section";d:0.12;s:64:"Tests\Feature\AttendanceModuleTest::can_view_students_by_section";d:0.118;s:92:"Tests\Feature\AttendanceModuleTest::students_are_added_to_a_section_before_taking_attendance";d:0.119;s:73:"Tests\Feature\AttendanceModuleTest::view_student_attendance_by_student_id";d:0.115;s:92:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_view_adjust_student_attendance_form";d:0.114;s:82:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_adjust_student_attendance";d:0.122;s:81:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_take_students_attendance";d:0.125;s:83:"Tests\Feature\AttendanceModuleTest::admin_or_teacher_can_update_students_attendance";d:0.119;s:91:"Tests\Feature\Auth\RegisterLoginTest::test_unauthenticated_user_cannot_view_a_register_form";d:0.041;s:62:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_be_created";d:0.115;s:69:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_view_a_login_form";d:0.05;s:58:"Tests\Feature\Auth\RegisterLoginTest::test_user_can_log_in";d:0.226;s:79:"Tests\Feature\CourseModuleTest::admin_or_teacher_can_view_courses_by_teacher_id";d:0.113;s:79:"Tests\Feature\CourseModuleTest::admin_or_teacher_can_view_courses_by_section_id";d:0.113;s:85:"Tests\Feature\CourseModuleTest::can_view_students_from_grade_table_by_course_and_exam";d:0.122;s:52:"Tests\Feature\CourseModuleTest::admin_can_add_course";d:0.123;s:67:"Tests\Feature\CourseModuleTest::admin_can_save_course_configuration";d:0.117;s:40:"Tests\Feature\ExampleTest::testBasicTest";d:0.016;s:75:"Tests\Feature\GradeModuleTest::can_view_classes_sections_for_students_grade";d:0.112;s:74:"Tests\Feature\GradeModuleTest::can_view_all_students_marks_under_a_section";d:0.112;s:58:"Tests\Feature\GradeModuleTest::can_view_grade_of_a_student";d:0.112;s:90:"Tests\Feature\GradeModuleTest::teacher_can_view_students_grades_of_a_section_of_his_course";d:0.127;s:92:"Tests\Feature\GradeModuleTest::teacher_can_submit_students_grades_of_a_section_of_his_course";d:0.119;s:112:"Tests\Feature\GradeModuleTest::teacher_can_get_total_calculated_marks_of_each_student_of_a_section_of_his_course";d:0.16;s:81:"Tests\Feature\GradeModuleTest::teacher_can_save_grade_for_a_section_of_his_course";d:0.123;s:44:"Tests\Feature\GradeSystemModuleTest::view_is";d:0.114;s:76:"Tests\Feature\GradeSystemModuleTest::admin_can_view_grade_system_create_form";d:0.119;s:66:"Tests\Feature\GradeSystemModuleTest::admin_can_create_grade_system";d:0.114;s:66:"Tests\Feature\GradeSystemModuleTest::admin_can_delete_grade_system";d:0.112;s:73:"Tests\Feature\LibrarianTest::can_see_dashboard_as_a_home_page_after_login";d:0.117;s:53:"Tests\Feature\LibrarianTest::can_see_list_of_students";d:0.117;s:70:"Tests\Feature\LibrarianTest::can_see_some_personal_student_information";d:0.115;s:53:"Tests\Feature\LibrarianTest::can_see_list_of_teachers";d:0.124;s:70:"Tests\Feature\LibrarianTest::can_see_some_personal_teacher_information";d:0.113;s:55:"Tests\Feature\LibrarianTest::can_see_list_of_librarians";d:0.117;s:72:"Tests\Feature\LibrarianTest::can_see_some_personal_librarian_information";d:0.116;s:46:"Tests\Feature\LibrarianTest::can_see_all_books";d:0.123;s:49:"Tests\Feature\LibrarianTest::can_see_book_details";d:0.131;s:50:"Tests\Feature\LibrarianTest::can_edit_book_details";d:0.118;s:49:"Tests\Feature\LibrarianTest::can_see_issued_books";d:0.121;s:47:"Tests\Feature\LibrarianTest::can_add_a_new_book";d:0.114;s:61:"Tests\Feature\Library\BookModuleTest::it_shows_the_books_list";d:0.117;s:67:"Tests\Feature\Library\BookModuleTest::it_displays_the_books_details";d:0.127;s:64:"Tests\Feature\Library\BookModuleTest::it_loads_the_new_book_page";d:0.114;s:59:"Tests\Feature\Library\BookModuleTest::it_creates_a_new_book";d:0.11;s:74:"Tests\Feature\Library\BookModuleTest::the_book_attributes_must_be_required";d:0.108;s:66:"Tests\Feature\Library\BookModuleTest::the_book_code_must_be_unique";d:0.117;s:65:"Tests\Feature\Library\BookModuleTest::it_loads_the_edit_book_page";d:0.125;s:58:"Tests\Feature\Library\BookModuleTest::a_book_can_be_edited";d:0.113;s:69:"Tests\Feature\Library\IssuedBookModuleTest::librarian_can_issue_books";d:0.113;s:45:"Tests\Feature\Manage\ClassModuleTest::view_is";d:0.115;s:61:"Tests\Feature\Manage\ClassModuleTest::it_shows_the_class_list";d:0.115;s:60:"Tests\Feature\Manage\ClassModuleTest::admin_can_create_class";d:0.132;s:46:"Tests\Feature\Manage\CourseModuleTest::view_is";d:0.125;s:63:"Tests\Feature\Manage\CourseModuleTest::it_shows_the_course_list";d:0.116;s:62:"Tests\Feature\Manage\CourseModuleTest::admin_can_create_course";d:0.122;s:59:"Tests\Feature\Manage\ExamModuleTest::it_shows_the_exam_list";d:0.152;s:70:"Tests\Feature\Manage\ExamModuleTest::can_view_active_exams_of_a_school";d:0.204;s:70:"Tests\Feature\Manage\ExamModuleTest::admin_can_view_exam_creation_form";d:0.379;s:58:"Tests\Feature\Manage\ExamModuleTest::admin_can_create_exam";d:0.295;s:60:"Tests\Feature\Manage\ExamModuleTest::admin_can_activate_exam";d:0.15;s:62:"Tests\Feature\Manage\ExamModuleTest::admin_can_deactivate_exam";d:0.159;s:60:"Tests\Feature\Manage\SchoolModuleTest::it_shows_schools_list";d:0.133;s:62:"Tests\Feature\Manage\SchoolModuleTest::it_creates_a_new_school";d:0.143;s:59:"Tests\Feature\Manage\SchoolModuleTest::it_shows_edit_school";d:0.114;s:64:"Tests\Feature\Manage\SchoolModuleTest::a_school_can_being_edited";d:0.113;s:47:"Tests\Feature\Manage\SectionModuleTest::view_is";d:0.114;s:65:"Tests\Feature\Manage\SectionModuleTest::it_shows_the_section_list";d:0.115;s:64:"Tests\Feature\Manage\SectionModuleTest::admin_can_create_section";d:0.133;s:66:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_teachers_list";d:0.118;s:69:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_departments_list";d:0.12;s:65:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_classes_list";d:0.126;s:66:"Tests\Feature\Manage\SettingModuleTest::it_shows_the_sections_list";d:0.123;s:71:"Tests\Feature\Manage\SettingModuleTest::admin_can_create_new_department";d:0.13;s:62:"Tests\Feature\PaymentModuleTest::student_can_view_payment_page";d:0.13;s:63:"Tests\Feature\PaymentModuleTest::student_can_view_receipts_page";d:0.117;s:59:"Tests\Feature\UserModuleTest::can_view_students_of_a_school";d:0.117;s:59:"Tests\Feature\UserModuleTest::can_view_teachers_of_a_school";d:0.116;s:62:"Tests\Feature\UserModuleTest::can_view_accountants_of_a_school";d:0.116;s:61:"Tests\Feature\UserModuleTest::can_view_librarians_of_a_school";d:0.122;s:60:"Tests\Feature\UserModuleTest::can_view_students_of_a_section";d:0.113;s:68:"Tests\Feature\UserModuleTest::can_view_promote_section_students_form";d:0.125;s:58:"Tests\Feature\UserModuleTest::can_promote_section_students";d:0.115;s:85:"Tests\Feature\UserModuleTest::admin_redirected_to_register_with_register_role_student";d:0.122;s:68:"Tests\Feature\UsersExcelExportTest::admin_can_download_students_list";d:0.116;s:68:"Tests\Feature\UsersExcelExportTest::admin_can_download_teachers_list";d:0.109;s:82:"Tests\Feature\UsersExcelExportTest::non_admin_users_can_not_see_export_users_forms";d:0.117;s:60:"Test\Unit\App\AccountTest::the_accounts_are_filter_by_school";d:0.11;s:73:"Tests\Unit\App\AttendanceTest::an_attendance_is_an_instance_of_Attendance";d:0.114;s:63:"Tests\Unit\App\AttendanceTest::an_attendance_belongs_to_student";d:0.12;s:63:"Tests\Unit\App\AttendanceTest::an_attendance_belongs_to_section";d:0.106;s:60:"Tests\Unit\App\AttendanceTest::an_attendance_belongs_to_exam";d:0.111;s:55:"Tests\Unit\App\BookTest::a_class_is_an_instance_of_Book";d:0.111;s:49:"Tests\Unit\App\BookTest::a_book_belongs_to_school";d:0.107;s:48:"Tests\Unit\App\BookTest::a_book_belongs_to_class";d:0.106;s:47:"Tests\Unit\App\BookTest::a_book_belongs_to_user";d:0.108;s:55:"Tests\Unit\App\BookTest::the_books_are_filter_by_school";d:0.124;s:66:"Test\Unit\App\DepartmentTest::the_departments_are_filter_by_school";d:0.047;s:56:"Test\Unit\App\EventTest::the_events_are_filter_by_school";d:0.109;s:54:"Test\Unit\App\ExamTest::the_exams_are_filter_by_school";d:0.11;s:52:"Test\Unit\App\FeeTest::the_fees_are_filter_by_school";d:0.109;s:54:"Test\Unit\App\FormTest::the_forms_are_filter_by_school";d:0.114;s:57:"Tests\Unit\App\GradeTest::a_grade_is_an_instance_of_Grade";d:0.122;s:51:"Tests\Unit\App\GradeTest::a_grade_belongs_to_course";d:0.115;s:52:"Tests\Unit\App\GradeTest::a_grade_belongs_to_student";d:0.114;s:52:"Tests\Unit\App\GradeTest::a_grade_belongs_to_teacher";d:0.113;s:49:"Tests\Unit\App\GradeTest::a_grade_belongs_to_exam";d:0.113;s:75:"Tests\Unit\App\GradesystemTest::a_gradesystem_is_an_instance_of_Gradesystem";d:0.107;s:63:"Tests\Unit\App\GradesystemTest::a_gradesystem_belongs_to_school";d:0.116;s:69:"Tests\Unit\App\GradesystemTest::the_gradesystems_are_filter_by_school";d:0.112;s:73:"Tests\Unit\App\IssuedBookTest::an_Issuedbook_is_an_instance_of_Issuedbook";d:0.107;s:60:"Tests\Unit\App\IssuedBookTest::an_issuedbook_belongs_to_book";d:0.111;s:68:"Tests\Unit\App\IssuedBookTest::the_issued_books_are_filter_by_school";d:0.113;s:60:"Test\Unit\App\MessageTest::the_messages_are_filter_by_school";d:0.113;s:61:"Tests\Unit\App\MyclassTest::a_class_is_an_instance_of_Myclass";d:0.047;s:53:"Tests\Unit\App\MyclassTest::a_class_belongs_to_school";d:0.057;s:48:"Tests\Unit\App\MyclassTest::a_class_has_sections";d:0.058;s:45:"Tests\Unit\App\MyclassTest::a_class_has_books";d:0.051;s:57:"Tests\Unit\App\MyclassTest::my_class_are_filter_by_school";d:0.049;s:58:"Test\Unit\App\NoticeTest::the_notices_are_filter_by_school";d:0.112;s:60:"Test\Unit\App\RoutineTest::the_routines_are_filter_by_school";d:0.115;s:60:"Tests\Unit\App\SchoolTest::a_school_is_an_instance_of_School";d:0.055;s:45:"Tests\Unit\App\SchoolTest::a_school_has_users";d:0.046;s:51:"Tests\Unit\App\SchoolTest::a_school_has_departments";d:0.046;s:63:"Tests\Unit\App\SectionTest::a_section_is_an_instance_of_Section";d:0.046;s:54:"Tests\Unit\App\SectionTest::a_section_belongs_to_class";d:0.049;s:63:"Test\Unit\App\SyllabusTest::the_syllabuses_are_filter_by_school";d:0.111;s:56:"Tests\Unit\App\UsersTest::an_user_is_an_instance_of_User";d:0.111;s:52:"Tests\Unit\App\UsersTest::an_user_belongs_to_section";d:0.123;s:51:"Tests\Unit\App\UsersTest::an_user_belongs_to_school";d:0.112;s:55:"Tests\Unit\App\UsersTest::an_user_belongs_to_department";d:0.106;s:42:"Tests\Unit\App\UsersTest::an_user_has_role";d:0.117;s:56:"Tests\Unit\App\UsersTest::the_users_are_filter_by_school";d:0.115;s:37:"Tests\Unit\ExampleTest::testBasicTest";d:0.014;s:84:"Tests\Unit\IssuedBookTest::test_insert_each_issued_book_in_an_array with data set #0";d:0.042;s:59:"Tests\Unit\MarkCalculationTest::getMarkSum with data set #0";d:0.055;s:59:"Tests\Unit\MarkCalculationTest::getMarkSum with data set #1";d:0.039;s:59:"Tests\Unit\MarkCalculationTest::getMarkSum with data set #2";d:0.045;s:66:"Tests\Unit\MarkCalculationTest::getFieldFinalMark with data set #0";d:0.039;s:66:"Tests\Unit\MarkCalculationTest::getFieldFinalMark with data set #1";d:0.04;s:66:"Tests\Unit\MarkCalculationTest::getFieldFinalMark with data set #2";d:0.04;s:72:"Tests\Unit\MarkCalculationTest::getTotalCalculatedMarks with data set #0";d:0.039;s:72:"Tests\Unit\MarkCalculationTest::getTotalCalculatedMarks with data set #1";d:0.056;s:69:"Tests\Feature\CertificateTest::admin_can_view_upload_certificate_page";d:0.164;s:60:"Tests\Feature\CertificateTest::student_can_view_certificates";d:0.151;}}} \ No newline at end of file diff --git a/app/Certificate.php b/app/Certificate.php new file mode 100644 index 000000000..744905bd5 --- /dev/null +++ b/app/Certificate.php @@ -0,0 +1,23 @@ +belongsTo('App\School'); + } + /** + * Get the student record associated with the user. + */ + public function student() + { + return $this->belongsTo('App\User','given_to', 'student_code'); + } +} diff --git a/app/Http/Controllers/CertificateController.php b/app/Http/Controllers/CertificateController.php new file mode 100644 index 000000000..b6946af8f --- /dev/null +++ b/app/Http/Controllers/CertificateController.php @@ -0,0 +1,93 @@ +student_code) + ->bySchool(\Auth::user()->school_id) + ->get(); + return view('certificates.index',['certificates'=>$certificates]); + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + $certificates = Certificate::with('student') + ->bySchool(\Auth::user()->school_id) + ->where('active',1)->get(); + return view('certificates.create',['certificates'=>$certificates]); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + // + } + + /** + * Display the specified resource. + * + * @param \App\Certificate $certificate + * @return \Illuminate\Http\Response + */ + public function show(Certificate $certificate) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param \App\Certificate $certificate + * @return \Illuminate\Http\Response + */ + public function edit(Certificate $certificate) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update($id) + { + $tb = Certificate::find($id); + $tb->active = 0; + $tb->save(); + return back()->with('status',__('File removed')); + } + + /** + * Remove the specified resource from storage. + * + * @param \App\Certificate $certificate + * @return \Illuminate\Http\Response + */ + public function destroy(Certificate $certificate) + { + // + } +} diff --git a/app/Http/Controllers/NoticeController.php b/app/Http/Controllers/NoticeController.php index 36ba94760..254153807 100644 --- a/app/Http/Controllers/NoticeController.php +++ b/app/Http/Controllers/NoticeController.php @@ -72,7 +72,6 @@ public function edit($id) /** * Update the specified resource in storage. * - * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ diff --git a/app/Http/Controllers/UploadController.php b/app/Http/Controllers/UploadController.php index 8305556b8..a70ffe7e6 100644 --- a/app/Http/Controllers/UploadController.php +++ b/app/Http/Controllers/UploadController.php @@ -81,6 +81,20 @@ public function upload(Request $request){ $tb->class_id = $request->class_id; $tb->user_id = auth()->user()->id; $tb->save(); + } else if($request->upload_type == 'certificate'){ + $request->validate([ + 'title' => 'required|string', + 'given_to' => 'required|int', + ]); + + $tb = new \App\Certificate; + $tb->file_path = 'storage/'.$path; + $tb->title = $request->title; + $tb->given_to = $request->given_to; + $tb->active = 1; + $tb->school_id = auth()->user()->school_id; + $tb->user_id = auth()->user()->id; + $tb->save(); } else if($request->upload_type == 'profile' && $request->user_id > 0){ $tb = \App\User::find($request->user_id); $tb->pic_path = 'storage/'.$path; diff --git a/database/factories/CertificateFactory.php b/database/factories/CertificateFactory.php new file mode 100644 index 000000000..a5dcf1415 --- /dev/null +++ b/database/factories/CertificateFactory.php @@ -0,0 +1,25 @@ +define(Certificate::class, function (Faker $faker) { + return [ + 'file_path' => $faker->url, + 'title' => $faker->sentences(1, true), + 'given_to' => $faker->randomElement(User::where('role', 'student')->pluck('student_code')->toArray()), + 'active' => $faker->randomElement([0, 1]), + 'school_id' => function() use ($faker) { + if (School::count()) + return $faker->randomElement(School::pluck('id')->toArray()); + else return factory(School::class)->create()->id; + }, + 'user_id' => function() use ($faker) { + if (User::count()) + return $faker->randomElement(User::pluck('id')->toArray()); + else return factory(User::class)->create()->id; + }, + ]; +}); diff --git a/database/migrations/2020_07_24_201246_create_certificates_table.php b/database/migrations/2020_07_24_201246_create_certificates_table.php new file mode 100644 index 000000000..2a6c9479e --- /dev/null +++ b/database/migrations/2020_07_24_201246_create_certificates_table.php @@ -0,0 +1,37 @@ +id(); + $table->timestamps(); + $table->string('file_path'); + $table->string('title'); + $table->integer('given_to'); + $table->tinyInteger('active'); + $table->integer('school_id')->unsigned(); + $table->integer('user_id')->unsigned(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('certificates'); + } +} diff --git a/database/seeds/CertificateTableSeeder.php b/database/seeds/CertificateTableSeeder.php new file mode 100644 index 000000000..d143d0ff2 --- /dev/null +++ b/database/seeds/CertificateTableSeeder.php @@ -0,0 +1,16 @@ +create(); + } +} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 2f01df6bf..54a998b6f 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -39,5 +39,6 @@ public function run() $this->call(AccountSectorsTableSeeder::class); $this->call(StudentinfosTableSeeder::class); $this->call(StudentboardexamsTableSeeder::class); + $this->call(CertificateTableSeeder::class); } } diff --git a/readme.md b/readme.md index 023f16f41..d72ccb64e 100644 --- a/readme.md +++ b/readme.md @@ -32,6 +32,7 @@ See the news [here](https://laravel-news.com/unified-transform-open-source-schoo ## Table of Contents - [Features](https://github.com/changeweb/Unifiedtransform#features) +- [What's New](https://github.com/changeweb/Unifiedtransform#whatsnew) - [Framework used](https://github.com/changeweb/Unifiedtransform#framework-used) - [Server Requirements](https://github.com/changeweb/Unifiedtransform#server-requirements) - [How to Start (Installation)](https://github.com/changeweb/Unifiedtransform#how-to-start) @@ -73,6 +74,13 @@ Thus you permit the user of this software to use your contribution under the ter GNU General Public License v3.0 +## Whats New + +- Certificate Upload Feature is added. + - Admin can upload certificate to a student using student code. + - Students can see their certificates link from Left Navigation bar. +- Now students can also go to their Notifications(Teacher's Message) from Left Navigation bar. + ## Features This software has following features: @@ -81,6 +89,7 @@ This software has following features: |---------|-------------| | Roles | Master, Admin, Teacher, Student, Librarian, Accountant.| || **(You can Impersonate User Roles in Development environment)** See how [Impersonation](https://github.com/changeweb/Unifiedtransform/pull/118) works. Cool !!| +| Certificate | Now you can upload certificate to a student using student code. | | Payment |**[Stripe](http://stripe.com/)** is used. See configuration below.| ||Students can pay from their accounts.| ||Student can view payment receipts (history)| @@ -164,7 +173,7 @@ git clone https://github.com/changeweb/Unifiedtransform Barryvdh\Debugbar\ServiceProvider, Logviewer Service provider, //Alias - Debugbar' => Barryvdh... + 'Debugbar' => Barryvdh... ``` from `config/app.php` before running **`composer install`** in **Production Environment**) @@ -314,6 +323,10 @@ DB_PASSWORD=secret 4. To get Grade of students of a course for given marks, Teacher clicks the Get Total Marks button. (Usually this is done at the end of the semester) +## Give Certificate or Diploma to students + +Upon request in issue #258, Certification file upload system has been added. + ## Good to know * Setup your **Mail** configuration in `.env` file if you want to send email. Currently registered users are notified by invitation mail if Mail is configured properly. @@ -371,3 +384,5 @@ Auto generated fake data were used. ![Screenshot_2019-03-12 Manage Schools - Arvid Marquardt](https://user-images.githubusercontent.com/9896315/54187740-6c2ca280-44d8-11e9-93b1-a998ac1cd585.png) ![Screenshot_2019-03-12 Promote Section Students - Arvid Marquardt(1)](https://user-images.githubusercontent.com/9896315/54187741-6c2ca280-44d8-11e9-871a-51148b27c2b4.png) ![Screenshot_2019-03-12 Students - Arvid Marquardt](https://user-images.githubusercontent.com/9896315/54187744-6cc53900-44d8-11e9-9ad4-c1acc58fe6a2.png) +![Screenshot_2020-07-24 Give Certificate - Ruthie Gorczany](https://user-images.githubusercontent.com/9896315/88412643-b5467380-cdfb-11ea-88da-45afa2756e64.png) +![Screenshot_2020-07-24 My Certificates - Ruthie Gorczany](https://user-images.githubusercontent.com/9896315/88412655-b677a080-cdfb-11ea-8ca4-62407d39f61f.png) diff --git a/resources/views/certificates/create.blade.php b/resources/views/certificates/create.blade.php new file mode 100644 index 000000000..a0bc4caa8 --- /dev/null +++ b/resources/views/certificates/create.blade.php @@ -0,0 +1,28 @@ +@extends('layouts.app') + +@section('title', 'Give Certificate') +@section('content') +
+
+
+ @include('layouts.leftside-menubar') +
+
+
+
Give Certificate
+
+ @if (session('status')) +
+ {{ session('status') }} +
+ @endif + @component('components.file-uploader',['upload_type'=>'certificate']) + @endcomponent + @component('components.uploaded-files-list',['files'=>$certificates,'upload_type'=>'certificate']) + @endcomponent +
+
+
+
+
+@endsection diff --git a/resources/views/certificates/index.blade.php b/resources/views/certificates/index.blade.php new file mode 100644 index 000000000..bfe09b676 --- /dev/null +++ b/resources/views/certificates/index.blade.php @@ -0,0 +1,26 @@ +@extends('layouts.app') + +@section('title', 'My Certificates') +@section('content') +
+
+
+ @include('layouts.leftside-menubar') +
+
+
+
My Certificates
+
+ @if (session('status')) +
+ {{ session('status') }} +
+ @endif + @component('components.certificate-list',['files'=>$certificates]) + @endcomponent +
+
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/components/certificate-list.blade.php b/resources/views/components/certificate-list.blade.php new file mode 100644 index 000000000..59f33ec02 --- /dev/null +++ b/resources/views/components/certificate-list.blade.php @@ -0,0 +1,22 @@ +
+ + + + + + + + + + @isset($files) + @foreach($files as $file) + + + + + + @endforeach + @endisset + +
#@lang('File Name')Received Date
{{($loop->index + 1)}}{{$file->title}}{{$file->created_at->format('M d Y')}}
+
diff --git a/resources/views/components/file-uploader.blade.php b/resources/views/components/file-uploader.blade.php index 412b1965a..53ebaee88 100644 --- a/resources/views/components/file-uploader.blade.php +++ b/resources/views/components/file-uploader.blade.php @@ -5,6 +5,11 @@
@endif + @if($upload_type == 'certificate') + + +
+ @endif @if($upload_type == 'routine')