Skip to content

Commit

Permalink
Student 6.8.2 Hotfixes (#938)
Browse files Browse the repository at this point in the history
Co-authored-by: Blackchai <[email protected]>
  • Loading branch information
armstrongnate and TrevorNeedham authored Aug 18, 2020
1 parent 6b3c0fe commit a16748b
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 57 deletions.
3 changes: 0 additions & 3 deletions apps/flutter_parent/lib/models/assignment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ abstract class Assignment implements Built<Assignment, AssignmentBuilder> {

bool get published;

bool get muted;

@nullable
@BuiltValueField(wireName: 'group_category_id')
String get groupCategoryId;
Expand Down Expand Up @@ -139,7 +137,6 @@ abstract class Assignment implements Built<Assignment, AssignmentBuilder> {
..lockedForUser = false
..freeFormCriterionComments = false
..published = false
..muted = false
..userSubmitted = false
..onlyVisibleToOverrides = false
..anonymousPeerReviews = false
Expand Down
44 changes: 12 additions & 32 deletions apps/flutter_parent/lib/models/assignment.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/flutter_parent/lib/screens/login_landing_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class LoginLandingScreen extends StatelessWidget {
child: FullScreenScrollContainer(
horizontalPadding: 0,
children: <Widget>[
_helpRequestButton(context),
// _helpRequestButton(context), // add back after we make mobile login better
Expanded(child: _body(context)),
SizedBox(height: 56.0), // Sizedbox to offset helpRequestButton
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ void main() {
ApiPrefs.clean();
});

/* Hiding the help button until we make mobile login better
testWidgetsWithAccessibilityChecks('Tapping help button shows help dialog', (tester) async {
await tester.pumpWidget(TestApp(LoginLandingScreen()));
await tester.pumpAndSettle();
Expand All @@ -248,6 +249,7 @@ void main() {
expect(find.byType(ErrorReportDialog), findsOneWidget);
verify(analytics.logEvent(any)).called(1);
});
*/

testWidgetsWithAccessibilityChecks('Uses two-finger double-tap to cycle login flows', (tester) async {
await tester.pumpWidget(TestApp(LoginLandingScreen()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ open class InternalWebviewFragment : ParentFragment() {
originalUserAgentString = canvasWebView.settings.userAgentString
canvasWebView.settings.userAgentString = ApiPrefs.userAgent
canvasWebView.setInitialScale(100)
canvasWebView.settings.setSupportMultipleWindows(true) // Required to allow iFrames with links that have a target of '_blank' - see CanvasWebChromeClient#onCreateWindow()

canvasWebView.canvasWebChromeClientCallback = CanvasWebView.CanvasWebChromeClientCallback { _, newProgress ->
if (newProgress == 100) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ object RouteMatcher : BaseRouteMatcher() {
routes.add(Route(courseOrGroup("/:${RouterParams.COURSE_ID}/files"), FileListFragment::class.java))
routes.add(Route(courseOrGroup("/:${RouterParams.COURSE_ID}/files/folder/:${RouterParams.FOLDER_NAME}"), RouteContext.FILE))
routes.add(Route(courseOrGroup("/:${RouterParams.COURSE_ID}/files/:${RouterParams.FILE_ID}/download"), RouteContext.FILE)) // trigger webview's download listener
routes.add(Route(courseOrGroup("/:${RouterParams.COURSE_ID}/files/:${RouterParams.FILE_ID}/preview"), RouteContext.FILE))
routes.add(Route(courseOrGroup("/:${RouterParams.COURSE_ID}/files/:${RouterParams.FILE_ID}"), RouteContext.FILE))
routes.add(Route(courseOrGroup("/:${RouterParams.COURSE_ID}/files/folder(\\/.*)*/:${RouterParams.FILE_ID}"), RouteContext.FILE))
routes.add(Route("/files/folder(\\/.*)*/:${RouterParams.FILE_ID}", RouteContext.FILE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ object RouteMatcher : BaseRouteMatcher() {

routes.add(Route(courseOrGroup("/:course_id/files"), FileListFragment::class.java))
routes.add(Route(courseOrGroup("/:course_id/files/:file_id/download"), RouteContext.FILE))
routes.add(Route(courseOrGroup("/:course_id/files/:file_id/preview"), RouteContext.FILE))
routes.add(Route(courseOrGroup("/:course_id/files/:file_id"), RouteContext.FILE))
// Tries to get the folder or preview of file. File can be multiple folders deep (files/folder/folder1/folder2/folder3)...
routes.add(Route(courseOrGroup("/:course_id/files/folder(\\/.*)*"), FileListFragment::class.java))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ class AssignmentUnitTest : Assert() {
"online_text_entry",
"media_recording"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/2241839",
"allowed_extensions": [
"doc",
Expand Down Expand Up @@ -192,7 +191,6 @@ class AssignmentUnitTest : Assert() {
"media_recording",
"online_upload"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/3119886",
"use_rubric_for_grading": true,
"free_form_criterion_comments": false,
Expand Down Expand Up @@ -406,7 +404,6 @@ class AssignmentUnitTest : Assert() {
"online_url"
],
"description": null,
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/836357/assignments/3546452",
"locked_for_user": true,
"lock_explanation": "unlocked"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ class ConversationUnitTest : Assert() {
"submission_types": [
"online_quiz"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/836357/assignments/3568225",
"needs_grading_count": 0,
"quiz_id": 1298486,
Expand Down Expand Up @@ -538,7 +537,6 @@ class ConversationUnitTest : Assert() {
"online_url",
"media_recording"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/24219/assignments/405404",
"needs_grading_count": 2,
"use_rubric_for_grading": false,
Expand Down Expand Up @@ -839,7 +837,6 @@ class ConversationUnitTest : Assert() {
"submission_types": [
"online_text_entry"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/24219/assignments/3562637",
"needs_grading_count": 0,
"locked_for_user": false
Expand Down Expand Up @@ -898,7 +895,6 @@ class ConversationUnitTest : Assert() {
"submission_types": [
"online_text_entry"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/24219/assignments/2978687",
"needs_grading_count": 2,
"locked_for_user": false
Expand Down Expand Up @@ -999,7 +995,6 @@ class ConversationUnitTest : Assert() {
"submission_types": [
"online_text_entry"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/3507913",
"needs_grading_count": 1,
"locked_for_user": false
Expand Down Expand Up @@ -1059,7 +1054,6 @@ class ConversationUnitTest : Assert() {
"online_text_entry",
"online_url"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/24219/assignments/3563900",
"needs_grading_count": 1,
"locked_for_user": false
Expand Down Expand Up @@ -1118,7 +1112,6 @@ class ConversationUnitTest : Assert() {
"submission_types": [
"none"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/836357/assignments/3488393",
"needs_grading_count": 0,
"locked_for_user": false
Expand Down Expand Up @@ -1180,7 +1173,6 @@ class ConversationUnitTest : Assert() {
"media_recording",
"online_upload"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/24219/assignments/3562410",
"needs_grading_count": 1,
"locked_for_user": false
Expand Down Expand Up @@ -1253,7 +1245,6 @@ class ConversationUnitTest : Assert() {
"submission_types": [
"online_text_entry"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/3510750",
"needs_grading_count": 0,
"locked_for_user": false
Expand Down Expand Up @@ -1319,7 +1310,6 @@ class ConversationUnitTest : Assert() {
"submission_types": [
"online_quiz"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/2241845",
"needs_grading_count": 0,
"quiz_id": 757313,
Expand Down Expand Up @@ -1380,7 +1370,6 @@ class ConversationUnitTest : Assert() {
"submission_types": [
"none"
],
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/3484476",
"needs_grading_count": 0,
"locked_for_user": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class TodoUnitTest : Assert() {
"online_upload"
],
"has_submitted_submissions": true,
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/5848306",
"has_overrides": false,
"published": true,
Expand Down Expand Up @@ -119,7 +118,6 @@ class TodoUnitTest : Assert() {
"media_recording"
],
"has_submitted_submissions": true,
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/5375271",
"has_overrides": false,
"use_rubric_for_grading": true,
Expand Down Expand Up @@ -258,7 +256,6 @@ class TodoUnitTest : Assert() {
"media_recording"
],
"has_submitted_submissions": false,
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/6624879",
"has_overrides": true,
"published": true,
Expand Down Expand Up @@ -297,7 +294,6 @@ class TodoUnitTest : Assert() {
"online_quiz"
],
"has_submitted_submissions": true,
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/4691021",
"has_overrides": false,
"quiz_id": 1642787,
Expand Down Expand Up @@ -339,7 +335,6 @@ class TodoUnitTest : Assert() {
"online_quiz"
],
"has_submitted_submissions": true,
"muted": false,
"html_url": "https://mobiledev.instructure.com/courses/833052/assignments/6881563",
"has_overrides": false,
"quiz_id": 2421689,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ abstract class BaseLoginLandingPageActivity : AppCompatActivity(), ErrorReportDi
startActivity(i)
}

helpButton.setHidden(true) // hiding the help button until we make mobile login better
helpButton.onClickPopupMenu(getString(R.string.requestLoginHelp) to { requestLoginHelp() })

val remoteConfigParam = when {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ object AssignmentUtils2 {
// Check to see if an assignment either
// 1. Has not been graded
// 2. Is "Pending Review"
// 3. Is not Posted - Muted is being deprecated, so we are only going to track postedAt.
private fun hasNoGrade(assignment: Assignment, submission: Submission, isTeacher: Boolean): Boolean {
return !submission.isGraded || Const.PENDING_REVIEW == submission.workflowState || (!isTeacher && assignment.submission?.postedAt == null)
}
Expand Down

0 comments on commit a16748b

Please sign in to comment.