url link for lesson sample data#1302
Open
sumandari wants to merge 3 commits into
Open
Conversation
c3f74e6 to
5d9a273
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1302 +/- ##
===========================================
+ Coverage 63.19% 63.21% +0.02%
===========================================
Files 177 177
Lines 9338 9350 +12
Branches 706 707 +1
===========================================
+ Hits 5901 5911 +10
- Misses 3213 3214 +1
- Partials 224 225 +1
Continue to review full report at Codecov.
|
dimasciput
approved these changes
Aug 8, 2021
dimasciput
reviewed
Aug 8, 2021
| """Download sample data.""" | ||
|
|
||
| def get(self, request, *args, **kwargs): | ||
| numbering = self.request.GET.get('q', '') |
Member
There was a problem hiding this comment.
can you get this version number from the project model? so you don't need to pass this variable to view because it seems redundant.
Contributor
Author
There was a problem hiding this comment.
The numbering is not saved in the model instance.
It's coming from dynamic forloop in the template.
and the numbering might be different between author and normal user, since the author have view in draft (unpublished) worksheet, but the normal users don't.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refers to #1291.
It provides neater link for download external_data file
/<project_slug>/sample/<worksheet id>?q=<module number>The url cannot use module number as an argument (as mentioned in the ticket), since the module number is not retrieved from the model.
The pdf output name is using project and module number as the filename.