Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shokhzod.murodov committed Oct 3, 2023
2 parents e645f47 + 0a7423f commit d19f1fa
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Ruzimurod

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Welcome to the Telegram bot system.

## Two programmers worked on the project and developed its first version

[maxwell882000](https://github.com/maxwell882000) and [Ruzimurod2003](https://github.com/Ruzimurod2003)

The assignment consists of 3 parts:

1. The back end part of the assignment. For this part, an ASP NET Core Web Api project was written and configured to release the Api in its entirety,
2. For the other part, a React App project was created, in which the complete view of the quiz was configured with all the necessary settings, views and properties.
3. The logic of transferring the commands received by the bot to the view form or to another place is made

![image](https://github.com/Ruzimurod2003/quiz-bot/assets/78567812/61ee29b8-f1ba-4b72-86aa-a544df4d1428)

When you start the bot for the first time, this form will appear,

![image](https://github.com/Ruzimurod2003/quiz-bot/assets/78567812/ec16a101-1e1e-433b-88d5-94bce58acaf6)
![image](https://github.com/Ruzimurod2003/quiz-bot/assets/78567812/71296f0a-086c-40e6-8203-41a41397a371)

Then it goes through each page, determines the test, and the back end waits for the result and stores it in the database,

![image](https://github.com/Ruzimurod2003/quiz-bot/assets/78567812/f9f8ac60-c34f-4b8d-a4b1-aa32dd31d893)
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public ActionResult CheckQuestionsWithAnswer(UserAlsoCheckAnswerVM datas)
}
var userResult = new Result()
{
TelegramId = datas.UserId,
TelegramId = datas.UserId.ToString(),
Created = DateTime.Now,
PassedExamCount = count,
SpentTime = datas.SpentTime
Expand Down
2 changes: 1 addition & 1 deletion backend-quiz-bot/ViewModels/UserAlsoCheckAnswerVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace BackendQuizBot.ViewModels;

public class UserAlsoCheckAnswerVM
{
public string UserId { get; set; }
public long UserId { get; set; }
public List<CheckAnswerVM> AnswerAndQuestions { get; set; }
public int SpentTime { get; set; }
}

0 comments on commit d19f1fa

Please sign in to comment.