<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nlgrant</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nlgrant"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Nlgrant"/>
	<updated>2026-05-29T17:43:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108819</id>
		<title>CSC/ECE 517 Spring 2016/E1738 Integrate Simicheck Web Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108819"/>
		<updated>2017-04-30T03:59:10Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: /* Automated Testing within Rails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team BEND - Bradford Ingersoll, Erika Eill, Nephi Grant, David Gutierrez&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Given that submissions to Expertiza are digital in nature, the opportunity exists to utilize tools that automate plagiarism validation. One of these such tools is called [https://simicheck.com/simicheck/static/swagger-ui/dist/index.html SimiCheck]. SimiCheck has a web service API that can be used to compare documents and check them for plagiarism. The goal of this project is to integrate the SimiCheck API into Expertiza in order to allow for an automated plagiarism check to take place once a submission is closed. .&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
This project has been worked on before in previous semesters. The completed code from previous projects did not clearly demonstrate successful integration with SimiCheck from Expertiza, and was not deemed production worthy. Based on this feedback, we started our development from scratch and utilized the previous project as a resource for lessons learned.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Create a scheduled background task that starts a configurable amount of time after the due date of an assignment has passed&lt;br /&gt;
* The scheduled task should do the following:&lt;br /&gt;
** Fetch the submission content using links provided by the student in Expertiza from only these sources:&lt;br /&gt;
*** External website or MediaWiki&lt;br /&gt;
**** GET request to the URL then strip HTML from the content&lt;br /&gt;
*** Google Doc (not sheet or slides)&lt;br /&gt;
**** Google Drive API&lt;br /&gt;
*** GitHub project (not pull requests)&lt;br /&gt;
**** GitHub API, will only use the student or group’s changes&lt;br /&gt;
** Categorize the submission content as either a text submission or source code&lt;br /&gt;
** Convert the submission content to raw text format to facilitate comparison&lt;br /&gt;
** Use the SimiCheck API to check similarity among the assignment’s submissions&lt;br /&gt;
*** Notify the instructor that a comparison has started&lt;br /&gt;
*** Send the content of the submissions for each submission category&lt;br /&gt;
**** We will experiment with how many documents to send at a time&lt;br /&gt;
**** Note that each file is limited in size to 1 MB by SimiCheck&lt;br /&gt;
*** Wait for the SimiCheck comparison process to complete&lt;br /&gt;
**** We will provide SimiCheck with a callback URL to notify when the comparison is complete, however if this doesn’t work well will revert to polling&lt;br /&gt;
**** We will also provide an “Update Status” link to manually poll comparison status &lt;br /&gt;
*** Notify the assignment’s instructor that a comparison has been completed&lt;br /&gt;
* Visualize the results in report&lt;br /&gt;
** We will edit view/review_mapping/response_report.html.haml to include a new PlagiarismCheckerReport type and point to the plagiarism_checker_report partial.&lt;br /&gt;
** Since SimiCheck has already implemented file diffs, links will be provided in the Expertiza view that lead to the SimiCheck website for each file combination&lt;br /&gt;
** Comparison results for each category will be displayed within Expertiza in a table&lt;br /&gt;
*** Each row is a file combination with similiarity, file names, team names, and diff link&lt;br /&gt;
*** Sorted in descending similarity&lt;br /&gt;
*** Uses available data from the SimiCheck API’s summary report&lt;br /&gt;
&lt;br /&gt;
== Expertiza Modifications ==&lt;br /&gt;
The majority of the updates are handled in new background tasks. Therefore, there weren't many modifications to existing Expertiza files. The current New Assignment interface has two new configuration parameters, which have also been added to the Assignment model. SimiCheck Delay (hours) and SimiCheck Similarity Threshold (percentage) were added. The Plagiarism Comparison Report was added to the &amp;quot;Review Report&amp;quot; interface's select box for a selected assignment.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Pattern(s) ===&lt;br /&gt;
Given that this project revolves around integration with several web services, our team is planning to follow the [https://en.wikipedia.org/wiki/Facade_pattern facade design pattern] to allow Expertiza to make REST requests to several APIs include SimiCheck, GitHub, Google Drive, etc. This pattern is commonly used to abstract complex functionalities into a simpler interface for use as well as encapsulate API changes to prevent having to update application code if the service changes or a different one is used. We feel this is appropriate based on the requirements because we can create an easy-to-use interface within Expertiza that hides the actual API integration behind the scenes. With this in place, current and future Expertiza developers can use our simplified functionality without needing to understand the miniscule details of the API’s operation.&lt;br /&gt;
&lt;br /&gt;
=== Model(s) ===&lt;br /&gt;
''There is no need to store the raw content sent to SimiCheck.&lt;br /&gt;
&lt;br /&gt;
==== Assignment - SimiCheck delay and threshold added ====&lt;br /&gt;
We added &amp;quot;simicheck&amp;quot; and &amp;quot;simicheck_threshold&amp;quot; properties to the the existing Assignment model. &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;simicheck&amp;quot; property accommodates the number of hours to delay the execution of the Plagiarism Checker after the assignment's due date. &amp;quot;simicheck&amp;quot; is -1 if there is no Plagiarism Checker scheduled, and between 0 and 100 (hours) if the assignment is to have a Plagiarism Checker Report.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;simicheck_threshold&amp;quot; property is a percentage that filters the Plagiarism Checker's Similarity results. The threshold refers to the percentage of text that is the same between two documents.&lt;br /&gt;
&lt;br /&gt;
==== PlagiarismCheckerComparison ====&lt;br /&gt;
This model '''belongs_to''' the PlagiarismCheckerAssignmentSubmission model.  It stores the file IDs returned from SimiCheck, the percent similarity between them, the Team IDs, and a URL to a detailed comparison (diff).&lt;br /&gt;
&lt;br /&gt;
==== PlagiarismCheckerAssignmentSubmission ====&lt;br /&gt;
This model '''has_many''' PlagiarismCheckerComparison models.  It represents the results of the comparison among submissions for the assignment.  As such it will contain all of the relevant fields that are shown in the view as described in the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Diagrams ===&lt;br /&gt;
Typical overall system operation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Simicheck_API_-_SimiCheck.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Class heirarchy in the fetchers:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:SimiCheck_Fetchers.png]]&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
The current assignment configuration UI has been modified to contain 2 new select boxes. These select boxes determine how long to delay the Plagiarism Checker after an assignment's due date, and on what similarity percent to filter the Plagiarism Checker Comparison results.  &lt;br /&gt;
&lt;br /&gt;
After the results have been aggregated they can be viewed in a results report page. This report includes the submission names, the responsible teams, the similarity percentage, and a link to view the similarity results. The Plagiarism Checker Report UI looks similar to this:&lt;br /&gt;
&lt;br /&gt;
[[File:SimiCheck_View_Mockup.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To view the interface changes, login to Expertiza as an instructor; navigate to Manage... Assignments. Click &amp;quot;New public/private assignment&amp;quot;. The last two fields on the New Assignment page say &amp;quot;SimiCheck  Delay&amp;quot; and &amp;quot;SimiCheck Similarity Threshold&amp;quot;. In &amp;quot;SimiCheck Delay&amp;quot;, select a value between 0 and 100 to enable the Plagiarism Checker. In &amp;quot;SimiCheck Similarity Threshold&amp;quot;, select a percentage value to filter the Plagiarism Checker Comparison results. The percentage refers to the percent of same text between two documents. &lt;br /&gt;
&lt;br /&gt;
After the assignment ends and the delay period has passed, you can view the Plagiarism Report. Click the &amp;quot;View review report&amp;quot; icon containing a magnifying glass and two people (in the third row of per-assignment icons). Select &amp;quot;Plagiarism Checker Report&amp;quot; from the select box, and click &amp;quot;Submit&amp;quot;. If there is any plagiarism to report, it will load.&lt;br /&gt;
&lt;br /&gt;
=== Task Triggering ===&lt;br /&gt;
In Expertiza there already existed functionality to schedule or queue tasks for the task system. We have hooked into that system by adding a new task type declared as &amp;quot;compare_files_with_simicheck&amp;quot; and then providing the correct date/time configuration. When a task deadline occurs, there is a method that invokes logic based on the task type. Once this task type is detected on a scheduled task, the SimiCheck comparison is initiated.&lt;br /&gt;
&lt;br /&gt;
=== Code Sample ===&lt;br /&gt;
====Scheduled task expires, hook is called====&lt;br /&gt;
The following code was added to app/mailers/delayed_mailer.rb/perform:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  if (self.deadline_type == &amp;quot;compare_files_with_simicheck&amp;quot;)&lt;br /&gt;
    perform_simicheck_comparisons(self.assignment_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
=== Automated Testing within Rails ===&lt;br /&gt;
We wrote unit tests for the new functionality that we implemented, this included models, helpers, SimiCheck logic etc.. In order to properly unit test we mocked all interfaces and black box tested the new functionality. Our test cases can be found in the following locations:&lt;br /&gt;
*spec/models/website_fetcher_spec.rb&lt;br /&gt;
*spec/models/google_doc_fetcher_spec.rb&lt;br /&gt;
*spec/models/http_request_spec.rb&lt;br /&gt;
*spec/models/plagiarism_checker_assignment_submission_spec.rb&lt;br /&gt;
*spec/models/plagiarism_checker_comparison_spec.rb&lt;br /&gt;
*spec/models/simicheck_webservice_spec.rb&lt;br /&gt;
*spec/models/submission_content_fetcher_spec.rb&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108814</id>
		<title>CSC/ECE 517 Spring 2016/E1738 Integrate Simicheck Web Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108814"/>
		<updated>2017-04-30T03:48:48Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: /* Testing Strategy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team BEND - Bradford Ingersoll, Erika Eill, Nephi Grant, David Gutierrez&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Given that submissions to Expertiza are digital in nature, the opportunity exists to utilize tools that automate plagiarism validation. One of these such tools is called [https://simicheck.com/simicheck/static/swagger-ui/dist/index.html SimiCheck]. SimiCheck has a web service API that can be used to compare documents and check them for plagiarism. The goal of this project is to integrate the SimiCheck API into Expertiza in order to allow for an automated plagiarism check to take place once a submission is closed. .&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
This project has been worked on before in previous semesters. The completed code from previous projects did not clearly demonstrate successful integration with SimiCheck from Expertiza, and was not deemed production worthy. Based on this feedback, we started our development from scratch and utilized the previous project as a resource for lessons learned.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Create a scheduled background task that starts a configurable amount of time after the due date of an assignment has passed&lt;br /&gt;
* The scheduled task should do the following:&lt;br /&gt;
** Fetch the submission content using links provided by the student in Expertiza from only these sources:&lt;br /&gt;
*** External website or MediaWiki&lt;br /&gt;
**** GET request to the URL then strip HTML from the content&lt;br /&gt;
*** Google Doc (not sheet or slides)&lt;br /&gt;
**** Google Drive API&lt;br /&gt;
*** GitHub project (not pull requests)&lt;br /&gt;
**** GitHub API, will only use the student or group’s changes&lt;br /&gt;
** Categorize the submission content as either a text submission or source code&lt;br /&gt;
** Convert the submission content to raw text format to facilitate comparison&lt;br /&gt;
** Use the SimiCheck API to check similarity among the assignment’s submissions&lt;br /&gt;
*** Notify the instructor that a comparison has started&lt;br /&gt;
*** Send the content of the submissions for each submission category&lt;br /&gt;
**** We will experiment with how many documents to send at a time&lt;br /&gt;
**** Note that each file is limited in size to 1 MB by SimiCheck&lt;br /&gt;
*** Wait for the SimiCheck comparison process to complete&lt;br /&gt;
**** We will provide SimiCheck with a callback URL to notify when the comparison is complete, however if this doesn’t work well will revert to polling&lt;br /&gt;
**** We will also provide an “Update Status” link to manually poll comparison status &lt;br /&gt;
*** Notify the assignment’s instructor that a comparison has been completed&lt;br /&gt;
* Visualize the results in report&lt;br /&gt;
** We will edit view/review_mapping/response_report.html.haml to include a new PlagiarismCheckerReport type and point to the plagiarism_checker_report partial.&lt;br /&gt;
** Since SimiCheck has already implemented file diffs, links will be provided in the Expertiza view that lead to the SimiCheck website for each file combination&lt;br /&gt;
** Comparison results for each category will be displayed within Expertiza in a table&lt;br /&gt;
*** Each row is a file combination with similiarity, file names, team names, and diff link&lt;br /&gt;
*** Sorted in descending similarity&lt;br /&gt;
*** Uses available data from the SimiCheck API’s summary report&lt;br /&gt;
&lt;br /&gt;
== Expertiza Modifications ==&lt;br /&gt;
The majority of the updates are handled in new background tasks. Therefore, there weren't many modifications to existing Expertiza files. The current New Assignment interface has two new configuration parameters, which have also been added to the Assignment model. SimiCheck Delay (hours) and SimiCheck Similarity Threshold (percentage) were added. The Plagiarism Comparison Report was added to the &amp;quot;Review Report&amp;quot; interface's select box for a selected assignment.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Pattern(s) ===&lt;br /&gt;
Given that this project revolves around integration with several web services, our team is planning to follow the [https://en.wikipedia.org/wiki/Facade_pattern facade design pattern] to allow Expertiza to make REST requests to several APIs include SimiCheck, GitHub, Google Drive, etc. This pattern is commonly used to abstract complex functionalities into a simpler interface for use as well as encapsulate API changes to prevent having to update application code if the service changes or a different one is used. We feel this is appropriate based on the requirements because we can create an easy-to-use interface within Expertiza that hides the actual API integration behind the scenes. With this in place, current and future Expertiza developers can use our simplified functionality without needing to understand the miniscule details of the API’s operation.&lt;br /&gt;
&lt;br /&gt;
=== Model(s) ===&lt;br /&gt;
''There is no need to store the raw content sent to SimiCheck.&lt;br /&gt;
&lt;br /&gt;
==== Assignment - SimiCheck delay and threshold added ====&lt;br /&gt;
We added &amp;quot;simicheck&amp;quot; and &amp;quot;simicheck_threshold&amp;quot; properties to the the existing Assignment model. &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;simicheck&amp;quot; property accommodates the number of hours to delay the execution of the Plagiarism Checker after the assignment's due date. &amp;quot;simicheck&amp;quot; is -1 if there is no Plagiarism Checker scheduled, and between 0 and 100 (hours) if the assignment is to have a Plagiarism Checker Report.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;simicheck_threshold&amp;quot; property is a percentage that filters the Plagiarism Checker's Similarity results. The threshold refers to the percentage of text that is the same between two documents.&lt;br /&gt;
&lt;br /&gt;
==== PlagiarismCheckerComparison ====&lt;br /&gt;
This model '''belongs_to''' the PlagiarismCheckerAssignmentSubmission model.  It stores the file IDs returned from SimiCheck, the percent similarity between them, the Team IDs, and a URL to a detailed comparison (diff).&lt;br /&gt;
&lt;br /&gt;
==== PlagiarismCheckerAssignmentSubmission ====&lt;br /&gt;
This model '''has_many''' PlagiarismCheckerComparison models.  It represents the results of the comparison among submissions for the assignment.  As such it will contain all of the relevant fields that are shown in the view as described in the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Diagrams ===&lt;br /&gt;
Typical overall system operation:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Simicheck_API_-_SimiCheck.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Class heirarchy in the fetchers:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:SimiCheck_Fetchers.png]]&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
The current assignment configuration UI has been modified to contain 2 new select boxes. These select boxes determine how long to delay the Plagiarism Checker after an assignment's due date, and on what similarity percent to filter the Plagiarism Checker Comparison results.  &lt;br /&gt;
&lt;br /&gt;
After the results have been aggregated they can be viewed in a results report page. This report includes the submission names, the responsible teams, the similarity percentage, and a link to view the similarity results. The Plagiarism Checker Report UI looks similar to this:&lt;br /&gt;
&lt;br /&gt;
[[File:SimiCheck_View_Mockup.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To view the interface changes, login to Expertiza as an instructor; navigate to Manage... Assignments. Click &amp;quot;New public/private assignment&amp;quot;. The last two fields on the New Assignment page say &amp;quot;SimiCheck  Delay&amp;quot; and &amp;quot;SimiCheck Similarity Threshold&amp;quot;. In &amp;quot;Simicheck Delay&amp;quot;, select a value between 0 and 100 to enable the Plagiarism Checker. In &amp;quot;SimiCheck Similarity Threshold&amp;quot;, select a percentage value to filter the Plagiarism Checker Comparison results. The percentage refers to the percent of same text between two documents. &lt;br /&gt;
&lt;br /&gt;
After the assignment ends and the delay period has passed, you can view the Plagiarism Report. Click the &amp;quot;View review report&amp;quot; icon containing a magnifying glass and two people (in the third row of per-assignment icons). Select &amp;quot;Plagiarism Checker Report&amp;quot; from the select box, and click &amp;quot;Submit&amp;quot;. If there is any plagiarism to report, it will load.&lt;br /&gt;
&lt;br /&gt;
=== Task Triggering ===&lt;br /&gt;
In Expertiza there already existed functionality to schedule or queue tasks for the task system. We have hooked into that system by adding a new task type declared as &amp;quot;compare_files_with_simicheck&amp;quot; and then providing the correct date/time configuration. When a task deadline occurs, there is a method that invokes logic based on the task type. Once this task type is detected on a scheduled task, the SimiCheck comparison is initiated.&lt;br /&gt;
&lt;br /&gt;
=== Code Sample ===&lt;br /&gt;
====Scheduled task expires, hook is called====&lt;br /&gt;
The following code was added to app/mailers/delayed_mailer.rb/perform:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  if (self.deadline_type == &amp;quot;compare_files_with_simicheck&amp;quot;)&lt;br /&gt;
    perform_simicheck_comparisons(self.assignment_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
=== API Testing during Development ===&lt;br /&gt;
API testing can be done outside of our code using applications like [https://www.getpostman.com/ Postman]. We will use this to determine which API calls to use and what our expected output will be. In addition, this will lay the groundwork for testing within Rails for the direct API calls that the Expertiza server will do.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing within Rails ===&lt;br /&gt;
We wrote unit tests for the new functionality that we implemented, this included models, helpers, simicheck logic etc.. In order to properly unit test we mocked all interfaces and black box tested the new functionality. Our test cases can be found in the following locations:&lt;br /&gt;
&amp;lt;br&amp;gt;spec/models/website_fetcher_spec.rb&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108805</id>
		<title>CSC/ECE 517 Spring 2016/E1738 Integrate Simicheck Web Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108805"/>
		<updated>2017-04-30T03:17:17Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: /* Task Triggering */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team BEND - Bradford Ingersoll, Erika Eill, Nephi Grant, David Gutierrez&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Given that submissions to Expertiza are digital in nature, the opportunity exists to utilize tools that automate plagiarism validation. One of these such tools is called [https://simicheck.com/simicheck/static/swagger-ui/dist/index.html SimiCheck]. SimiCheck has a web service API that can be used to compare documents and check them for plagiarism. The goal of this project is to integrate the SimiCheck API into Expertiza in order to allow for an automated plagiarism check to take place once a submission is closed. .&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
This project has been worked on before in previous semesters. The completed code from previous projects did not clearly demonstrate successful integration with SimiCheck from Expertiza, and was not deemed production worthy. Based on this feedback, we started our development from scratch and utilized the previous project as a resource for lessons learned.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Create a scheduled background task that starts a configurable amount of time after the due date of an assignment has passed&lt;br /&gt;
* The scheduled task should do the following:&lt;br /&gt;
** Fetch the submission content using links provided by the student in Expertiza from only these sources:&lt;br /&gt;
*** External website or MediaWiki&lt;br /&gt;
**** GET request to the URL then strip HTML from the content&lt;br /&gt;
*** Google Doc (not sheet or slides)&lt;br /&gt;
**** Google Drive API&lt;br /&gt;
*** GitHub project (not pull requests)&lt;br /&gt;
**** GitHub API, will only use the student or group’s changes&lt;br /&gt;
** Categorize the submission content as either a text submission or source code&lt;br /&gt;
** Convert the submission content to raw text format to facilitate comparison&lt;br /&gt;
** Use the SimiCheck API to check similarity among the assignment’s submissions&lt;br /&gt;
*** Notify the instructor that a comparison has started&lt;br /&gt;
*** Send the content of the submissions for each submission category&lt;br /&gt;
**** We will experiment with how many documents to send at a time&lt;br /&gt;
**** Note that each file is limited in size to 1 MB by SimiCheck&lt;br /&gt;
*** Wait for the SimiCheck comparison process to complete&lt;br /&gt;
**** We will provide SimiCheck with a callback URL to notify when the comparison is complete, however if this doesn’t work well will revert to polling&lt;br /&gt;
**** We will also provide an “Update Status” link to manually poll comparison status &lt;br /&gt;
*** Notify the assignment’s instructor that a comparison has been completed&lt;br /&gt;
* Visualize the results in report&lt;br /&gt;
** We will edit view/review_mapping/response_report.html.haml to include a new PlagiarismCheckerReport type and point to the plagiarism_checker_report partial.&lt;br /&gt;
** Since SimiCheck has already implemented file diffs, links will be provided in the Expertiza view that lead to the SimiCheck website for each file combination&lt;br /&gt;
** Comparison results for each category will be displayed within Expertiza in a table&lt;br /&gt;
*** Each row is a file combination with similiarity, file names, team names, and diff link&lt;br /&gt;
*** Sorted in descending similarity&lt;br /&gt;
*** Uses available data from the SimiCheck API’s summary report&lt;br /&gt;
&lt;br /&gt;
== Expertiza Modifications ==&lt;br /&gt;
The majority of the updates are handled in new background tasks. Therefore, there weren't many modifications to existing Expertiza files. The current New Assignment interface has two new configuration parameters, which have also been added to the Assignment model. SimiCheck Delay (hours) and SimiCheck Similarity Threshold (percentage) were added. The Plagiarism Comparison Report was added to the &amp;quot;Review Report&amp;quot; interface's select box for a selected assignment.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Pattern(s) ===&lt;br /&gt;
Given that this project revolves around integration with several web services, our team is planning to follow the [https://en.wikipedia.org/wiki/Facade_pattern facade design pattern] to allow Expertiza to make REST requests to several APIs include SimiCheck, GitHub, Google Drive, etc. This pattern is commonly used to abstract complex functionalities into a simpler interface for use as well as encapsulate API changes to prevent having to update application code if the service changes or a different one is used. We feel this is appropriate based on the requirements because we can create an easy-to-use interface within Expertiza that hides the actual API integration behind the scenes. With this in place, current and future Expertiza developers can use our simplified functionality without needing to understand the miniscule details of the API’s operation.&lt;br /&gt;
&lt;br /&gt;
=== Model(s) ===&lt;br /&gt;
''There is no need to store the raw content sent to SimiCheck.&lt;br /&gt;
&lt;br /&gt;
==== Assignment - SimiCheck delay and threshold added ====&lt;br /&gt;
We added &amp;quot;simicheck&amp;quot; and &amp;quot;simicheck_threshold&amp;quot; properties to the the existing Assignment model. &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;simicheck&amp;quot; property accommodates the number of hours to delay the execution of the Plagiarism Checker after the assignment's due date. &amp;quot;simicheck&amp;quot; is -1 if there is no Plagiarism Checker scheduled, and between 0 and 100 (hours) if the assignment is to have a Plagiarism Checker Report.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;simicheck_threshold&amp;quot; property is a percentage that filters the Plagiarism Checker's Similarity results. The threshold refers to the percentage of text that is the same between two documents.&lt;br /&gt;
&lt;br /&gt;
==== PlagiarismCheckerComparison ====&lt;br /&gt;
This model '''belongs_to''' the PlagiarismCheckerAssignmentSubmission model.  It stores the file IDs returned from SimiCheck, the percent similarity between them, the Team IDs, and a URL to a detailed comparison (diff).&lt;br /&gt;
&lt;br /&gt;
==== PlagiarismCheckerAssignmentSubmission ====&lt;br /&gt;
This model '''has_many''' PlagiarismCheckerComparison models.  It represents the results of the comparison among submissions for the assignment.  As such it will contain all of the relevant fields that are shown in the view as described in the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Diagram ===&lt;br /&gt;
Typical overall system operation is shown here:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Simicheck_API_-_SimiCheck.png]]&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
The current assignment configuration UI has been modified to contain 2 new select boxes. These select boxes determine how long to delay the Plagiarism Checker after an assignment's due date, and on what similarity percent to filter the Plagiarism Checker Comparison results.  &lt;br /&gt;
&lt;br /&gt;
After the results have been aggregated they can be viewed in a results report page. This report includes the submission names, the responsible teams, the similarity percentage, and a link to view the similarity results. The Plagiarism Checker Report UI looks similar to this:&lt;br /&gt;
&lt;br /&gt;
[[File:SimiCheck_View_Mockup.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To view the interface changes, login to Expertiza as an instructor; navigate to Manage... Assignments. Click &amp;quot;New public/private assignment&amp;quot;. The last two fields on the New Assignment page say &amp;quot;SimiCheck  Delay&amp;quot; and &amp;quot;SimiCheck Similarity Threshold&amp;quot;. In &amp;quot;Simicheck Delay&amp;quot;, select a value between 0 and 100 to enable the Plagiarism Checker. In &amp;quot;SimiCheck Similarity Threshold&amp;quot;, select a percentage value to filter the Plagiarism Checker Comparison results. The percentage refers to the percent of same text between two documents. &lt;br /&gt;
&lt;br /&gt;
After the assignment ends and the delay period has passed, you can view the Plagiarism Report. Click the &amp;quot;View review report&amp;quot; icon containing a magnifying glass and two people (in the third row of per-assignment icons). Select &amp;quot;Plagiarism Checker Report&amp;quot; from the select box, and click &amp;quot;Submit&amp;quot;. If there is any plagiarism to report, it will load.&lt;br /&gt;
&lt;br /&gt;
=== Task Triggering ===&lt;br /&gt;
In Expertiza there is already functionality for being able to schedule or queue tasks for the task system. We will be hooking into that system by adding a new task type declared as &amp;quot;compare_files_with_simicheck&amp;quot; and then providing the correct date/time configuration. When a task deadline occurs there is a method that invokes logic based on the task type. Once this task type is detected on a scheduled task, the simicheck comparison is initiated.&lt;br /&gt;
&lt;br /&gt;
=== Code Sample(s) ===&lt;br /&gt;
''Coming soon...''&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
=== API Testing during Development ===&lt;br /&gt;
API testing can be done outside of our code using applications like [https://www.getpostman.com/ Postman]. We will use this to determine which API calls to use and what our expected output will be. In addition, this will lay the groundwork for testing within Rails for the direct API calls that the Expertiza server will do.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing within Rails ===&lt;br /&gt;
We plan on writing unit tests for any controllers and models that we create.  High level testing of the controllers, models, and view together will be done with Capybara. The tests we write will be alongside the existing test framework in Expertiza.&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108592</id>
		<title>CSC/ECE 517 Spring 2016/E1738 Integrate Simicheck Web Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108592"/>
		<updated>2017-04-17T06:30:51Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team BEND - Bradford Ingersoll, Erika Eill, Nephi Grant, David Gutierrez&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Given that submissions to Expertiza are digital in nature, the opportunity exists to utilize tools that automate plagiarism validation. One of these such tools is called SimiCheck. SimiCheck has a web service API that can be used to compare documents and check them for plagiarism. The goal of this project is to integrate the SimiCheck API into Expertiza in order to allow for an automated plagiarism check to take place once a submission is closed. More information on the SimiCheck API can be found [https://simicheck.com/simicheck/static/swagger-ui/dist/index.html here].&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
This project has been worked on before in previous semesters. However, the outcomes from these projects did not clearly demonstrate successful integration with SimiCheck from Expertiza and were not deemed production worthy. As a result, part of our project involves researching the previous submission and learning from it. In addition, based on this feedback so far we have decided to start our development from scratch and utilize the previous project as a resource for lessons learned.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Create a scheduled background task that starts a configurable amount of time after the due date of an assignment has passed&lt;br /&gt;
* The scheduled task should do the following:&lt;br /&gt;
** Fetch the submission content using links provided by the student in Expertiza from only these sources:&lt;br /&gt;
*** External website or MediaWiki&lt;br /&gt;
**** GET request to the URL then strip HTML from the content&lt;br /&gt;
*** Google Doc (not sheet or slides)&lt;br /&gt;
**** Google Drive API&lt;br /&gt;
*** GitHub project (not pull requests)&lt;br /&gt;
**** GitHub API, will only use the student or group’s changes&lt;br /&gt;
** Categorize the submission content as either a text submission or source code&lt;br /&gt;
** Convert the submission content to raw text format to facilitate comparison&lt;br /&gt;
** Use the SimiCheck API to check similarity among the assignment’s submissions&lt;br /&gt;
*** Notify the instructor that a comparison has started&lt;br /&gt;
*** Send the content of the submissions for each submission category&lt;br /&gt;
**** We will experiment with how many documents to send at a time&lt;br /&gt;
**** Note that each file is limited in size to 1 MB by SimiCheck&lt;br /&gt;
*** Wait for the SimiCheck comparison process to complete&lt;br /&gt;
**** We will provide SimiCheck with a callback URL to notify when the comparison is complete, however if this doesn’t work well will revert to polling&lt;br /&gt;
**** Will also provide an “Update Status” link to manually poll comparison status &lt;br /&gt;
*** Notify the assignment’s instructor that a comparison has been completed&lt;br /&gt;
* Visualize the results in report&lt;br /&gt;
** Will create this file:  view/review_mapping/response_report.html.erb&lt;br /&gt;
** Since SimiCheck has already implemented file diffs, links will be provided in the Expertiza view that lead to the SimiCheck website for each file combination&lt;br /&gt;
** Comparison results for each category will be displayed within Expertiza in a table&lt;br /&gt;
*** Each row is a file combination with similiarity, file names, team names, and diff link&lt;br /&gt;
*** Sorted in descending similarity&lt;br /&gt;
*** Uses available data from the SimiCheck API’s summary report&lt;br /&gt;
&lt;br /&gt;
== Expertiza Modifications ==&lt;br /&gt;
Due to the fact that the majority of the updates will be a handled in a new background task, there won't be many modifications to files in Expertiza that currently exist. The current assignment configuration view will need to be expanded to add a configuration parameter and the Assignment model will need to be expanded to include a comparison wait parameter. New links will need to be added to current assignment status view to enable navigation to the new comparison report page.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Pattern(s) ===&lt;br /&gt;
Given that this project revolves around integration with several web services, our team is planning to follow the [https://en.wikipedia.org/wiki/Facade_pattern facade design pattern] to allow Expertiza to make REST requests to several APIs include SimiCheck, GitHub, Google Drive, etc. This pattern is commonly used to abstract complex functionalities into a simpler interface for use as well as encapsulate API changes to prevent having to update application code if the service changes or a different one is used. We feel this is appropriate based on the requirements because we can create an easy-to-use interface within Expertiza that hides the actual API integration behind the scenes. With this in place, current and future Expertiza developers can use our simplified functionality without needing to understand the miniscule details of the API’s operation.&lt;br /&gt;
&lt;br /&gt;
=== Model(s) ===&lt;br /&gt;
''There is no need to store the raw content sent to SimiCheck.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentComparisonWait ====&lt;br /&gt;
This model &amp;quot;belongs_to&amp;quot; the current Assignment model that already exists. It will contain as it's foreign key an assignment as well as a field for how many hours to wait after the assignment due date before executing the comparison task.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparisonResult ====&lt;br /&gt;
This model '''belongs_to''' the AssignmentSubmissionsComparison model.  It stores the file IDs returned from SimiCheck, the percent similarity between them, and a URL to a detailed comparison (diff).&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparison ====&lt;br /&gt;
This model '''has_many''' AssignmentSubmissionsComparisonResult models.  It represents the results of the comparison among submissions for the assignment.  As such it will contain all of the relevant fields that are shown in the view as described in the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Diagram ===&lt;br /&gt;
Typical overall system operation is shown here:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Simicheck_API_-_Page_1.png]]&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
In order to be able to configure how long to wait to run the comparison task the current assignment configuration UI will be modified to contain another field where an integer can be input.&lt;br /&gt;
After the results have been aggregated they will be able to be viewed via a results report page. This report will include the submissions, their corresponding teams, and the similarity results. &amp;lt;br&amp;gt;&lt;br /&gt;
Here is a mock up of our proposed UI:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:SimiCheck_View_Mockup.png]]&lt;br /&gt;
&lt;br /&gt;
=== Task Triggering ===&lt;br /&gt;
The majority of this project is implemented as a background task and as such we can think of it as a separate application or process apart from Expertiza. Ideally this process will be running in another thread to allow for concurrency. We will be exploring during development different options for handling the task with respect to languages and trigger methodologies. For languages we will be exploring Ruby, Python, Node, and potentially others. From a trigger methodology standpoint we will explore both polling and/or event based triggering.&lt;br /&gt;
&lt;br /&gt;
=== Code Sample(s) ===&lt;br /&gt;
''Coming soon...''&lt;br /&gt;
&lt;br /&gt;
=== Potential Hurdles ===&lt;br /&gt;
GiHub has rate limits with respect to how many requests we are allowed to make per auth token per hour. According to GitHub's documentation we are allowed 5000 authenticated requests per hour with an additional 60 requests per hour for unauthenticated requests. This documentation can be found [https://developer.github.com/v3/#rate-limiting here].  Due to the fact that this is a background task and immediate results are not required(will likely be an overnight task), we will ensure that if the need arises to exceed 5000 requests per hour that we will delay the subsequent quests until the next hour. This should satisfy the number of checks that need to occur within a reasonable time frame.&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
=== API Testing during Development ===&lt;br /&gt;
API testing can be done outside of our code using applications like [https://www.getpostman.com/ Postman]. We will use this to determine which API calls to use and what our expected output will be. In addition, this will lay the groundwork for testing within Rails for the direct API calls that the Expertiza server will do.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing within Rails ===&lt;br /&gt;
We plan on writing unit tests for any controllers and models that we create.  High level testing of the controllers, models, and view together will be done with Capybara. The tests we write will be alongside the existing test framework in Expertiza.&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108591</id>
		<title>CSC/ECE 517 Spring 2016/E1738 Integrate Simicheck Web Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108591"/>
		<updated>2017-04-17T06:06:24Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team BEND - Bradford Ingersoll, Erika Eill, Nephi Grant, David Gutierrez&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Given that submissions to Expertiza are digital in nature, the opportunity exists to utilize tools that automate plagiarism validation. One of these such tools is called SimiCheck. SimiCheck has a web service API that can be used to compare documents and check them for plagiarism. The goal of this project is to integrate the SimiCheck API into Expertiza in order to allow for an automated plagiarism check to take place once a submission is closed. More information on the SimiCheck API can be found [https://simicheck.com/simicheck/static/swagger-ui/dist/index.html here].&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
This project has been worked on before in previous semesters. However, the outcomes from these projects did not clearly demonstrate successful integration with SimiCheck from Expertiza and were not deemed production worthy. As a result, part of our project involves researching the previous submission and learning from it. In addition, based on this feedback so far we have decided to start our development from scratch and utilize the previous project as a resource for lessons learned.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Create a scheduled background task that starts a configurable amount of time after the due date of an assignment has passed&lt;br /&gt;
* The scheduled task should do the following:&lt;br /&gt;
** Fetch the submission content using links provided by the student in Expertiza from only these sources:&lt;br /&gt;
*** External website or MediaWiki&lt;br /&gt;
**** GET request to the URL then strip HTML from the content&lt;br /&gt;
*** Google Doc (not sheet or slides)&lt;br /&gt;
**** Google Drive API&lt;br /&gt;
*** GitHub project (not pull requests)&lt;br /&gt;
**** GitHub API, will only use the student or group’s changes&lt;br /&gt;
** Categorize the submission content as either a text submission or source code&lt;br /&gt;
** Convert the submission content to raw text format to facilitate comparison&lt;br /&gt;
** Use the SimiCheck API to check similarity among the assignment’s submissions&lt;br /&gt;
*** Notify the instructor that a comparison has started&lt;br /&gt;
*** Send the content of the submissions for each submission category&lt;br /&gt;
**** We will experiment with how many documents to send at a time&lt;br /&gt;
**** Note that each file is limited in size to 1 MB by SimiCheck&lt;br /&gt;
*** Wait for the SimiCheck comparison process to complete&lt;br /&gt;
**** We will provide SimiCheck with a callback URL to notify when the comparison is complete, however if this doesn’t work well will revert to polling&lt;br /&gt;
**** Will also provide an “Update Status” link to manually poll comparison status &lt;br /&gt;
*** Notify the assignment’s instructor that a comparison has been completed&lt;br /&gt;
* Visualize the results in report&lt;br /&gt;
** Will create this file:  view/review_mapping/response_report.html.erb&lt;br /&gt;
** Since SimiCheck has already implemented file diffs, links will be provided in the Expertiza view that lead to the SimiCheck website for each file combination&lt;br /&gt;
** Comparison results for each category will be displayed within Expertiza in a table&lt;br /&gt;
*** Each row is a file combination with similiarity, file names, team names, and diff link&lt;br /&gt;
*** Sorted in descending similarity&lt;br /&gt;
*** Uses available data from the SimiCheck API’s summary report&lt;br /&gt;
&lt;br /&gt;
== Expertiza Modifications ==&lt;br /&gt;
Due to the fact that the majority of the updates will be a handled in a new background task, there won't be many modifications to files in Expertiza that currently exist. The current assignment configuration view will need to be expanded to add a configuration parameter and the Assignment model will need to be expanded to include a comparison wait parameter. New links will need to be added to current assignment status view to enable navigation to the new comparison report page.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Pattern(s) ===&lt;br /&gt;
Given that this project revolves around integration with several web services, our team is planning to follow the [https://en.wikipedia.org/wiki/Facade_pattern facade design pattern] to allow Expertiza to make REST requests to several APIs include SimiCheck, GitHub, Google Drive, etc. This pattern is commonly used to abstract complex functionalities into a simpler interface for use as well as encapsulate API changes to prevent having to update application code if the service changes or a different one is used. We feel this is appropriate based on the requirements because we can create an easy-to-use interface within Expertiza that hides the actual API integration behind the scenes. With this in place, current and future Expertiza developers can use our simplified functionality without needing to understand the miniscule details of the API’s operation.&lt;br /&gt;
&lt;br /&gt;
=== Model(s) ===&lt;br /&gt;
''There is no need to store the raw content sent to SimiCheck.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentComparisonWait ====&lt;br /&gt;
This model &amp;quot;belongs_to&amp;quot; the current Assignment model that already exists. It will contain as it's foreign key an assignment as well as a field for how many hours to wait after the assignment due date before executing the comparison task.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparisonResult ====&lt;br /&gt;
This model '''belongs_to''' the AssignmentSubmissionsComparison model.  It stores the file IDs returned from SimiCheck, the percent similarity between them, and a URL to a detailed comparison (diff).&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparison ====&lt;br /&gt;
This model '''has_many''' AssignmentSubmissionsComparisonResult models.  It represents the results of the comparison among submissions for the assignment.  As such it will contain all of the relevant fields that are shown in the view as described in the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Diagram ===&lt;br /&gt;
Typical overall system operation is shown here:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Simicheck_API_-_Page_1.png]]&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
In order to be able to configure how long to wait to run the comparison task the current assignment configuration UI will be modified to contain another field where an integer can be input.&lt;br /&gt;
After the results have been aggregated they will be able to be viewed via a results report page. This report will include the submissions, their corresponding teams, and the similarity results. &amp;lt;br&amp;gt;&lt;br /&gt;
Here is a mock up of our proposed UI:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:SimiCheck_View_Mockup.png]]&lt;br /&gt;
&lt;br /&gt;
=== Code Sample(s) ===&lt;br /&gt;
''Coming soon...''&lt;br /&gt;
&lt;br /&gt;
=== Potential Hurdles ===&lt;br /&gt;
GiHub has rate limits with respect to how many requests we are allowed to make per auth token per hour. According to GitHub's documentation we are allowed 5000 authenticated requests per hour with an additional 60 requests per hour for unauthenticated requests. This documentation can be found [https://developer.github.com/v3/#rate-limiting here].  Due to the fact that this is a background task and immediate results are not required(will likely be an overnight task), we will ensure that if the need arises to exceed 5000 requests per hour that we will delay the subsequent quests until the next hour. This should satisfy the number of checks that need to occur within a reasonable time frame.&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
=== API Testing during Development ===&lt;br /&gt;
API testing can be done outside of our code using applications like [https://www.getpostman.com/ Postman]. We will use this to determine which API calls to use and what our expected output will be. In addition, this will lay the groundwork for testing within Rails for the direct API calls that the Expertiza server will do.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing within Rails ===&lt;br /&gt;
We plan on writing unit tests for any controllers and models that we create.  High level testing of the controllers, models, and view together will be done with Capybara. The tests we write will be alongside the existing test framework in Expertiza.&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108590</id>
		<title>CSC/ECE 517 Spring 2016/E1738 Integrate Simicheck Web Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108590"/>
		<updated>2017-04-17T05:58:06Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team BEND - Bradford Ingersoll, Erika Eill, Nephi Grant, David Gutierrez&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Given that submissions to Expertiza are digital in nature, the opportunity exists to utilize tools that automate plagiarism validation. One of these such tools is called SimiCheck. SimiCheck has a web service API that can be used to compare documents and check them for plagiarism. The goal of this project is to integrate the SimiCheck API into Expertiza in order to allow for an automated plagiarism check to take place once a submission is closed. More information on the SimiCheck API can be found [https://simicheck.com/simicheck/static/swagger-ui/dist/index.html here].&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
This project has been worked on before in previous semesters. However, the outcomes from these projects did not clearly demonstrate successful integration with SimiCheck from Expertiza and were not deemed production worthy. As a result, part of our project involves researching the previous submission and learning from it. In addition, based on this feedback so far we have decided to start our development from scratch and utilize the previous project as a resource for lessons learned.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Create a scheduled background task that starts a configurable amount of time after the due date of an assignment has passed&lt;br /&gt;
* The scheduled task should do the following:&lt;br /&gt;
** Fetch the submission content using links provided by the student in Expertiza from only these sources:&lt;br /&gt;
*** External website or MediaWiki&lt;br /&gt;
**** GET request to the URL then strip HTML from the content&lt;br /&gt;
*** Google Doc (not sheet or slides)&lt;br /&gt;
**** Google Drive API&lt;br /&gt;
*** GitHub project (not pull requests)&lt;br /&gt;
**** GitHub API, will only use the student or group’s changes&lt;br /&gt;
** Categorize the submission content as either a text submission or source code&lt;br /&gt;
** Convert the submission content to raw text format to facilitate comparison&lt;br /&gt;
** Use the SimiCheck API to check similarity among the assignment’s submissions&lt;br /&gt;
*** Notify the instructor that a comparison has started&lt;br /&gt;
*** Send the content of the submissions for each submission category&lt;br /&gt;
**** We will experiment with how many documents to send at a time&lt;br /&gt;
**** Note that each file is limited in size to 1 MB by SimiCheck&lt;br /&gt;
*** Wait for the SimiCheck comparison process to complete&lt;br /&gt;
**** We will provide SimiCheck with a callback URL to notify when the comparison is complete, however if this doesn’t work well will revert to polling&lt;br /&gt;
**** Will also provide an “Update Status” link to manually poll comparison status &lt;br /&gt;
*** Notify the assignment’s instructor that a comparison has been completed&lt;br /&gt;
* Visualize the results in report&lt;br /&gt;
** Will create this file:  view/review_mapping/response_report.html.erb&lt;br /&gt;
** Since SimiCheck has already implemented file diffs, links will be provided in the Expertiza view that lead to the SimiCheck website for each file combination&lt;br /&gt;
** Comparison results for each category will be displayed within Expertiza in a table&lt;br /&gt;
*** Each row is a file combination with similiarity, file names, team names, and diff link&lt;br /&gt;
*** Sorted in descending similarity&lt;br /&gt;
*** Uses available data from the SimiCheck API’s summary report&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Pattern(s) ===&lt;br /&gt;
Given that this project revolves around integration with several web services, our team is planning to follow the [https://en.wikipedia.org/wiki/Facade_pattern facade design pattern] to allow Expertiza to make REST requests to several APIs include SimiCheck, GitHub, Google Drive, etc. This pattern is commonly used to abstract complex functionalities into a simpler interface for use as well as encapsulate API changes to prevent having to update application code if the service changes or a different one is used. We feel this is appropriate based on the requirements because we can create an easy-to-use interface within Expertiza that hides the actual API integration behind the scenes. With this in place, current and future Expertiza developers can use our simplified functionality without needing to understand the miniscule details of the API’s operation.&lt;br /&gt;
&lt;br /&gt;
=== Model(s) ===&lt;br /&gt;
''There is no need to store the raw content sent to SimiCheck.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentComparisonWait ====&lt;br /&gt;
This model &amp;quot;belongs_to&amp;quot; the current Assignment model that already exists. It will contain as it's foreign key an assignment as well as a field for how many hours to wait after the assignment due date before executing the comparison task.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparisonResult ====&lt;br /&gt;
This model '''belongs_to''' the AssignmentSubmissionsComparison model.  It stores the file IDs returned from SimiCheck, the percent similarity between them, and a URL to a detailed comparison (diff).&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparison ====&lt;br /&gt;
This model '''has_many''' AssignmentSubmissionsComparisonResult models.  It represents the results of the comparison among submissions for the assignment.  As such it will contain all of the relevant fields that are shown in the view as described in the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Diagram ===&lt;br /&gt;
Typical overall system operation is shown here:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Simicheck_API_-_Page_1.png]]&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
In order to be able to configure how long to wait to run the comparison task the current assignment configuration UI will be modified to contain another field where an integer can be input.&lt;br /&gt;
After the results have been aggregated they will be able to be viewed via a results report page. This report will include the submissions, their corresponding teams, and the similarity results. &amp;lt;br&amp;gt;&lt;br /&gt;
Here is a mock up of our proposed UI:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:SimiCheck_View_Mockup.png]]&lt;br /&gt;
&lt;br /&gt;
=== Code Sample(s) ===&lt;br /&gt;
''Coming soon...''&lt;br /&gt;
&lt;br /&gt;
=== Potential Hurdles ===&lt;br /&gt;
GiHub has rate limits with respect to how many requests we are allowed to make per auth token per hour. According to GitHub's documentation we are allowed 5000 authenticated requests per hour with an additional 60 requests per hour for unauthenticated requests. This documentation can be found [https://developer.github.com/v3/#rate-limiting here].  Due to the fact that this is a background task and immediate results are not required(will likely be an overnight task), we will ensure that if the need arises to exceed 5000 requests per hour that we will delay the subsequent quests until the next hour. This should satisfy the number of checks that need to occur within a reasonable time frame.&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
=== API Testing during Development ===&lt;br /&gt;
API testing can be done outside of our code using applications like [https://www.getpostman.com/ Postman]. We will use this to determine which API calls to use and what our expected output will be. In addition, this will lay the groundwork for testing within Rails for the direct API calls that the Expertiza server will do.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing within Rails ===&lt;br /&gt;
We plan on writing unit tests for any controllers and models that we create.  High level testing of the controllers, models, and view together will be done with Capybara. The tests we write will be alongside the existing test framework in Expertiza.&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108589</id>
		<title>CSC/ECE 517 Spring 2016/E1738 Integrate Simicheck Web Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108589"/>
		<updated>2017-04-17T05:47:50Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team BEND - Bradford Ingersoll, Erika Eill, Nephi Grant, David Gutierrez&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Given that submissions to Expertiza are digital in nature, the opportunity exists to utilize tools that automate plagiarism validation. One of these such tools is called SimiCheck. SimiCheck has a web service API that can be used to compare documents and check them for plagiarism. The goal of this project is to integrate the SimiCheck API into Expertiza in order to allow for an automated plagiarism check to take place once a submission is closed. More information on the SimiCheck API can be found [https://simicheck.com/simicheck/static/swagger-ui/dist/index.html here].&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
This project has been worked on before in previous semesters. However, the outcomes from these projects did not clearly demonstrate successful integration with SimiCheck from Expertiza and were not deemed production worthy. As a result, part of our project involves researching the previous submission and learning from it. In addition, based on this feedback so far we have decided to start our development from scratch and utilize the previous project as a resource for lessons learned.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Create a scheduled background task that starts a configurable amount of time after the due date of an assignment has passed&lt;br /&gt;
* The scheduled task should do the following:&lt;br /&gt;
** Fetch the submission content using links provided by the student in Expertiza from only these sources:&lt;br /&gt;
*** External website or MediaWiki&lt;br /&gt;
**** GET request to the URL then strip HTML from the content&lt;br /&gt;
*** Google Doc (not sheet or slides)&lt;br /&gt;
**** Google Drive API&lt;br /&gt;
*** GitHub project (not pull requests)&lt;br /&gt;
**** GitHub API, will only use the student or group’s changes&lt;br /&gt;
** Categorize the submission content as either a text submission or source code&lt;br /&gt;
** Convert the submission content to raw text format to facilitate comparison&lt;br /&gt;
** Use the SimiCheck API to check similarity among the assignment’s submissions&lt;br /&gt;
*** Notify the instructor that a comparison has started&lt;br /&gt;
*** Send the content of the submissions for each submission category&lt;br /&gt;
**** We will experiment with how many documents to send at a time&lt;br /&gt;
**** Note that each file is limited in size to 1 MB by SimiCheck&lt;br /&gt;
*** Wait for the SimiCheck comparison process to complete&lt;br /&gt;
**** We will provide SimiCheck with a callback URL to notify when the comparison is complete, however if this doesn’t work well will revert to polling&lt;br /&gt;
**** Will also provide an “Update Status” link to manually poll comparison status &lt;br /&gt;
*** Notify the assignment’s instructor that a comparison has been completed&lt;br /&gt;
* Visualize the results in report&lt;br /&gt;
** Will create this file:  view/review_mapping/response_report.html.erb&lt;br /&gt;
** Since SimiCheck has already implemented file diffs, links will be provided in the Expertiza view that lead to the SimiCheck website for each file combination&lt;br /&gt;
** Comparison results for each category will be displayed within Expertiza in a table&lt;br /&gt;
*** Each row is a file combination with similiarity, file names, team names, and diff link&lt;br /&gt;
*** Sorted in descending similarity&lt;br /&gt;
*** Uses available data from the SimiCheck API’s summary report&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Pattern(s) ===&lt;br /&gt;
Given that this project revolves around integration with several web services, our team is planning to follow the [https://en.wikipedia.org/wiki/Facade_pattern facade design pattern] to allow Expertiza to make REST requests to several APIs include SimiCheck, GitHub, Google Drive, etc. This pattern is commonly used to abstract complex functionalities into a simpler interface for use as well as encapsulate API changes to prevent having to update application code if the service changes or a different one is used. We feel this is appropriate based on the requirements because we can create an easy-to-use interface within Expertiza that hides the actual API integration behind the scenes. With this in place, current and future Expertiza developers can use our simplified functionality without needing to understand the miniscule details of the API’s operation.&lt;br /&gt;
&lt;br /&gt;
=== Model(s) ===&lt;br /&gt;
''There is no need to store the raw content sent to SimiCheck.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentComparisonWait ====&lt;br /&gt;
This model &amp;quot;belongs_to&amp;quot; the current Assignment model that already exists. It will contain as it's foreign key an assignment as well as a field for how many hours to wait after the assignment due date before executing the comparison task.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparisonResult ====&lt;br /&gt;
This model '''belongs_to''' the AssignmentSubmissionsComparison model.  It stores the file IDs returned from SimiCheck, the percent similarity between them, and a URL to a detailed comparison (diff).&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparison ====&lt;br /&gt;
This model '''has_many''' AssignmentSubmissionsComparisonResult models.  It represents the results of the comparison among submissions for the assignment.  As such it will contain all of the relevant fields that are shown in the view as described in the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Diagram ===&lt;br /&gt;
Typical overall system operation is shown here:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Simicheck_API_-_Page_1.png]]&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
In order to be able to configure how long to wait to run the comparison task the current assignment configuration UI will be modified to contain another field where an integer can be input.&lt;br /&gt;
After the results have been aggregated they will be able to be viewed via a results report page. This report will include the submissions, their corresponding teams, and the similarity results. &amp;lt;br&amp;gt;&lt;br /&gt;
Here is a mock up of our proposed UI:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:SimiCheck_View_Mockup.png]]&lt;br /&gt;
&lt;br /&gt;
=== Code Sample(s) ===&lt;br /&gt;
''Coming soon...''&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
=== API Testing during Development ===&lt;br /&gt;
API testing can be done outside of our code using applications like [https://www.getpostman.com/ Postman]. We will use this to determine which API calls to use and what our expected output will be. In addition, this will lay the groundwork for testing within Rails for the direct API calls that the Expertiza server will do.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing within Rails ===&lt;br /&gt;
We plan on writing unit tests for any controllers and models that we create.  High level testing of the controllers, models, and view together will be done with Capybara. The tests we write will be alongside the existing test framework in Expertiza.&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108588</id>
		<title>CSC/ECE 517 Spring 2016/E1738 Integrate Simicheck Web Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108588"/>
		<updated>2017-04-17T05:45:02Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: /* Model(s) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team BEND - Bradford Ingersoll, Erika Eill, Nephi Grant, David Gutierrez&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Given that submissions to Expertiza are digital in nature, the opportunity exists to utilize tools that automate plagiarism validation. One of these such tools is called SimiCheck. SimiCheck has a web service API that can be used to compare documents and check them for plagiarism. The goal of this project is to integrate the SimiCheck API into Expertiza in order to allow for an automated plagiarism check to take place once a submission is closed. More information on the SimiCheck API can be found [https://simicheck.com/simicheck/static/swagger-ui/dist/index.html here].&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
This project has been worked on before in previous semesters. However, the outcomes from these projects did not clearly demonstrate successful integration with SimiCheck from Expertiza and were not deemed production worthy. As a result, part of our project involves researching the previous submission and learning from it. In addition, based on this feedback so far we have decided to start our development from scratch and utilize the previous project as a resource for lessons learned.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Create a scheduled background task that starts a configurable amount of time after the due date of an assignment has passed&lt;br /&gt;
* The scheduled task should do the following:&lt;br /&gt;
** Fetch the submission content using links provided by the student in Expertiza from only these sources:&lt;br /&gt;
*** External website or MediaWiki&lt;br /&gt;
**** GET request to the URL then strip HTML from the content&lt;br /&gt;
*** Google Doc (not sheet or slides)&lt;br /&gt;
**** Google Drive API&lt;br /&gt;
*** GitHub project (not pull requests)&lt;br /&gt;
**** GitHub API, will only use the student or group’s changes&lt;br /&gt;
** Categorize the submission content as either a text submission or source code&lt;br /&gt;
** Convert the submission content to raw text format to facilitate comparison&lt;br /&gt;
** Use the SimiCheck API to check similarity among the assignment’s submissions&lt;br /&gt;
*** Notify the instructor that a comparison has started&lt;br /&gt;
*** Send the content of the submissions for each submission category&lt;br /&gt;
**** We will experiment with how many documents to send at a time&lt;br /&gt;
**** Note that each file is limited in size to 1 MB by SimiCheck&lt;br /&gt;
*** Wait for the SimiCheck comparison process to complete&lt;br /&gt;
**** We will provide SimiCheck with a callback URL to notify when the comparison is complete, however if this doesn’t work well will revert to polling&lt;br /&gt;
**** Will also provide an “Update Status” link to manually poll comparison status &lt;br /&gt;
*** Notify the assignment’s instructor that a comparison has been completed&lt;br /&gt;
* Visualize the results in report&lt;br /&gt;
** Will create this file:  view/review_mapping/response_report.html.erb&lt;br /&gt;
** Since SimiCheck has already implemented file diffs, links will be provided in the Expertiza view that lead to the SimiCheck website for each file combination&lt;br /&gt;
** Comparison results for each category will be displayed within Expertiza in a table&lt;br /&gt;
*** Each row is a file combination with similiarity, file names, team names, and diff link&lt;br /&gt;
*** Sorted in descending similarity&lt;br /&gt;
*** Uses available data from the SimiCheck API’s summary report&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Pattern(s) ===&lt;br /&gt;
Given that this project revolves around integration with several web services, our team is planning to follow the [https://en.wikipedia.org/wiki/Facade_pattern facade design pattern] to allow Expertiza to make REST requests to several APIs include SimiCheck, GitHub, Google Drive, etc. This pattern is commonly used to abstract complex functionalities into a simpler interface for use as well as encapsulate API changes to prevent having to update application code if the service changes or a different one is used. We feel this is appropriate based on the requirements because we can create an easy-to-use interface within Expertiza that hides the actual API integration behind the scenes. With this in place, current and future Expertiza developers can use our simplified functionality without needing to understand the miniscule details of the API’s operation.&lt;br /&gt;
&lt;br /&gt;
=== Model(s) ===&lt;br /&gt;
''There is no need to store the raw content sent to SimiCheck.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentComparisonWait ====&lt;br /&gt;
This model &amp;quot;belongs_to&amp;quot; the current Assignment model that already exists. It will contain as it's foreign key an assignment as well as a field for how many hours to wait after the assignment due date before executing the comparison task.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparisonResult ====&lt;br /&gt;
This model '''belongs_to''' the AssignmentSubmissionsComparison model.  It stores the file IDs returned from SimiCheck, the percent similarity between them, and a URL to a detailed comparison (diff).&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparison ====&lt;br /&gt;
This model '''has_many''' AssignmentSubmissionsComparisonResult models.  It represents the results of the comparison among submissions for the assignment.  As such it will contain all of the relevant fields that are shown in the view as described in the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Diagram ===&lt;br /&gt;
Typical overall system operation is shown here:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Simicheck_API_-_Page_1.png]]&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
After the results have been aggregated they will be able to be viewed via a results report page. This report will include the submissions, their corresponding teams, and the similarity results.&lt;br /&gt;
Here is a mock up of our proposed UI:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:SimiCheck_View_Mockup.png]]&lt;br /&gt;
&lt;br /&gt;
=== Code Sample(s) ===&lt;br /&gt;
''Coming soon...''&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
=== API Testing during Development ===&lt;br /&gt;
API testing can be done outside of our code using applications like [https://www.getpostman.com/ Postman]. We will use this to determine which API calls to use and what our expected output will be. In addition, this will lay the groundwork for testing within Rails for the direct API calls that the Expertiza server will do.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing within Rails ===&lt;br /&gt;
We plan on writing unit tests for any controllers and models that we create.  High level testing of the controllers, models, and view together will be done with Capybara. The tests we write will be alongside the existing test framework in Expertiza.&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108587</id>
		<title>CSC/ECE 517 Spring 2016/E1738 Integrate Simicheck Web Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108587"/>
		<updated>2017-04-17T03:47:39Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team BEND - Bradford Ingersoll, Erika Eill, Nephi Grant, David Gutierrez&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Given that submissions to Expertiza are digital in nature, the opportunity exists to utilize tools that automate plagiarism validation. One of these such tools is called SimiCheck. SimiCheck has a web service API that can be used to compare documents and check them for plagiarism. The goal of this project is to integrate the SimiCheck API into Expertiza in order to allow for an automated plagiarism check to take place once a submission is closed. More information on the SimiCheck API can be found [https://simicheck.com/simicheck/static/swagger-ui/dist/index.html here].&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
This project has been worked on before in previous semesters. However, the outcomes from these projects did not clearly demonstrate successful integration with SimiCheck from Expertiza and were not deemed production worthy. As a result, part of our project involves researching the previous submission and learning from it. In addition, based on this feedback so far we have decided to start our development from scratch and utilize the previous project as a resource for lessons learned.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Create a scheduled background task that starts a configurable amount of time after the due date of an assignment has passed&lt;br /&gt;
* The scheduled task should do the following:&lt;br /&gt;
** Fetch the submission content using links provided by the student in Expertiza from only these sources:&lt;br /&gt;
*** External website or MediaWiki&lt;br /&gt;
**** GET request to the URL then strip HTML from the content&lt;br /&gt;
*** Google Doc (not sheet or slides)&lt;br /&gt;
**** Google Drive API&lt;br /&gt;
*** GitHub project (not pull requests)&lt;br /&gt;
**** GitHub API, will only use the student or group’s changes&lt;br /&gt;
** Categorize the submission content as either a text submission or source code&lt;br /&gt;
** Convert the submission content to raw text format to facilitate comparison&lt;br /&gt;
** Use the SimiCheck API to check similarity among the assignment’s submissions&lt;br /&gt;
*** Notify the instructor that a comparison has started&lt;br /&gt;
*** Send the content of the submissions for each submission category&lt;br /&gt;
**** We will experiment with how many documents to send at a time&lt;br /&gt;
**** Note that each file is limited in size to 1 MB by SimiCheck&lt;br /&gt;
*** Wait for the SimiCheck comparison process to complete&lt;br /&gt;
**** We will provide SimiCheck with a callback URL to notify when the comparison is complete, however if this doesn’t work well will revert to polling&lt;br /&gt;
**** Will also provide an “Update Status” link to manually poll comparison status &lt;br /&gt;
*** Notify the assignment’s instructor that a comparison has been completed&lt;br /&gt;
* Visualize the results in report&lt;br /&gt;
** Will create this file:  view/review_mapping/response_report.html.erb&lt;br /&gt;
** Since SimiCheck has already implemented file diffs, links will be provided in the Expertiza view that lead to the SimiCheck website for each file combination&lt;br /&gt;
** Comparison results for each category will be displayed within Expertiza in a table&lt;br /&gt;
*** Each row is a file combination with similiarity, file names, team names, and diff link&lt;br /&gt;
*** Sorted in descending similarity&lt;br /&gt;
*** Uses available data from the SimiCheck API’s summary report&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Pattern(s) ===&lt;br /&gt;
Given that this project revolves around integration with several web services, our team is planning to follow the [https://en.wikipedia.org/wiki/Facade_pattern facade design pattern] to allow Expertiza to make REST requests to several APIs include SimiCheck, GitHub, Google Drive, etc. This pattern is commonly used to abstract complex functionalities into a simpler interface for use as well as encapsulate API changes to prevent having to update application code if the service changes or a different one is used. We feel this is appropriate based on the requirements because we can create an easy-to-use interface within Expertiza that hides the actual API integration behind the scenes. With this in place, current and future Expertiza developers can use our simplified functionality without needing to understand the miniscule details of the API’s operation.&lt;br /&gt;
&lt;br /&gt;
=== Model(s) ===&lt;br /&gt;
''There is no need to store the raw content sent to SimiCheck.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparisonResult ====&lt;br /&gt;
This model '''belongs_to''' the AssignmentSubmissionsComparison model.  It stores the file IDs returned from SimiCheck, the percent similarity between them, and a URL to a detailed comparison (diff).&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparison ====&lt;br /&gt;
This model '''has_many''' AssignmentSubmissionsComparisonResult models.  It represents the results of the comparison among submissions for the assignment.  As such it will contain all of the relevant fields that are shown in the view as described in the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Diagram ===&lt;br /&gt;
Typical overall system operation is shown here:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Simicheck_API_-_Page_1.png]]&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
After the results have been aggregated they will be able to be viewed via a results report page. This report will include the submissions, their corresponding teams, and the similarity results.&lt;br /&gt;
Here is a mock up of our proposed UI:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:SimiCheck_View_Mockup.png]]&lt;br /&gt;
&lt;br /&gt;
=== Code Sample(s) ===&lt;br /&gt;
''Coming soon...''&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
=== API Testing during Development ===&lt;br /&gt;
API testing can be done outside of our code using applications like [https://www.getpostman.com/ Postman]. We will use this to determine which API calls to use and what our expected output will be. In addition, this will lay the groundwork for testing within Rails for the direct API calls that the Expertiza server will do.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing within Rails ===&lt;br /&gt;
We plan on writing unit tests for any controllers and models that we create.  High level testing of the controllers, models, and view together will be done with Capybara. The tests we write will be alongside the existing test framework in Expertiza.&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108586</id>
		<title>CSC/ECE 517 Spring 2016/E1738 Integrate Simicheck Web Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016/E1738_Integrate_Simicheck_Web_Service&amp;diff=108586"/>
		<updated>2017-04-17T03:42:59Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team BEND - Bradford Ingersoll, Erika Eill, Nephi Grant, David Gutierrez&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Given that submissions to Expertiza are digital in nature, the opportunity exists to utilize tools that automate plagiarism validation. One of these such tools is called SimiCheck. SimiCheck has a web service API that can be used to compare documents and check them for plagiarism. The goal of this project is to integrate the SimiCheck API into Expertiza in order to allow for an automated plagiarism check to take place once a submission is closed.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
This project has been worked on before in previous semesters. However, the outcomes from these projects did not clearly demonstrate successful integration with SimiCheck from Expertiza and were not deemed production worthy. As a result, part of our project involves researching the previous submission and learning from it. In addition, based on this feedback so far we have decided to start our development from scratch and utilize the previous project as a resource for lessons learned.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Create a scheduled background task that starts a configurable amount of time after the due date of an assignment has passed&lt;br /&gt;
* The scheduled task should do the following:&lt;br /&gt;
** Fetch the submission content using links provided by the student in Expertiza from only these sources:&lt;br /&gt;
*** External website or MediaWiki&lt;br /&gt;
**** GET request to the URL then strip HTML from the content&lt;br /&gt;
*** Google Doc (not sheet or slides)&lt;br /&gt;
**** Google Drive API&lt;br /&gt;
*** GitHub project (not pull requests)&lt;br /&gt;
**** GitHub API, will only use the student or group’s changes&lt;br /&gt;
** Categorize the submission content as either a text submission or source code&lt;br /&gt;
** Convert the submission content to raw text format to facilitate comparison&lt;br /&gt;
** Use the SimiCheck API to check similarity among the assignment’s submissions&lt;br /&gt;
*** Notify the instructor that a comparison has started&lt;br /&gt;
*** Send the content of the submissions for each submission category&lt;br /&gt;
**** We will experiment with how many documents to send at a time&lt;br /&gt;
**** Note that each file is limited in size to 1 MB by SimiCheck&lt;br /&gt;
*** Wait for the SimiCheck comparison process to complete&lt;br /&gt;
**** We will provide SimiCheck with a callback URL to notify when the comparison is complete, however if this doesn’t work well will revert to polling&lt;br /&gt;
**** Will also provide an “Update Status” link to manually poll comparison status &lt;br /&gt;
*** Notify the assignment’s instructor that a comparison has been completed&lt;br /&gt;
* Visualize the results in report&lt;br /&gt;
** Will create this file:  view/review_mapping/response_report.html.erb&lt;br /&gt;
** Since SimiCheck has already implemented file diffs, links will be provided in the Expertiza view that lead to the SimiCheck website for each file combination&lt;br /&gt;
** Comparison results for each category will be displayed within Expertiza in a table&lt;br /&gt;
*** Each row is a file combination with similiarity, file names, team names, and diff link&lt;br /&gt;
*** Sorted in descending similarity&lt;br /&gt;
*** Uses available data from the SimiCheck API’s summary report&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Pattern(s) ===&lt;br /&gt;
Given that this project revolves around integration with several web services, our team is planning to follow the [https://en.wikipedia.org/wiki/Facade_pattern facade design pattern] to allow Expertiza to make REST requests to several APIs include SimiCheck, GitHub, Google Drive, etc. This pattern is commonly used to abstract complex functionalities into a simpler interface for use as well as encapsulate API changes to prevent having to update application code if the service changes or a different one is used. We feel this is appropriate based on the requirements because we can create an easy-to-use interface within Expertiza that hides the actual API integration behind the scenes. With this in place, current and future Expertiza developers can use our simplified functionality without needing to understand the miniscule details of the API’s operation.&lt;br /&gt;
&lt;br /&gt;
=== Model(s) ===&lt;br /&gt;
''There is no need to store the raw content sent to SimiCheck.&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparisonResult ====&lt;br /&gt;
This model '''belongs_to''' the AssignmentSubmissionsComparison model.  It stores the file IDs returned from SimiCheck, the percent similarity between them, and a URL to a detailed comparison (diff).&lt;br /&gt;
&lt;br /&gt;
==== AssignmentSubmissionsComparison ====&lt;br /&gt;
This model '''has_many''' AssignmentSubmissionsComparisonResult models.  It represents the results of the comparison among submissions for the assignment.  As such it will contain all of the relevant fields that are shown in the view as described in the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Diagram ===&lt;br /&gt;
Typical overall system operation is shown here:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Simicheck_API_-_Page_1.png]]&lt;br /&gt;
&lt;br /&gt;
=== User Interface ===&lt;br /&gt;
After the results have been aggregated they will be able to be viewed via a results report page. This report will include the submissions, their corresponding teams, and the similarity results.&lt;br /&gt;
Here is a mock up of our proposed UI:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:SimiCheck_View_Mockup.png]]&lt;br /&gt;
&lt;br /&gt;
=== Code Sample(s) ===&lt;br /&gt;
''Coming soon...''&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
=== API Testing during Development ===&lt;br /&gt;
API testing can be done outside of our code using applications like [https://www.getpostman.com/ Postman]. We will use this to determine which API calls to use and what our expected output will be. In addition, this will lay the groundwork for testing within Rails for the direct API calls that the Expertiza server will do.&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing within Rails ===&lt;br /&gt;
We plan on writing unit tests for any controllers and models that we create.  High level testing of the controllers, models, and view together will be done with Capybara. The tests we write will be alongside the existing test framework in Expertiza.&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/oss_35156&amp;diff=107389</id>
		<title>CSC/ECE 517 Fall 2015/oss 35156</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/oss_35156&amp;diff=107389"/>
		<updated>2017-03-24T02:02:54Z</updated>

		<summary type="html">&lt;p&gt;Nlgrant: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is Syndicat? ==&lt;br /&gt;
Syndicat is a RSS reader written in Javascript.  In its final form it will consist of three parts: a front-end UI, a back-end implemented in NodeJS, and a daemon that manipulates the back end for scheduled tasks (such as retrieving feeds.)  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TinyTinyRSS is the project Syndicat is based on.  Our goal is to refactor TinyTinyRSS’s code to a more modern format and to take advantage of the inherent performance improvements that can be had from asynchronous design.  A secondary goal of the project is to provide an upgrade path to existing users of TinyTinyRSS.  Ideally, they would be able to use the same database they were already using and just drop our new webapp on top of it to get started immediately.  A tertiary goal of the project is to provide an upgrade path to TinyTinyRSS users so we can upgrade and refactor the database and other parts of the application and users will not lose data.  &lt;br /&gt;
&lt;br /&gt;
Our submission is a redesign of several models in the back-end.  Written in Sequelize and tested using Mocha, there are a set of models that were already created (in the slow branch of the main fork) but these prototype models run extremely slowly.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Our contribution ==&lt;br /&gt;
&lt;br /&gt;
=== Feed  ===&lt;br /&gt;
This model can be found in /models/Feed.js. The tests for this model can be found in /tests/models/Feed_test.js. &amp;quot;RSS&amp;quot; (Rich Site Summary) is a format for delivering regularly changing web content. Many news-related sites, weblogs and other online publishers syndicate their content as an RSS Feed to whoever wants it, so that people can save a lot of time by skipping browsing the webpages, instead parse the feed and get the information they need. The relation between users and feeds is one-to-many, a feed also has urls(icon, site, etc.), and some time intervals(update, purge), and more specifically can refer to the source code in the repository. &lt;br /&gt;
&lt;br /&gt;
We redesign feed model and exclude unnecessary attributes and class methods which degrades the performance. We also thoroughly tested Feed model with Mocha and Chai, the tests includes association tests(between user model and feed model), primary key uniqueness and auto-increment, and assertion of default value of missing attributes.&lt;br /&gt;
&lt;br /&gt;
=== Feed Category ===&lt;br /&gt;
This model can be found in /models/FeedCategory.js.  The tests for this model can be found in /tests/models/FeedCategory_test.js.  Feed Categories are simply categories that can be applied to a particular feed.  They have a label and are associated with a specific user.  They can also be nested, a single feed can have may “child” feeds, all of which are tested for in the specified tests file.&lt;br /&gt;
&lt;br /&gt;
=== Entry ===&lt;br /&gt;
This model can be found in /models/Entry.js. It’s corresponding tests can be found in /tests/models/Entry_test.js. Entries are simply a single entry from a feed. They contain the title, link, and content for an individual feed entry.&lt;br /&gt;
&lt;br /&gt;
For the Entry model we tested with Mocha and chai. There are a total of 17 tests. The primary test consists of validating insertion of model into database and retrieving expected field values. We also tested to ensure that all required fields are present and contain valid values. The id which serves as the primary key for the model was tested to ensure uniqueness, and auto increment on insertion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
To set up this project, you will need a recent version of Node.  Any from 4-7 should work.  You will also need NPM, and it should handle installing any further dependencies related to Node.&lt;br /&gt;
You will also need a version of make for your system.  Any version should do, but it was tested extensively on OSX using cmake and on Linux using the version prepackaged with Ubuntu 16.04.  You can clone the repository here [https://github.com/jchristi/syndicat]&lt;br /&gt;
&lt;br /&gt;
== Testing Strategy ==&lt;br /&gt;
The primary strategy for testing on this project is validating that our models were properly defined and insertion and retrieval were working as predicted. We also wanted to validate that performance for insertion and retrieval was as expected. In order to achieve this a connection with a test database was established where we would store different models and validate different things. We validated the following:&lt;br /&gt;
* Models were inserted and retrieved properly from the database&lt;br /&gt;
* Required fields needed to be present for a model insertion attempt&lt;br /&gt;
* Primary keys were auto incrementing where applicable&lt;br /&gt;
* Valid foreign keys present&lt;br /&gt;
* Valid field type values were provided before insertion attempt&lt;br /&gt;
&lt;br /&gt;
== Running tests ==&lt;br /&gt;
You can lint this project by typing `make lint` or simply `make`.  You can run all tests by typing `make test`.  There is not yet a working build for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next Steps ==&lt;br /&gt;
Good next steps for this project would be:&lt;br /&gt;
* Finishing building the models in the TinyTinyRSS Schema&lt;br /&gt;
* Buildout of Feed syncing code&lt;br /&gt;
* Buildout of new UI&lt;/div&gt;</summary>
		<author><name>Nlgrant</name></author>
	</entry>
</feed>