diff --git a/apps/flutter_parent/assets/svg/canvas-parent-login-logo-dark.svg b/apps/flutter_parent/assets/svg/canvas-parent-login-logo-dark.svg
new file mode 100644
index 0000000000..ab80d41cfa
--- /dev/null
+++ b/apps/flutter_parent/assets/svg/canvas-parent-login-logo-dark.svg
@@ -0,0 +1,10 @@
+
diff --git a/apps/flutter_parent/assets/svg/canvas-parent-login-logo.svg b/apps/flutter_parent/assets/svg/canvas-parent-login-logo.svg
index a6413426ae..b595560d0c 100644
--- a/apps/flutter_parent/assets/svg/canvas-parent-login-logo.svg
+++ b/apps/flutter_parent/assets/svg/canvas-parent-login-logo.svg
@@ -1,10 +1,10 @@
diff --git a/apps/flutter_parent/flutter_parent_sdk_url b/apps/flutter_parent/flutter_parent_sdk_url
new file mode 100644
index 0000000000..6fcfede9b9
--- /dev/null
+++ b/apps/flutter_parent/flutter_parent_sdk_url
@@ -0,0 +1 @@
+https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_2.5.3-stable.tar.xz
\ No newline at end of file
diff --git a/apps/flutter_parent/lib/l10n/app_localizations.dart b/apps/flutter_parent/lib/l10n/app_localizations.dart
index 26fa996e0b..4872b5fe70 100644
--- a/apps/flutter_parent/lib/l10n/app_localizations.dart
+++ b/apps/flutter_parent/lib/l10n/app_localizations.dart
@@ -1705,4 +1705,7 @@ class AppLocalizations {
String get aboutVersionTitle =>
Intl.message('Version', desc: 'Title for Version field on about page');
+
+ String get aboutLogoSemanticsLabel =>
+ Intl.message('Instructure logo', desc: 'Semantics label for the Instructure logo on the about page');
}
diff --git a/apps/flutter_parent/lib/l10n/res/intl_en.arb b/apps/flutter_parent/lib/l10n/res/intl_en.arb
index 9d2ca6f103..d5edbf3ece 100644
--- a/apps/flutter_parent/lib/l10n/res/intl_en.arb
+++ b/apps/flutter_parent/lib/l10n/res/intl_en.arb
@@ -1,5 +1,5 @@
{
- "@@last_modified": "2023-04-14T11:04:46.988317",
+ "@@last_modified": "2023-08-25T11:04:20.901151",
"alertsLabel": "Alerts",
"@alertsLabel": {
"description": "The label for the Alerts tab",
@@ -2742,5 +2742,12 @@
"type": "text",
"placeholders_order": [],
"placeholders": {}
+ },
+ "Instructure logo": "Instructure logo",
+ "@Instructure logo": {
+ "description": "Semantics label for the Instructure logo on the about page",
+ "type": "text",
+ "placeholders_order": [],
+ "placeholders": {}
}
}
\ No newline at end of file
diff --git a/apps/flutter_parent/lib/l10n/res/intl_messages.arb b/apps/flutter_parent/lib/l10n/res/intl_messages.arb
index 9d2ca6f103..d5edbf3ece 100644
--- a/apps/flutter_parent/lib/l10n/res/intl_messages.arb
+++ b/apps/flutter_parent/lib/l10n/res/intl_messages.arb
@@ -1,5 +1,5 @@
{
- "@@last_modified": "2023-04-14T11:04:46.988317",
+ "@@last_modified": "2023-08-25T11:04:20.901151",
"alertsLabel": "Alerts",
"@alertsLabel": {
"description": "The label for the Alerts tab",
@@ -2742,5 +2742,12 @@
"type": "text",
"placeholders_order": [],
"placeholders": {}
+ },
+ "Instructure logo": "Instructure logo",
+ "@Instructure logo": {
+ "description": "Semantics label for the Instructure logo on the about page",
+ "type": "text",
+ "placeholders_order": [],
+ "placeholders": {}
}
}
\ No newline at end of file
diff --git a/apps/flutter_parent/lib/models/course.dart b/apps/flutter_parent/lib/models/course.dart
index 4d9036b03d..931a1bc5b0 100644
--- a/apps/flutter_parent/lib/models/course.dart
+++ b/apps/flutter_parent/lib/models/course.dart
@@ -15,8 +15,10 @@ library course;
import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
+import 'package:built_value/json_object.dart';
import 'package:built_value/serializer.dart';
import 'package:flutter_parent/models/course_settings.dart';
+import 'package:flutter_parent/models/grading_scheme_item.dart';
import 'package:flutter_parent/models/section.dart';
import 'package:flutter_parent/models/term.dart';
@@ -127,6 +129,16 @@ abstract class Course implements Built {
@nullable
CourseSettings get settings;
+ @nullable
+ @BuiltValueField(wireName: 'grading_scheme')
+ BuiltList get gradingScheme;
+
+ List get gradingSchemeItems {
+ if (gradingScheme == null) return [];
+ return gradingScheme.map((item) => GradingSchemeItem.fromJson(item)).where((element) => element != null).toList()
+ ..sort((a, b) => b.value.compareTo(a.value));
+ }
+
static void _initializeBuilder(CourseBuilder b) => b
..id = ''
..enrollments = ListBuilder()
@@ -176,6 +188,12 @@ abstract class Course implements Built {
bool isValidForCurrentStudent(String currentStudentId) {
return enrollments?.any((enrollment) => enrollment.userId == currentStudentId) ?? false;
}
+
+ String convertScoreToLetterGrade(double score, double maxScore) {
+ if (maxScore == 0.0 || gradingSchemeItems.isEmpty) return "";
+ double percent = score / maxScore;
+ return gradingSchemeItems.firstWhere((element) => percent >= element.value, orElse: () => gradingSchemeItems.last).grade;
+ }
}
@BuiltValueEnum(wireName: 'default_view')
diff --git a/apps/flutter_parent/lib/models/course.g.dart b/apps/flutter_parent/lib/models/course.g.dart
index 3c8a4f7d71..737bb7026e 100644
--- a/apps/flutter_parent/lib/models/course.g.dart
+++ b/apps/flutter_parent/lib/models/course.g.dart
@@ -154,6 +154,13 @@ class _$CourseSerializer implements StructuredSerializer {
..add('settings')
..add(serializers.serialize(value,
specifiedType: const FullType(CourseSettings)));
+ value = object.gradingScheme;
+
+ result
+ ..add('grading_scheme')
+ ..add(serializers.serialize(value,
+ specifiedType:
+ const FullType(BuiltList, const [const FullType(JsonObject)])));
return result;
}
@@ -265,6 +272,12 @@ class _$CourseSerializer implements StructuredSerializer {
result.settings.replace(serializers.deserialize(value,
specifiedType: const FullType(CourseSettings)) as CourseSettings);
break;
+ case 'grading_scheme':
+ result.gradingScheme.replace(serializers.deserialize(value,
+ specifiedType: const FullType(
+ BuiltList, const [const FullType(JsonObject)]))
+ as BuiltList