Skip to content

Instantly share code, notes, and snippets.

@anchetaWern
Last active November 22, 2015 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anchetaWern/f12ee588f20ad5c00cf6 to your computer and use it in GitHub Desktop.
Save anchetaWern/f12ee588f20ad5c00cf6 to your computer and use it in GitHub Desktop.
FileRequester

#FileRequester

Create an app that would allow the user to request files from users. There are 3 types of users: admin, teacher and student

the admin is responsible for:

  • creating teacher accounts
  • creating students

the teacher is responsible for:

  • creating a class
  • adding students to a class
  • list classes
  • update a class (update class details, remove or add students)
  • delete a class
  • login with Dropbox
  • request files from a class

the students is responsible for:

  • create their own account
  • submitting requested files

##Admin The admin should have a built-in account in the database (directly add the account details in phpmyadmin or use a database seeder) the admin can then login using that account.

The admin can create accounts for teachers.

Lastly, the admin can create students. He should be able to add the following data for the students: ID number, photo (you need to implement file upload and save the photo in the filesystem and then save the file path in the database), first name, last name, gender, course, year level.

##Teacher First the teacher goes to the admin and asks the admin to create a teacher account. The admin then enters the name, email and a temporary password for the teacher once the account is created the account, the teacher can now login.

The first thing that the teacher needs to do is to login with Dropbox. This will return an access key which could be used by the app to upload files to the users account. This access key should be saved in the database. For every teacher account, there's a different access key.

The teacher can also create a class. The following details are needed to be saved in the database:

  • class name
  • description

Once the teacher has created the class, students can now be added to the class. The teacher can search the students by name, course and year level. When the search button is clicked, all the students that have been returned in the result can be added to the class. But the teacher should also be able to exclude specific students by clicking on a 'remove' button which removes the student from the list of results. Or click an 'add' button to add only specific students from the results. When the 'add to class' button is clicked, the app should add all the students that are currently shown in the results. If at least one student has been marked to be added, it adds that student instead.

Lastly, the teacher can request files from students in a specific class. The page for making requests should ask for the title of the request, a description, the deadline (date & time in which students can submit files without deduction to the score that they will get), the file size limit, the mime types that are allowed, and the class to which the teacher is requesting from. A new folder is created on the teachers Dropbox for every file request that's created. The teacher can then see the file requests that he/she has made. There should be a link that would lead to a page where the teacher can see who already submitted the files and who did not. Deductions (if any) should be shown as well (see Student section for more details on deductions). Results can also be filtered to only show those who submitted or only those who didn't.

##Student

Students can create their own account by means of signing up with their ID number, name, email and password. The account created with this method should be disabled by default. It will only be enabled once the student clicks on the verification link that was sent to the email that they used.

Once logged in, the student should see a list of file requests that hasn't reached their deadline yet. It should also show if the student has already submitted the file that was requested. The results can also be filtered to only show file requests that hasn't been submitted by the student yet. To submit a file, the student clicks on the file request. The app would then ask the student to upload the file. The file should comply with the file size limit and mime types, otherwise it shouldn't be uploaded. Once the file is uploaded, the file request for that specific student should be marked as submitted. This allows the student to see if he/she has already submitted the file before. At any time the student wants to revise his/her work, a new file can be uploaded. This should delete the file/s that was previously uploaded. Note that files shouldn't stay on the server. The files should first be uploaded to the server and then uploaded to Dropbox using the Dropbox API (See Additional Details section). Then its immediately deleted once it has been uploaded to Dropbox and all the details has been saved to the database.

There should also be a page that shows file requests that has already met their deadline for a maximum of 2 weeks. Any student who submits their work at this point would have a deduction of 2 points every day after the deadline until it reaches 5 days (10 points deducted). Students can still submit their work after 5 days and 10 points will be deducted. Once it reaches 2 weeks after the deadline, the student should no longer be able to submit their work. Here are some examples:

  • submits on: nov 3, 2015 9am -> 1 point is deducted
  • submits on: nov 4, 5pm -> 2 points is deducted
  • submits on nov 7, 1pm -> 10 points is deducted
  • submits on nov 7 to nov 17, 11:59pm -> 10 points is deducted
  • submits on nov 18 -> nah ah..

There should also be a page which lists out all the file requests which are already past their grace period (2 weeks after the deadline). Each file request should also show if the student was able to submit the files or not.

##Rules & Guidelines

  • Use git to track the changes made to your project. Every member should have their own Github account and the username should be set to their first name and last name (e.g. YohAsakura).
  • Use Github to upload your project. Progress will be checked every week, so there should be a commit uploaded on Github at least once a week.
  • You can use any front-end framework (bootstrap, foundation) to ease the work you need to do with styling the project.
  • Use the Laravel framework to implement the project.
  • You can use any JavaScript or PHP library that can help you to easily implement specific features such as file upload.
  • For each member of the group, provide a list of things done in the project.
  • Project documentation:
    • Brief summary of what the project does
    • Features
    • Database (brief description of the tables and columns used and how are they connected to each other)
    • Libraries used
    • How to use the system
  • The project will be presented by each group.

##Additional Details

When working with Dropbox, you first have to create an app on the Dropbox Developer Website. This would provide you with an app key and app secret which you could use to make requests to the Dropbox API.

You can use the following libraries to upload files to dropbox:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment