@CSCI_Teacher @afromero2
I was so excited to see your postings since I originally posted this in early 2019 but I still couldn't get mine to work!! Ugh... I tried doing the same in my PHP/cURL and from postman, all returned status code of 200 but didn't update the plagiarism tool.
My code looks like this (error handling not shown):
$curl2 = curl_init();
$updateAssURL = "https://" . $domain . "/api/v1/courses/" . $cid . "/assignments/" . $aid;
curl_setopt_array($curl2, array(
CURLOPT_URL => $updateAssURL,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => array(
'id' => $aid,
'submission_type' => 'online',
'similarityDetectionTool' => 'Lti::MessageHandler_xxx',
'configuration_tool_type'=> 'Lti::MessageHandler',
'report_visibility' => 'immediate'
),
CURLOPT_HTTPHEADER => array(
$header,
"content-type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl2);
$err = curl_error($curl2);
curl_close($curl2);
ANY INSIGHTS are appreciated tremendously.