Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

New drafts not submitted unless filename is changed #57

Open
pauln opened this issue Nov 17, 2014 · 1 comment
Open

New drafts not submitted unless filename is changed #57

pauln opened this issue Nov 17, 2014 · 1 comment

Comments

@pauln
Copy link
Contributor

pauln commented Nov 17, 2014

The problem

Files are identified purely by pathname hash, and only submitted to TII once per pathname hash. This means that if an assignment is set to send drafts to TII, there's no guarantee that the final submission (or any given draft, for that matter) will actually be sent to TII.

Example scenario

  1. Student A uploads first draft: "my_assignment.docx"; this file is sent to TII and processed
  2. Student A uploads second draft: "my_assignment_draft_2.docx"; this file is sent to TII and processed
  3. Student A uploads final copy: "my_assignment.docx"; this file is NOT sent to TII, as its pathname hash already exists in mdl_plagiarism_turnitin_files with a success status and similarity score
  4. Student A's similarity score (including link to report) is shown for the first draft (instead of the final submission)

Possible solution

Given that files are retrieved using pathname hash (and content hashes aren't unique to the file record), this would probably require the addition of a new field in the mdl_plagiarism_turnitin_files table to track the content hash; the turnitin_send_file function would then compare the content hash of the stored_file passed to it against the one stored in its record, resetting its status and submitting the updated file if they differ. Alternatively, if it's desired to maintain a record of each individual file sent to TII, the check for an existing record could be adjusted to check for matching pathname and content hashes, with a new record being inserted if the content hash has changed.

@danmarsden
Copy link
Owner

Thanks Paul - I think you're right, we should store both contenthash and pathnamehash in the table - I've thought about adding that previously but never got round to it. It would be interesting to see if the new turnitintool2 plugin deals with this any better too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants