diff --git a/README.md b/README.md index 8fae295..434500b 100644 --- a/README.md +++ b/README.md @@ -1,27 +1 @@ -# SignVideo - -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.4. - -## Development server - -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. +Bangla Sign Language diff --git a/backend/Mail.py b/backend/Mail.py index c6e3633..116e6d7 100644 --- a/backend/Mail.py +++ b/backend/Mail.py @@ -4,12 +4,12 @@ def send_mail(content, to): message = MIMEText(content) message['Subject'] = "Test email" - message['From'] = "labonnya1234@outlook.com" + message['From'] = "abj-paul@outlook.com" message['To'] = to # Send message with smtplib.SMTP('smtp-mail.outlook.com', 587) as smtp: smtp.starttls() - smtp.login('labonnya1234@outlook.com', 'bsse1208@gmail.com') + smtp.login('abj-paul@outlook.com', 'bristi pothe mukti dilo gaan_12') smtp.send_message(message) \ No newline at end of file diff --git a/backend/__pycache__/AuthServices.cpython-310.pyc b/backend/__pycache__/AuthServices.cpython-310.pyc new file mode 100644 index 0000000..4ebc917 Binary files /dev/null and b/backend/__pycache__/AuthServices.cpython-310.pyc differ diff --git a/backend/__pycache__/Mail.cpython-310.pyc b/backend/__pycache__/Mail.cpython-310.pyc new file mode 100644 index 0000000..29849b1 Binary files /dev/null and b/backend/__pycache__/Mail.cpython-310.pyc differ diff --git a/backend/__pycache__/Model.cpython-310.pyc b/backend/__pycache__/Model.cpython-310.pyc new file mode 100644 index 0000000..f5bc15a Binary files /dev/null and b/backend/__pycache__/Model.cpython-310.pyc differ diff --git a/backend/__pycache__/User.cpython-310.pyc b/backend/__pycache__/User.cpython-310.pyc new file mode 100644 index 0000000..fbf9483 Binary files /dev/null and b/backend/__pycache__/User.cpython-310.pyc differ diff --git a/backend/__pycache__/constants.cpython-310.pyc b/backend/__pycache__/constants.cpython-310.pyc new file mode 100644 index 0000000..57e3164 Binary files /dev/null and b/backend/__pycache__/constants.cpython-310.pyc differ diff --git a/backend/__pycache__/main.cpython-310.pyc b/backend/__pycache__/main.cpython-310.pyc new file mode 100644 index 0000000..4c5344a Binary files /dev/null and b/backend/__pycache__/main.cpython-310.pyc differ diff --git a/backend/__pycache__/models.cpython-310.pyc b/backend/__pycache__/models.cpython-310.pyc new file mode 100644 index 0000000..c7e35c3 Binary files /dev/null and b/backend/__pycache__/models.cpython-310.pyc differ diff --git a/backend/bsl.db b/backend/bsl.db index 383914e..598f8ee 100644 Binary files a/backend/bsl.db and b/backend/bsl.db differ diff --git a/backend/dhandaquery.txt b/backend/dhandaquery.txt index ee7596f..699a724 100644 --- a/backend/dhandaquery.txt +++ b/backend/dhandaquery.txt @@ -9,41 +9,41 @@ CREATE TABLE IF NOT EXISTS questions ( ); insert into questions (id, label, choice1, choice2, choice3, choice4, answer) -values( 1, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', -'../../assets/16.jpg', '../../assets/13.jpg'); +values( 1, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/12.jpg', '../../assets/14.jpg', '../../assets/15.jpg', +'../../assets/16.jpg', '../../assets/12.jpg'); insert into questions (id, label, choice1, choice2, choice3, choice4, answer) -values( 2, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', -'../../assets/16.jpg', '../../assets/13.jpg'); +values( 2, '১ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/1.jpg', '../../assets/2.jpg', '../../assets/3.jpg', +'../../assets/4.jpg', '../../assets/1.jpg'); insert into questions (id, label, choice1, choice2, choice3, choice4, answer) -values( 3, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', -'../../assets/16.jpg', '../../assets/13.jpg'); +values( 3, '৭ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/5.jpg', '../../assets/6.jpg', '../../assets/7.jpg', +'../../assets/8.jpg', '../../assets/7.jpg'); insert into questions (id, label, choice1, choice2, choice3, choice4, answer) -values( 4, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', -'../../assets/16.jpg', '../../assets/13.jpg'); +values( 4, '৯ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/9.jpg', '../../assets/10.jpg', '../../assets/11.jpg', +'../../assets/12.jpg', '../../assets/9.jpg'); insert into questions (id, label, choice1, choice2, choice3, choice4, answer) -values( 5, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', +values( 5, '১৩ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', '../../assets/16.jpg', '../../assets/13.jpg'); insert into questions (id, label, choice1, choice2, choice3, choice4, answer) -values( 6, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', -'../../assets/16.jpg', '../../assets/13.jpg'); +values( 6, '১৪ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/17.jpg', '../../assets/18.jpg', '../../assets/19.jpg', +'../../assets/20.jpg', '../../assets/20.jpg'); insert into questions (id, label, choice1, choice2, choice3, choice4, answer) -values( 7, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', -'../../assets/16.jpg', '../../assets/13.jpg'); +values( 7, '১৬ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/21.jpg', '../../assets/20.jpg', '../../assets/15.jpg', +'../../assets/16.jpg', '../../assets/21.jpg'); insert into questions (id, label, choice1, choice2, choice3, choice4, answer) -values( 8, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', -'../../assets/16.jpg', '../../assets/13.jpg'); +values( 8, 'আম এর জন্য ইশারা ভাষা কোনটি?', '../../assets/21.jpg', '../../assets/20.jpg', '../../assets/19.jpg', +'../../assets/18.jpg', '../../assets/20.jpg'); insert into questions (id, label, choice1, choice2, choice3, choice4, answer) -values( 9, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', -'../../assets/16.jpg', '../../assets/13.jpg'); +values( 9, '৮ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/1.jpg', '../../assets/2.jpg', '../../assets/8.jpg', +'../../assets/16.jpg', '../../assets/8.jpg'); insert into questions (id, label, choice1, choice2, choice3, choice4, answer) -values( 10, '১২ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/13.jpg', '../../assets/14.jpg', '../../assets/15.jpg', -'../../assets/16.jpg', '../../assets/13.jpg'); \ No newline at end of file +values( 10, '১৮ এর জন্য ইশারা ভাষা কোনটি?', '../../assets/5.jpg', '../../assets/6.jpg', '../../assets/3.jpg', +'../../assets/4.jpg', '../../assets/4.jpg'); diff --git a/src/app/answers/answers.component.css b/src/app/answers/answers.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/answers/answers.component.html b/src/app/answers/answers.component.html new file mode 100644 index 0000000..c119de8 --- /dev/null +++ b/src/app/answers/answers.component.html @@ -0,0 +1,19 @@ + + + + + + + + + + +
+

