Giter Club home page Giter Club logo

vmgui's Issues

add a requirements.txt

This file contains all the python dependencies needed to run the current project.
You can create one with

$ pip freeze > requirements.txt

To install the deps needed after you clone the project, you run:

$ pip install 

It is very important when starting an app to create a requirements.txt file and to maintain it, whenever a new lib is added, it must be added to the requirements file.

Assignment Model

Assignment
- subject_id
- name
- text (html) - markdown
- attachments (URLs uploaded somewhere else, for example skeleton starting point, example inputs, etc.)
- deadline

  • FARA zile de vacanta sau alte complicatii
  • FARA depunctari momentan

Transfer ownership of the repo to vmchecker

Move this aismail/vmgui to vmchecker/vmchecker-ui

  • - Add aismail to vmchecker-ui-admins
  • - Grant commit access to everyone involved
  • - Move repo
  • - Update test server
  • - ???
  • - Profit!

What's gunicorn?

@bogdanbresug What's gunicorn? A fancy of web server.

Let's not put questions in commit messages. Instead let's add an issue with the question tag and people will answer it.

SubmissionComment Model

SubmissionComments:
- submission_id
- filename (optional)
- line_no (optional)
- comment_no
- comment (sanitized html)

Defining dynamic fields in the DB

Is is possible for the teacher to define extra fields for a submission?

Example:

The teacher wants to know how much time a student worked on a homework.
The teacher sets up the assignment, and mentions that he wants to get the number of hours.
When submitting, the student will be required to enter the number of hours.

Note:

This is low priority. Just something to think about, 
and maybe plan for towards the end of the project.

Endpoint for Subjects

Needed:

  • get all subjects (for their names, on the dashboard page)
  • get a subject by ID (for the subject full page view)

make deploy syncdb and install packets

When deploy-ing, extra steps to be taken:

  • additional stuff added to requirements.txt should be installed
  • the gunicorn server should be restarted
  • syncdb not interactive should be done, to redo the extra tables created.
  • an initial dump of data should exist in repo, and be loaded in DB

Location of uploaded files

Currently, files uploaded via a submission go to the vmchecker/vmc_backend/files/ which is kind of a hidden location. Should we change it or leave it like that?

Check every file to be pep 8 valid

There are files that do not pass pep 8 validation. We should write valid code, right?
You can either use pep8 command from cli or use pep8 plugin for vim.
Do you think it would be a good idea to create an issue for every file so we can track easier the process?

Keeping data for multiple school years

We have to keep in mind that the DB should be kept across several years.
If last year's student checks vmchecker, he should see all of last year's assignments and submission. However, these should not be visible for this year's students (or could be visible, but separated). Should we add a school_year field to the AssignmentModel?
Feel free to comment on the idea.

The comment_count and comment_no are not necessary

You could get this from the number of comments that reference the Submission.
Remove the comment_count field, and add related_name='comments' to submission_id = models.ForeignKey(Submission)
Remove comment_no = models.IntegerField() as it's also not needed

You can then retrieve the number of comments by using submission.comments.all().count()

Factories for the models

I created some factories for the models that generate some random entries and I want someone to check them. I was also not sure how to generate a random file for this field inside the SubmissionModel:

content = models.FileField(upload_to='vmc_backend/files')

Thank you. :)

Submission Model

Submission
- student_id
- assignment_id
- uploaded_at
- graded (true/false)
- comment_count (a-la-github)
- content

Subject Model

Subjects
- name
- description
- link
- contact_person_email

Submissions could have multiple types

In the former implementation of vmchecker's UI, a submission could have multiple types. For example, it's usually a zip archive, but it could also be the md5 hash of a VERY large archive, that would be uploaded later on.
This is a MUST HAVE feature for v1.0 of the new UI.

Endpoint for Submissions

  • create a Submission via POST (this will be probably the only case where we need to POST data to the application from the JS dashboard, other editing/creating cases will be handled from the Django admin directly)
  • get submissions of a student for a given assignment (needed on the assignment full page view, to display the submissions of the student for that assignment next to the assignment itself)

UsersToSubjects M2M mapping

UsersToSubjects:
- subject_id
- user_id
- role (user can be teacher for one course, student for another)
- UNIQUE_TOGETHER(subject_id, user_id)

Draw some ugly boxes with the designed pages

  1. Dashboard - view subjects + your role in them + link to courses
    • SELECT * FROM UsersToSubjects WHERE user_id = :user_id
    • GET /api/v1/subjects/?user_id={{user_id}}
    • DashboardController + Subject Widget
  2. View an individual subject:
    • SELECT * FROM Subjects WHERE id = :id
    • SELECT * FROM Assignments WHERE subject_id = :id
    • GET /api/v1/subjects/:id
    • GET /api/v1/assignments/?subject_id=:id
    • SubjectController + SubjectWidget (description, etc.) + AssignmentWidget (cu link spre assignment)
      Obs: editare de assignments facem din Django Admin pt. inceput
  3. View an individual assignment:
    • SELECT * FROM Assignments WHERE id = :id
    • SELECT * FROM Submission WHERE assignment_id = :id and student_id = :current_user_id
    • GET /api/v1/assignments/:id
    • GET /api/v1/submissions/?assignment_id=:id
    • POST /api/v1/submissions/:id/download (gimme the tarball nigga)
    • AssignmentController + FullAssignmentWidget + SubmissionWidget + DownloadSubmissionWidget

Endpoint for Assignments

  • get assignments by subject id (for subject full page view)
  • get assignment by id (for assignment full page view)
  • tests

Get Homeworks by Subject id

1st test case

create 2 subjects, 3 homeworks linked to the 2 subjects
perform API call
test that the expected homeworks are present.

2nd test case

create 2 subjects, 1 homework linked to 1 subject
perform API call filtered by subject_id
test that there are no results returned

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.