Skip to content

Commit

Permalink
Release Teacher 1.13.1 41 (#1283)
Browse files Browse the repository at this point in the history
  • Loading branch information
hermannakos authored May 20, 2021
1 parent a37fb5a commit 7031dd7
Show file tree
Hide file tree
Showing 390 changed files with 10,551 additions and 2,909 deletions.
1 change: 1 addition & 0 deletions apps/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ buildscript {
classpath Plugins.BUILD_SCAN
if (project.coverageEnabled) { classpath Plugins.JACOCO_ANDROID }
classpath Plugins.SQLDELIGHT
classpath Plugins.HILT
}
}

Expand Down
3 changes: 3 additions & 0 deletions apps/flutter_parent/assets/svg/ic_change_user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/flutter_parent/assets/svg/ic_help.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/flutter_parent/assets/svg/ic_inbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/flutter_parent/assets/svg/ic_logout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/flutter_parent/assets/svg/ic_manage_student.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/flutter_parent/assets/svg/ic_settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/flutter_parent/lib/l10n/res/intl_sv.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@
"type": "text",
"placeholders": {}
},
"Incomplete": "Ej fullständig",
"Incomplete": "ofullständig",
"@Incomplete": {
"description": "Grading status for an assignment marked as incomplete",
"type": "text",
Expand Down
98 changes: 67 additions & 31 deletions apps/flutter_parent/lib/screens/dashboard/dashboard_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class DashboardState extends State<DashboardScreen> {
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
// Header
_navDrawerHeader(user),

Divider(),
// Tiles (Inbox, Manage Students, Sign Out, etc)
Expanded(
child: _navDrawerItemsList(),
Expand Down Expand Up @@ -573,67 +573,91 @@ class DashboardState extends State<DashboardScreen> {
}

_navDrawerHeader(User user) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(16, 16, 0, 12),
child: Avatar(user.avatarUrl, name: user.shortName, radius: 28),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: UserName.fromUser(user, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
user?.primaryEmail ?? '',
style: Theme.of(context).textTheme.caption,
),
),
SizedBox(height: 36)
],
);
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.fromLTRB(24, 16, 0, 8),
child: Avatar(user.avatarUrl, name: user.shortName, radius: 40),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
child: UserName.fromUser(user, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
),
Padding(
padding: const EdgeInsets.fromLTRB(24, 4, 24, 16),
child: Text(
user?.primaryEmail ?? '',
style: Theme.of(context).textTheme.caption,
overflow: TextOverflow.fade,
),
)
],
);

Widget _navDrawerItemsList() {
var items = [
_navDrawerInbox(),
_navDrawerManageStudents(),
_navDrawerSettings(),
Divider(),
_navDrawerHelp(),
_navDrawerSwitchUsers(),
_navDrawerLogOut(),
null // to get trailing divider
];
return ListView.separated(
return ListView.builder(
itemCount: items.length,
itemBuilder: (context, index) => items[index],
separatorBuilder: (context, index) => const Divider(height: 0, indent: 16),
);
}

// Create the inbox tile with an infinite badge count, since there's lots of space we don't need to limit the count to 99+
_navDrawerInbox() => ListTile(
title: Text(L10n(context).inbox),
onTap: () => _navigateToInbox(context),
leading: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: SvgPicture.asset('assets/svg/ic_inbox.svg', height: 24, width: 24),
),
trailing: NumberBadge(
listenable: _interactor.getInboxCountNotifier(),
options: BadgeOptions(maxCount: null),
key: Key('inbox-count'),
),
);

_navDrawerManageStudents() =>
ListTile(title: Text(L10n(context).manageStudents), onTap: () => _navigateToManageStudents(context));
_navDrawerManageStudents() => ListTile(
title: Text(L10n(context).manageStudents),
onTap: () => _navigateToManageStudents(context),
leading: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: SvgPicture.asset('assets/svg/ic_manage_student.svg', height: 24, width: 24),
),
);

_navDrawerSettings() => ListTile(title: Text(L10n(context).settings), onTap: () => _navigateToSettings(context));
_navDrawerSettings() => ListTile(
title: Text(L10n(context).settings),
onTap: () => _navigateToSettings(context),
leading: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: SvgPicture.asset('assets/svg/ic_settings.svg', height: 24, width: 24),
),
);

_navDrawerHelp() => ListTile(
title: Text(L10n(context).help),
onTap: () => _navigateToHelp(context),
leading: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: SvgPicture.asset('assets/svg/ic_help.svg', height: 24, width: 24),
),
);

