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

Refactor lti passback code #588

Merged
merged 18 commits into from Oct 17, 2018

Conversation

Projects
None yet
2 participants
@libre-man
Copy link
Collaborator

commented Oct 13, 2018

Description

Refactor the entire code used for lti passback. This is now mostly our code, and
doesn't depend on lxml anymore. The code is now also actually tested. This
also make it easier to add other LMSsen. Finally this disables the initial
grade passback for canvas starts using the submission details option so that the
hand in date is exactly the same time as in CodeGrade.

This still needs manual testing with an actual canvas instance.

Refactor lti passback coccde
Refactor the entire code used for lti passback. This is now mostly our code, and
doesn't depend on ``lxml`` anymore. The code is now also actually tested. This
also make it easier to add other LMSsen. Finally this disables the initial
grade passback for canvas starts using the submission details option so that the
hand in date is exactly the same time as in CodeGrade.

@libre-man libre-man changed the title Refactor lti passback coccde Refactor lti passback code Oct 13, 2018

libre-man added some commits Oct 13, 2018

@ghost ghost assigned libre-man Oct 13, 2018

@ghost ghost added the in progress label Oct 13, 2018

@codecov

This comment has been minimized.

Copy link

commented Oct 13, 2018

Codecov Report

Merging #588 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #588      +/-   ##
==========================================
+ Coverage   99.28%   99.33%   +0.04%     
==========================================
  Files          37       37              
  Lines        4332     4491     +159     
==========================================
+ Hits         4301     4461     +160     
+ Misses         31       30       -1
Impacted Files Coverage Δ
psef/__init__.py 100% <ø> (ø) ⬆️
psef/models.py 99.6% <100%> (ø) ⬆️
psef/lti.py 100% <100%> (+0.41%) ⬆️
psef/linters.py 100% <100%> (ø) ⬆️
psef/tasks.py 100% <100%> (ø) ⬆️
psef/v1/lti.py 100% <100%> (ø) ⬆️
psef/exceptions.py 100% <100%> (ø) ⬆️
psef/v1/assignments.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb8d287...e241803. Read the comment docs.

libre-man added some commits Oct 14, 2018

@olmokramer
Copy link
Collaborator

left a comment

This is great! The code looks much nicer. I spotted one change I think is unintentional, and the tests still fail on travis.

@@ -1,21 +1,30 @@
# SPDX-License-Identifier: AGPL-3.0-only
#class SPDX-License-Identifier: AGPL-3.0-only

This comment has been minimized.

Copy link
@olmokramer

olmokramer Oct 14, 2018

Collaborator

Is this change intentional?

This comment has been minimized.

Copy link
@libre-man

libre-man Oct 14, 2018

Author Collaborator

Nope, will change

libre-man and others added some commits Oct 14, 2018

@ghost ghost assigned olmokramer Oct 15, 2018

libre-man added some commits Oct 15, 2018

@olmokramer olmokramer merged commit d2564a4 into master Oct 17, 2018

8 checks passed

codeclimate 4 fixed issues
Details
codeclimate/diff-coverage 100% (50% threshold)
Details
codeclimate/total-coverage 19% (0.0% change)
Details
codecov/patch 100% of diff hit (target 99.28%)
Details
codecov/project 99.33% (+0.04%) compared to eb8d287
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.05%) to 99.332%
Details
pyup.io/safety-ci No dependencies with known security vulnerabilities.
Details

@olmokramer olmokramer deleted the feature/reduce-lti-code branch Oct 17, 2018

@ghost ghost removed the in progress label Oct 17, 2018

@libre-man libre-man referenced this pull request Oct 20, 2018

Closed

Refactor copied LTI code #36

olmokramer added a commit that referenced this pull request Oct 30, 2018

Merge pull request #653 from CodeGra-de/master
## Description
Release the stable release 'HereBeMonsters' (aka the glorious and infamous version `H`). This release adds:

