Skip to content

Commit

Permalink
Merge pull request #29 from mikyll/main
Browse files Browse the repository at this point in the history
Merge changes from main
  • Loading branch information
mikyll authored Jan 15, 2025
2 parents a97a891 + 89fffd8 commit fa4f240
Show file tree
Hide file tree
Showing 7 changed files with 410 additions and 256 deletions.
90 changes: 90 additions & 0 deletions .github/ISSUE_TEMPLATE/new_question.it.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Nuova Domanda ROQuiz
description: Richiesta di aggiunta di una nuova domanda
title: "[Nuova Domanda]: "
labels:
- new-question
projects:
- "mikyll/ROQuiz"
assignees:
- mikyll

body:
- type: markdown
attributes:
value: |
**NB**: Sei un eroe.
- type: dropdown
id: topic-answer
attributes:
label: Argomento
multiple: false
options:
- Programmazione Matematica
- Programmazione Lineare
- Algoritmo del Simplesso
- Dualità
- Programmazione Lineare Intera
- Complessità
default: 0
validations:
required: false

- type: textarea
id: question
attributes:
label: Domanda
placeholder: Scrivi qui il corpo della domanda.
render: text
validations:
required: true
- type: input
id: answerA
attributes:
label: Risposta A
placeholder: Scrivi qui la risposta A
validations:
required: true
- type: input
id: answerB
attributes:
label: Risposta B
placeholder: Scrivi qui la risposta B
validations:
required: true
- type: input
id: answerC
attributes:
label: Risposta C
placeholder: Scrivi qui la risposta C
validations:
required: false
- type: input
id: answerD
attributes:
label: Risposta D
placeholder: Scrivi qui la risposta D
validations:
required: false
- type: input
id: answerE
attributes:
label: Risposta E
placeholder: Scrivi qui la risposta E
validations:
required: false

- type: dropdown
id: correct-answer
attributes:
label: Risposta Corretta
multiple: false
options:
- A
- B
- C
- D
- E
default: 0
validations:
required: false
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</tr>
</table>

### Desktop (Old)
#### Java (Obsoleta)

<details>
<summary>Versione Java funzionante ma non più supportata.</summary>
Expand All @@ -73,6 +73,10 @@
</table>
</details>

### Web

Per ora è accessibile al mio sito web: [mikyll.github.io/projects/roquiz/play](https://mikyll.github.io/projects/roquiz/play/)

## Disclaimer

L'obiettivo dell'applicazione è esercitarsi coi quiz dopo aver studiato la teoria (molto meglio se dal libro, in quanto è completo ed esaustivo). <b>Non mi assumo responsabilità di alcun tipo nel caso di errori nelle domande o nelle risposte, né tantomento nel caso di bocciature potenti</b>. Fatene un buon uso e buona fortuna con l'esame <3
Expand Down Expand Up @@ -343,6 +347,10 @@ Per compilarlo, lanciare uno dei comandi seguenti, in base all'output desiderato
- [Download asset Flutter](https://pub.dev/packages/download_assets)
- [LongPress Widget](https://stackoverflow.com/questions/52128572/flutter-execute-method-so-long-the-button-pressed)
- [Flutter CI/CD using GitHub Actions](https://blog.logrocket.com/flutter-ci-cd-using-github-actions/)
- Build Flutter Installers:
- [MacOS](https://medium.com/@fluttergems/packaging-and-distributing-flutter-desktop-apps-the-missing-guide-part-1-macos-b36438269285)
- [Windows](https://medium.com/@fluttergems/packaging-and-distributing-flutter-desktop-apps-the-missing-guide-for-open-source-indie-0b468d5e9e70)
- [Linux](https://medium.com/@fluttergems/packaging-and-distributing-flutter-desktop-apps-the-missing-guide-part-3-linux-24ef8d30a5b4)

</details>

Expand Down
4 changes: 4 additions & 0 deletions app-mobile/flutter_application/lib/model/AppUpdater.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ class AppUpdater {
String newVersion = "";
String newVersionDownloadURL = "";

if (getPlatformType() == PlatformType.WEB) {
return (newVersionPresent, newVersion, newVersionDownloadURL);
}

http.Response response = await http.get(Uri.parse(
'https://api.github.com/repos/mikyll/ROQuiz/releases/latest'));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ class QuestionRepository {

/// Returns true if there is a more recent questions file
Future<(bool, DateTime, int)> checkQuestionUpdates() async {
if (getPlatformType() == PlatformType.MOBILE) {
return (false, DateTime.now(), 0);
}

DateTime date = await getLatestQuestionFileDate();
String content = await downloadFile();
int qNum = isValid(content);
Expand Down
Loading

0 comments on commit fa4f240

Please sign in to comment.