_navDrawerLogOut() => ListTile(
title: Text(L10n(context).logOut),
leading: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: SvgPicture.asset('assets/svg/ic_logout.svg', height: 24, width: 24,),
),
onTap: () {
showDialog(
context: context,
Expand All @@ -642,11 +666,13 @@ class DashboardState extends State<DashboardScreen> {
content: Text(L10n(context).logoutConfirmation),
actions: <Widget>[
FlatButton(
child: Text(MaterialLocalizations.of(context).cancelButtonLabel),
child: Text(
MaterialLocalizations.of(context).cancelButtonLabel),
onPressed: () => Navigator.of(context).pop(),
),
FlatButton(
child: Text(MaterialLocalizations.of(context).okButtonLabel),
child:
Text(MaterialLocalizations.of(context).okButtonLabel),
onPressed: () => _performLogOut(context),
)
],
Expand All @@ -658,11 +684,18 @@ class DashboardState extends State<DashboardScreen> {

_navDrawerSwitchUsers() => ListTile(
title: Text(L10n(context).switchUsers),
leading: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: SvgPicture.asset('assets/svg/ic_change_user.svg', height: 24, width: 24),
),
onTap: () => _performLogOut(context, switchingUsers: true),
);

_navDrawerActAsUser() => ListTile(
leading: Icon(CanvasIcons.masquerade),
leading: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Icon(CanvasIcons.masquerade),
),
title: Text(L10n(context).actAsUser),
onTap: () {
Navigator.of(context).pop();
Expand All @@ -671,7 +704,10 @@ class DashboardState extends State<DashboardScreen> {
);

_navDrawerStopActingAsUser() => ListTile(
leading: Icon(CanvasIcons.masquerade),
leading: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Icon(CanvasIcons.masquerade),
),
title: Text(L10n(context).stopActAsUser),
onTap: () {
Navigator.of(context).pop();
Expand Down
29 changes: 27 additions & 2 deletions apps/student/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.firebase.crashlytics'
apply from: '../../gradle/coverage.gradle'
apply plugin: 'com.squareup.sqldelight'
apply plugin: 'dagger.hilt.android.plugin'

def coverageEnabled = project.hasProperty('coverage')

Expand Down Expand Up @@ -57,8 +58,8 @@ android {
applicationId "com.instructure.candroid"
minSdkVersion Versions.MIN_SDK
targetSdkVersion Versions.TARGET_SDK
versionCode = 225
versionName = '6.10.0'
versionCode = 227
versionName = '6.11.1'

vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
Expand Down Expand Up @@ -186,6 +187,8 @@ android {

// Fix for Robolectric 4.x
resolutionStrategy.force "org.ow2.asm:asm:7.0"

resolutionStrategy.force Libs.KOTLIN_COROUTINES_CORE
}

/*
Expand Down Expand Up @@ -220,6 +223,14 @@ android {
sourceCompatibility 1.8
targetCompatibility 1.8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}

buildFeatures {
dataBinding true
}
}

dependencies {
Expand Down Expand Up @@ -255,6 +266,7 @@ dependencies {
testImplementation Libs.KOTLIN_COROUTINES_TEST
testImplementation Libs.FIREBASE_CORE
testImplementation Libs.THREETEN_BP
testImplementation Libs.ANDROIDX_CORE_TESTING

implementation (Libs.FIREBASE_ANALYTICS) {
transitive = true
Expand Down Expand Up @@ -296,6 +308,7 @@ dependencies {
implementation Libs.FIREBASE_MESSAGING
implementation Libs.ANDROIDX_PALETTE
implementation Libs.PLAY_CORE
implementation Libs.PLAY_CORE_KTX

/* Job Scheduler */
implementation Libs.FIREBASE_JOB_DISPATCHER
Expand All @@ -306,6 +319,18 @@ dependencies {
/* Qr Code */
implementation(Libs.JOURNEY_ZXING) { transitive = false }
implementation Libs.ZXING

/* AAC */
implementation Libs.VIEW_MODEL
implementation Libs.LIVE_DATA
implementation Libs.VIEW_MODE_SAVED_STATE
implementation Libs.FRAGMENT_KTX
kapt Libs.LIFECYCLE_COMPILER

/* DI */
implementation Libs.HILT
kapt Libs.HILT_COMPILER

implementation "com.google.firebase:firebase-crashlytics-ndk:17.2.1"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ class SettingsE2ETest : StudentTest() {

legalPage.assertPageObjects()
Espresso.pressBack() // Exit legal page

settingsPage.launchHelpPage()

// May be brittle. See comments in HelpPage.kt.
helpPage.assertPageObjects()
}

// The remote config settings page (only available on debug builds) used to do some
Expand Down
Loading

0 comments on commit 7031dd7

Please sign in to comment.