Skip to content

Commit

Permalink
fixes and minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ttulka committed Dec 8, 2021
1 parent 2a3c1c4 commit 0607769
Show file tree
Hide file tree
Showing 33 changed files with 240 additions and 81 deletions.
82 changes: 77 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,86 @@
# Student Observations
# Student Observations App

## Install
<img src="logo.png" style="height: 6rem; float: right;" align="right">

### Linux (Ubuntu)
Free and open-source software for school teachers to write and maintain student observations.

Documents stored only _locally_ - no piece of data will ever leave your laptop!

Desktop application for **Windows**, **macOS**, and Linux (unofficial support).

### Features

- Compose and edit student observations
- Manage categories of observations with predefined templates
- Group students into classes
- Rich text editor
- Printing
- Autosave

### Languages
- English
- German (Deutsch)

This software is free to use but you are welcome to <a href="https://www.buymeacoffee.com/ttulka" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 35px !important;" ></a>

## Overview

Tbd

See the [Wiki](https://github.com/ttulka/observations/wiki) pages for more details.

## Platform support

### Officially supported:

- **Windows** (tested on Win 7 and Win 10)
- **macOS** (tested on Big Sur 11.5)

### Unofficially supported:

- **Linux** (tested on Ubuntu 20.04)

The main reason to support Linux unofficially is the variety of distribution. We can't really ensure to run everywhere but we try hard.

Please [contact us](https://github.com/ttulka/observations/issues) when facing any issues - your feedback is highly valuable!


## Installation

Follow the installation instructions for your platform:

### On Windows

Tbd

### On Mac

Tbd

### On Linux

Tbd

#### Ubuntu

```sh
sudo apt-get -y install libsqlite3-0 libsqlite3-dev
```

## TODO
## Contributions and development

Contributions and translations are very welcome! Please make sure your chance works on all supported platforms.

### Tech stack
- Flutter
- Sqlite


### To do
- searching (filtering) students
- disaster recovery
- sentiment of observation (???)
- sentiment of observation (???)

## License

[MIT](https://github.com/ttulka/observations/blob/main/LICENSE)
24 changes: 22 additions & 2 deletions lib/category/form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,32 @@ class CategoryForm {
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16),
child: Column(
children: [
quill.QuillToolbar.basic(controller: controller, showImageButton: false, showVideoButton: false),
Padding(
padding: const EdgeInsets.only(bottom: 3),
child: quill.QuillToolbar.basic(
controller: controller,
showInlineCode: false,
showImageButton: false,
showVideoButton: false,
showCameraButton: false,
showListCheck: false,
showBackgroundColorButton: false, // it can't be printed
showLink: false, // it can't be printed
),
),
Expanded(
child: Container(
child: quill.QuillEditor.basic(
decoration: BoxDecoration(
border: Border.all(width: 2.0, color: Colors.grey), borderRadius: BorderRadius.circular(10.0)),
child: quill.QuillEditor(
controller: controller,
readOnly: false, // true for view only mode
autoFocus: true,
scrollable: true,
focusNode: FocusNode(),
scrollController: ScrollController(),
padding: const EdgeInsets.all(16.0),
expands: true,
),
),
)
Expand Down
2 changes: 1 addition & 1 deletion lib/classroom/form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class ClassroomForm {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_newTextField(context, AppLocalizations.of(context)!.classroomName, nameController, true, 5),
_newTextField(context, AppLocalizations.of(context)!.classroomDescription, descController, false, 50),
_newTextField(context, AppLocalizations.of(context)!.classroomYear, yearController, true, 4,
filter: RegExp(r'^\d{4}$')),
_newTextField(context, AppLocalizations.of(context)!.classroomDescription, descController, false, 50),
Padding(
padding: const EdgeInsets.only(top: 16, bottom: 32),
child: ElevatedButton(
Expand Down
4 changes: 3 additions & 1 deletion lib/classroom/list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class _ClassroomListState extends State<ClassroomList> {
future: widget.loadClassrooms(),
buildWidget: (categories) => ListView(
padding: const EdgeInsets.symmetric(vertical: 8.0),
children: _buildItems(categories),
children: categories.isNotEmpty
? _buildItems(categories)
: [emptyListTile(AppLocalizations.of(context)!.emptyClassroomList)],
),
),
floatingActionButton: buildFloatingAddButton(
Expand Down
52 changes: 51 additions & 1 deletion lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
{
"appTitle": "Student Observations DE"
"appTitle": "Studentenbeobachtungen",
"menuCategories": "Kategorien",
"menuAbout": "About",
"aboutTitle": "Über diese Anwendung",
"aboutContent": "Kostenlose und Open-Source-Software für Lehrer, um Schülerbeobachtungen zu schreiben.\n\nDokumente werden nur lokal gespeichert - keine Daten werden jemals Ihren Laptop verlassen!\n\nSiehe den Link oben, um weitere Informationen zu erhalten diese Anwendung.\n\n\n***\n\n\nVersion alpha-0.0.0\n\nErstellt von Tomas Tulka (ttulka.com)\n\nDiese Software wird unter der MIT-Lizenz entwickelt und vertrieben\n(https://opensource.org/licenses/MIT).",
"aboutLink": "https://github.com/ttulka/observations",
"formSave": "Speichern",
"formRequired": "Erforderlich",
"formInvalid": "Ungültiger Wert",
"laden": "Wird geladen...",
"alertOk": "OK",
"alertCancel": "Abbrechen",
"alertAtLeastOne": "Mindestens ein Element ist erforderlich.",
"printHint": "Drucken",
"printNotSupported": "Drucken wird auf Ihrer Plattform nicht unterstützt.",
"addSuccess": "Erfolgreich hinzugefügt.",
"editSuccess": "Erfolgreich bearbeitet.",
"removeSuccess": "Erfolgreich entfernt.",
"copySuccess": "Erfolgreich kopiert.",
"removeAlertTitle": "Entfernungsbestätigung",
"removeAlertText": "Möchten Sie das Element wirklich entfernen?",
"removeAlertOk": "Entfernen",
"categoryName": "Kategoriename",
"categoryDefaultsSocial": "Sozialverhalten",
"categoryDefaultsWork": "Arbeitsverhalten",
"listCategoryTitle": "Kategorien von Beobachtungen",
"listCategoryUp": "Up",
"listCategoryDown": "Nach unten",
"addCategoryTitle": "Eine neue Kategorie hinzufügen",
"editCategoryTitle": "Eine Kategorie bearbeiten",
"editCategoryHint": "Diese Kategorie bearbeiten",
"removeCategoryHint": "Diese Kategorie entfernen",
"classroomName": "Klassen-ID",
"classroomYear": "Beginn des Schuljahres",
"classroomDescription": "Klassenbeschreibung (optional)",
"emptyClassroomList": "...fügen Sie eine neue Klasse hinzu, indem Sie auf den Button ⊕ klicken",
"addClassroomTitle": "Neue Klasse hinzufügen",
"editClassroomTitle": "Eine Klasse bearbeiten",
"editClassroomHint": "Diese Klasse bearbeiten",
"removeClassroomHint": "Diese Klasse entfernen",
"copyClassroomHint": "Diese Klasse und ihre Schüler kopieren",
"copyClassroomAlertTitle": "Klasse kopieren",
"copyClassroomAlertText": "Sind Sie sicher, dass Sie die Klasse und alle ihre Schüler kopieren möchten?",
"studentFamilyName": "Familienname",
"studentGivenName": "Vorname",
"emptyStudentList": "...fügen Sie einen neuen Schüler hinzu, indem Sie auf den Button ⊕ klicken",
"addStudentTitle": "Neuen Schüler hinzufügen",
"editStudentTitle": "Bearbeiten eines Schülers",
"editStudentHint": "Diesen Schüler bearbeiten",
"removeStudentHint": "Diesen Schüler entfernen",
"printStudentObservationsHint": "Alle Schülerbeobachtungen drucken"
}
4 changes: 3 additions & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"menuCategories": "Categories",
"menuAbout": "About",
"aboutTitle": "About this application",
"aboutContent": "TODO: Checkout the link above to see more info about this application.\n\n\n***\n\n\nCreated by Tomas Tulka (ttulka.com)\n\nThis software is developed and distributed under the MIT License\n(https://opensource.org/licenses/MIT).",
"aboutContent": "Free and open-source software for school teachers to write student observations.\n\nDocuments stored only locally - no piece of data will ever leave your laptop!\n\nCheck out the link above to see more info about this application.\n\n\n***\n\n\nVersion alpha-0.0.0\n\nCreated by Tomas Tulka (ttulka.com)\n\nThis software is developed and distributed under the MIT License\n(https://opensource.org/licenses/MIT).",
"aboutLink": "https://github.com/ttulka/observations",
"formSave": "Save",
"formRequired": "Required",
Expand Down Expand Up @@ -34,6 +34,7 @@
"classroomName": "Class ID",
"classroomYear": "Starting school year",
"classroomDescription": "Class Description (optional)",
"emptyClassroomList": "...add a new class by clicking the ⊕ button",
"addClassroomTitle": "Add a new class",
"editClassroomTitle": "Edit a class",
"editClassroomHint": "Edit this class",
Expand All @@ -43,6 +44,7 @@
"copyClassroomAlertText": "Are you sure you want to copy the class and all its students?",
"studentFamilyName": "Family name",
"studentGivenName": "Given name",
"emptyStudentList": "...add a new student by clicking the ⊕ button",
"addStudentTitle": "Add a new student",
"editStudentTitle": "Edit a student",
"editStudentHint": "Edit this student",
Expand Down
11 changes: 4 additions & 7 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ void main() {
WidgetsFlutterBinding.ensureInitialized();
try {
if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
const width = 1024.0;
const height = 800.0;
const width = 850.0;
const height = 600.0;
setWindowTitle(appTitle);
setWindowMinSize(const Size(width, height));
//setWindowFrame(const Rect.fromLTWH(50, 50, width, height));
Expand Down Expand Up @@ -116,15 +116,12 @@ class HomePage extends StatelessWidget {
child: InkWell(
child: Text(
link,
style: const TextStyle(
color: Colors.blue, decoration: TextDecoration.underline),
style: const TextStyle(color: Colors.blue, decoration: TextDecoration.underline),
),
onTap: () => launch(link),
),
),
Center(
child: Text('\n\n' + AppLocalizations.of(context)!.aboutContent,
textAlign: TextAlign.center)),
Center(child: Text('\n\n' + AppLocalizations.of(context)!.aboutContent, textAlign: TextAlign.center)),
],
),
),
Expand Down
3 changes: 2 additions & 1 deletion lib/observation/compose.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class ComposeObservationDialog extends StatelessWidget {
floatingActionButton: FloatingActionButton(
tooltip: AppLocalizations.of(context)!.printHint,
child: const Icon(Icons.print),
backgroundColor: Colors.grey,
foregroundColor: Colors.blue,
backgroundColor: Colors.white,
onPressed: () async {
if (currentObservation != null) {
await showPrintDialog(context, [currentObservation!],
Expand Down
1 change: 1 addition & 0 deletions lib/observation/form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class ObservationForm {
showCameraButton: false,
showListCheck: false,
showBackgroundColorButton: false, // it can't be printed
showLink: false, // it can't be printed
),
),
Expanded(
Expand Down
22 changes: 12 additions & 10 deletions lib/student/list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,18 @@ class _StudentListState extends State<StudentList> {
future: widget.loadStudents(),
buildWidget: (students) => ListView(
padding: const EdgeInsets.symmetric(vertical: 8.0),
children: students
.map((Student student) => StudentListItem(
student: student,
classroom: widget.classroom,
loadObservations: widget.loadObservations,
printingConvertToHtmlActive: widget.printingConvertToHtmlActive(),
onEditStudent: _handleEditStudent,
onRemoveStudent: _handleRemoveStudent,
))
.toList(),
children: students.isNotEmpty
? students
.map((Student student) => StudentListItem(
student: student,
classroom: widget.classroom,
loadObservations: widget.loadObservations,
printingConvertToHtmlActive: widget.printingConvertToHtmlActive(),
onEditStudent: _handleEditStudent,
onRemoveStudent: _handleRemoveStudent,
))
.toList()
: [emptyListTile(AppLocalizations.of(context)!.emptyStudentList)],
),
),
floatingActionButton: buildFloatingAddButton(
Expand Down
Loading

0 comments on commit 0607769

Please sign in to comment.