Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload & View Documents #139

Merged
merged 10 commits into from
Apr 4, 2017
Merged

Upload & View Documents #139

merged 10 commits into from
Apr 4, 2017

Conversation

kgehmlich
Copy link
Owner

@kgehmlich kgehmlich commented Apr 2, 2017

Please pull and test. This merge adds the following features/modifications:

  1. Add upload doc functionality (document is uploaded to AWS server)
  2. View Documents fragment - downloads and displays the list of documents for the chosen class
  3. Class page was modified to add View Documents button

** Note: Be sure to enable "Storage" permissions for the app!

kgehmlich and others added 7 commits March 31, 2017 14:32
Merge master into UploadDOC to use newest UI changes on UploadDOC branch
Merge master into UploadDOC to align with latest changes
Pass className and if TA or student is callin upload document
- Fix metadata bug in UploadDocument.java
- Convert URI to Fil in DocumentFragment.java
- Refactor UploadDocument to DocumentServices
- Add listDocumentsForClass method
- Add "View Documents" fragment and buttons to access that fragment
- Option to choose a different file name for upload exists here, but is commented out
}


public ArrayList<String> listDcoumentsForClass(String className) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

listDcoumentsForClass should be listDocumentsForClass.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You lost me here... What's the problem?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I just found the typo, thank you. Will fix in next commit.

@iamlax
Copy link
Collaborator

iamlax commented Apr 2, 2017

I am not done reviewing it. But should I be able to download the uploads? There does not seem to be any code in ViewDocumentsFragment that will allow the user to download the documents in that class.

@iamlax
Copy link
Collaborator

iamlax commented Apr 2, 2017

The upload and getting all the list of documents for that class is working.

@iamlax
Copy link
Collaborator

iamlax commented Apr 2, 2017

Having the issue #135 will be quite helpful for this problem. Trying to upload a file without storage permission does not crash the app, but it does not tell the user that the upload was not successful. Since I am still able to choose a file on my device.

We can even add a toast in the onError(){...} method in ViewClassPageFragment to display the error not just in our logs but to the user as well

@@ -0,0 +1,17 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.PocketMoodle.ClassPageFragment"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The context is more tools:context="com.PocketMoodle.ViewDocumentsFragment" unless u plan to have the list of documents displayed on the ClassPageFragment in the future.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, I forgot to change that. Thanks!

@iamlax
Copy link
Collaborator

iamlax commented Apr 2, 2017

Overall well done. The code is well written, commented and follows syntax.

Copy link
Collaborator

@Winterhart Winterhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job removing the old Class UploadDocument.java

@MewtR
Copy link
Collaborator

MewtR commented Apr 3, 2017

I'lll need to make a quick change to discussionTest to get travis to approve

Mohamed Lemine and others added 3 commits April 2, 2017 21:45
@kgehmlich
Copy link
Owner Author

Committed suggested changes (typo fix, etc.).

I am not done reviewing it. But should I be able to download the uploads? There does not seem to be any code in ViewDocumentsFragment that will allow the user to download the documents in that class.

No download has been implemented yet, that's next on the roster.

@iamlax iamlax added the task label Apr 17, 2017
@iamlax iamlax added this to the Sprint 5 milestone Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants