Skip to content

Commit

Permalink
Merge pull request #16 from turnitin/develop
Browse files Browse the repository at this point in the history
For release 2020012801
  • Loading branch information
dwinn authored Jan 28, 2020
2 parents 2baa2fa + 46f7a5d commit 6c24073
Show file tree
Hide file tree
Showing 85 changed files with 921 additions and 591 deletions.
5 changes: 3 additions & 2 deletions ajax/connection_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
* Ajax functionality related to testing a connection to Turnitin.
*
* @package plagiarism_turnitinsim
* @copyright 2018 David Winn <[email protected]>
* @copyright 2018 Turnitin
* @author David Winn <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand All @@ -40,7 +41,7 @@
$apiurl = required_param('apiurl', PARAM_RAW);
$apikey = required_param('apikey', PARAM_RAW);

$tsrequest = new tsrequest();
$tsrequest = new plagiarism_turnitinsim_request();
echo $tsrequest->test_connection($apiurl, $apikey);
}
}
5 changes: 3 additions & 2 deletions ajax/cv.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
* Ajax functionality related to Turnitin Cloud Viewer.
*
* @package plagiarism_turnitinsim
* @copyright 2017 John McGettrick <[email protected]>
* @copyright 2017 Turnitin
* @author John McGettrick <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand All @@ -37,7 +38,7 @@

switch ($action) {
case "request_cv_launch":
$tssubmission = new tssubmission( new tsrequest(), $submissionid);
$tssubmission = new plagiarism_turnitinsim_submission( new plagiarism_turnitinsim_request(), $submissionid);
echo $tssubmission->request_cv_launch_url();

break;
Expand Down
7 changes: 4 additions & 3 deletions ajax/eula_response.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
* Ajax functionality for handling the Turnitin EULA response.
*
* @package plagiarism_turnitinsim
* @copyright 2018 John McGettrick <[email protected]>
* @copyright 2018 Turnitin
* @author John McGettrick <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand All @@ -35,7 +36,7 @@
$action = required_param('action', PARAM_ALPHAEXT);
$contextid = optional_param('contextid', 0, PARAM_INT);

$tsrequest = new tsrequest();
$tsrequest = new plagiarism_turnitinsim_request();

switch ($action) {
case "accept_eula":
Expand All @@ -45,7 +46,7 @@
// Update EULA accepted version and timestamp for user.
$data = new stdClass();
$data->id = $user->id;
$data->lasteulaaccepted = get_config('plagiarism', 'turnitin_eula_version');
$data->lasteulaaccepted = get_config('plagiarism_turnitinsim', 'turnitin_eula_version');
$data->lasteulaacceptedtime = time();
$lang = $tsrequest->get_language();
$data->lasteulaacceptedlang = $lang->localecode;
Expand Down
9 changes: 5 additions & 4 deletions ajax/resend_submission.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
* Ajax functionality related to resending an errored submission to Turnitin.
*
* @package plagiarism_turnitinsim
* @copyright 2018 David Winn <[email protected]>
* @copyright 2018 Turnitin
* @author David Winn <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

require_once(__DIR__."/../../../config.php");
require_once(__DIR__."/../lib.php");
require_once( __DIR__ . '/../classes/tssubmission.class.php' );
require_once( __DIR__ . '/../classes/tsrequest.class.php' );
require_once( __DIR__ . '/../classes/submission.class.php' );
require_once( __DIR__ . '/../classes/request.class.php' );

require_login();

Expand All @@ -39,7 +40,7 @@
throw new moodle_exception('invalidsesskey', 'error');
}

$tssubmission = new tssubmission(new tsrequest(), $submissionid);
$tssubmission = new plagiarism_turnitinsim_submission(new plagiarism_turnitinsim_request(), $submissionid);
$tssubmission->setstatus(TURNITINSIM_SUBMISSION_STATUS_QUEUED);
$tssubmission->update();

Expand Down
3 changes: 2 additions & 1 deletion amd/build/connection_test.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion amd/build/cv_launch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/cv_launch.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6c24073

Please sign in to comment.