{{i+1}}. {{ question.label }}

+
+
+
+
+

You've got {{ score }} points.

+ + diff --git a/src/app/answers/answers.component.spec.ts b/src/app/answers/answers.component.spec.ts new file mode 100644 index 0000000..6782851 --- /dev/null +++ b/src/app/answers/answers.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AnswersComponent } from './answers.component'; + +describe('AnswersComponent', () => { + let component: AnswersComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ AnswersComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(AnswersComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/answers/answers.component.ts b/src/app/answers/answers.component.ts new file mode 100644 index 0000000..3472226 --- /dev/null +++ b/src/app/answers/answers.component.ts @@ -0,0 +1,23 @@ +import { Component, OnInit } from '@angular/core'; +import { QuestionsService } from '../questions.service'; +import { Router } from '@angular/router'; +import { Question } from '../quiz.model'; + +@Component({ + selector: 'app-answers', + templateUrl: './answers.component.html', + styleUrls: ['./answers.component.css'] +}) +export class AnswersComponent implements OnInit{ + + constructor(private questionsService: QuestionsService, private router: Router) { } + + randomQuestions: Question[]=[]; + score: number = 0; + + ngOnInit(): void { + this.randomQuestions=this.questionsService.getRandomQuestions(); + this.score=this.questionsService.getScore(); + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index eb8bc0d..f40168c 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -16,6 +16,7 @@ import { ProfileComponent } from './profile/profile.component'; import { RegisterComponent } from './register/register.component'; import { TeacherDashboardComponent } from './teacher-dashboard/teacher-dashboard.component'; import { QuestionsComponent } from './questions/questions.component'; +import { AnswersComponent } from './answers/answers.component'; const routes: Routes = [ {path:"", component:HomeComponent}, @@ -32,7 +33,8 @@ const routes: Routes = [ {path: "otp-verification", component: OtpVerificationComponent}, {path: "forgot-password", component: ForgotPasswordComponent}, {path: "teacher-dashboard", component: TeacherDashboardComponent}, - {path: "quiz", component: QuestionsComponent} + {path: "quiz", component: QuestionsComponent}, + {path: "answers", component: AnswersComponent} ]; @NgModule({ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 57c8cc8..cefcbe3 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -25,6 +25,7 @@ import { ProfileComponent } from './profile/profile.component'; import { ForgotPasswordComponent } from './forgot-password/forgot-password.component'; import { InvalidCredentialsComponent } from './login/invalid-credentials/invalid-credentials.component'; import { QuestionsComponent } from './questions/questions.component'; +import { AnswersComponent } from './answers/answers.component'; @NgModule({ declarations: [ @@ -45,7 +46,8 @@ import { QuestionsComponent } from './questions/questions.component'; ProfileComponent, ForgotPasswordComponent, InvalidCredentialsComponent, - QuestionsComponent + QuestionsComponent, + AnswersComponent ], imports: [ BrowserModule, diff --git a/src/app/questions.service.ts b/src/app/questions.service.ts index 634aac6..d79b3f5 100644 --- a/src/app/questions.service.ts +++ b/src/app/questions.service.ts @@ -12,7 +12,8 @@ export class QuestionsService { public apiUrl = "http://localhost:8000"; - questions: Question[]=[] + questions: Question[]=[]; + score: number = 0; getQuestions(){ // return this.http.get(`{this.apiUrl}/getquestions`); @@ -21,4 +22,20 @@ export class QuestionsService { }); } + + getRandomQuestions(): Question[]{ + return this.questions; +} + + setRandomQuestions(questions: Question[]): void{ + this.questions=questions; + } + + getScore(): number{ + return this.score; + } + + setScore(score: number): void{ + this.score=score; +} } diff --git a/src/app/questions/questions.component.html b/src/app/questions/questions.component.html index 2865d76..f7292d9 100644 --- a/src/app/questions/questions.component.html +++ b/src/app/questions/questions.component.html @@ -21,32 +21,7 @@

{{i+1}}. {{ question.label }}

-
- - - - - - -
+ \ No newline at end of file diff --git a/src/app/questions/questions.component.ts b/src/app/questions/questions.component.ts index 799664f..2450596 100644 --- a/src/app/questions/questions.component.ts +++ b/src/app/questions/questions.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { Question, Quiz, Answers } from '../quiz.model'; import { QuestionsService } from '../questions.service'; +import { Router } from '@angular/router'; @Component({ selector: 'app-questions', @@ -10,9 +11,10 @@ import { QuestionsService } from '../questions.service'; export class QuestionsComponent implements OnInit{ - constructor(private questionsService: QuestionsService) { } + constructor(private questionsService: QuestionsService, private router: Router) { } questions: Question[] = []; + randomQuestions: Question[] = []; answers: string[] = []; score: number = 0; selectedChoice: string[]=[]; @@ -23,28 +25,30 @@ export class QuestionsComponent implements OnInit{ this.questionsService.getQuestions().subscribe( (response:any) => { this.questions = response; - for(let i=0;i Math.random() - 0.5); + for(let i=0;i