### Major changes
- Add Plagiarism checkers (#486) (#513) (#536) (#555) (#508) (#556) (#645) (#576)
  It is now possible to check for plagiarism in CodeGrade. This enables privacy aware plagiarism checking. It is possible to use check against old CodeGrade assignment and upload base code and old submissions that are not in CodeGrade. For more information see our documentation.

- Make it possible give grades higher than ten (#500)
  Teachers can now indicate that students can receive a grader higher than 10 for an assignment, making it possible to create assignments with bonus points in CodeGrade. When using within LTI this requires a new LTI parameter.
  
  You should add the following to the `<blti:custom>` section of your canvas LTI config for CodeGrade:

  ```xml
  <lticm:property name="custom_canvas_points_possible">
    $Canvas.assignment.pointsPossible
  </lticm:property>
  ```
  

### Minor changes
- Change homepage to login screen (#480) (#496) (#501) (#557) (#616)
  The homepage has been improved to show all your courses and assignments at a glance when logged in.
- Allow .tar.xz archives to be uploaded (#492)
  This further improves the flexibility CodeGrade gives students when handing in submissions.
- Fix infinite loop overview mode (#477)
  In some combinations of permissions loading the overview mode resulted in an infinite loader.
- Add general feedback tab to overview mode (#523)
  This further decreases the chance that students will miss any of their feedback.
- Fix broken matchFiles function (#528) (#550)
  This fixes a bug that files changed inside a directory would not show up in the overview mode.
- Improve speed of diffing by using another library (#529)
  Viewer the diff between two large files is a lot faster!
- Remove the option to automatically generate keys (#554)
  It is no longer possible to generate the `secret_key` or `lti_secret_key` configuration options. Please update your config accordingly.
- Rewrite snippets manager (#551)
  This rewrite should make creating, using, deleting and updating snippets faster and more reliable.
- Drastically improve the experience of CodeGrade on mobile (#558)
  It is now way easier to use CodeGrade on mobile.
- Filter users in the user selector (#553)
  When selecting users (when uploading for others, or adding to courses) only show users will be shown that can be selected.
- Improve handling of LTI (#561) (#588)
  A complete rewrite of LTI backend handling. This should improve the stability of passbacks by a lot. This also guarantees that the submission date in Canvas and CodeGrade will match exactly.
  
  This also adds a new convenience route `/api/v1/lti/?lms=Canvas` to get lti config for the given LMS (Canvas only supported at the moment).
- Add items to the sidebar conditionally (#578) (#580) (#600)
  Depending on what page you are you will get extra items in the sidebar to help quick navigation. Currently plagiarism cases and submissions are added depending on the page.
- Start caching submissions (#643) (#636)
  Submissions are cached in the front-end so changing between the codeviewer and submissions list is now way quicker.
- Ensure all rubric rows have a maximum amount of >= 0 points (#579)
  It is no longer allowed to have rows in a rubric where the maximum possible score is < 0. If you needed this to create rubrics with bonus categories simply use the 'Max points' option in the rubric editor. All existing rubrics are not changed.


### Small changes and bugfixes
- Use new logos (#481) (#506)
  This updates our logo to the newest and greatest version!
- Various small bugs in the sidebar
- Add a minimum duration on the permission manager loaders (#521)
  This makes it clearer that permissions are actually updated.
- Throw an API error when a rubric row contains an empty header (#535)
  This is a backwards incompatible API change, however it doesn't change anything for the frontend.
- Fix horizontal overflow on codeviewer (#518)
  The codeviewer would sometimes overflow creating a vertical scrollbar when displaying files containing a large amount of consecutive tabs.
- Check if an assignment is loaded before getting its course (#549)
  In some rare cases LTI launches would fail be cause assignments were not loaded correctly.
- Add structured logging setup (#546)
  This makes it easier to follow requests and debug issues.
- Fix general feedback line wrapping (#570)
  Giving long lines as general feedback should be displayed correctly to the user now.
- Add manage assignment button to submission list (#574)
  It is now possible to easily navigate to the manage assignment page from the submissions list.
- Start using enum to store permissions in the backend (#571)
  Most routes will be faster by this design change.
- Improve filetree design (#599) (#611)  (#587)
  It is now easier to spot additions, changes and deletion directly in the filetree.
- Add ``<noscript>`` tag (#613)
  An error message will be displayed when javascript is disabled.
- Improve speed of filetree operations (#623)
  Loading large filetrees is now way quicker by using smarter data-structures.
- Add health route (#593)
  It is now possible to more easily monitor the health of your CodeGrade instance.
- Fix fontSize & contextAmount on submission page (#633)
  Sometimes the fields would show up empty, this shouldn't happen anymore!
- Replace submitted symlinks with actual files (#627)
  When a student uploads an archive with symlinks the student is warned and all symlinks are replaced by files explaining that the original files were symlinks but that those are not supported by CodeGrade.
- Fix grade history popover boundary (#625)
  The grade history would sometimes show up outside the screen, but no more!
- Make it impossible to submit empty archives (#622)
  A error is shown when a student tries to submit an archive without files.
- Show toast when local-storage doesn't work (#607)
  When a user has no local-storage available a warning is shown so the user knows that their experience might be sub-optimal.
- Show author of general feedback and line comments (#564) (#605)
  The author of all general feedback and line comments is displayed to the user. Only users with the `can_see_assignee` permission will see authors.
- Justify description popover text (#596)
  The text in descriptions is now justified and their popups will only show when the 'i' is clicked.
- Only submit rubric items or normal grade (#589)
  In some rare cases overriding rubrics would result in a race condition, resulting in wrong case.
- Redesign the download popover on the submission page (#595)
  This new design looks way better, but you tell us!
- Only show overview mode when you have permission to see feedback (#563)
  When you don't have permission to see feedback the overview mode will never be shown.
- Various other performance improvements (#566)
  We always strive for the best performance possible, and again in this release we increased the performance of CodeGrade! 🎉
- Make sure codeviewer is full width on medium pages (#591)
  This makes it easier to review and display code on smaller screens.
- Use custom font in toasted actions (#614)
  It is now always possible to close toasts, even when your font cannot display '✖'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.