Comments (7)
Afternoon
I work for blackboard and we can confirm this issue occurs using version 2016011105 of the assignment module, the error which gets generated is as per below
Debug info:
Error code: There was an error trying to create the assignment in Turnitin
Fault Code: invaliddata | File: [dirroot]/mod/turnitintooltwo/sdk/assignmentsoap.class.php | Line: 33 | Message: date_start - start date can not be more than 1 year in the past.
| Code: 0
$a contents: There was an error trying to create the assignment in Turnitin
Fault Code: invaliddata | File: [dirroot]/mod/turnitintooltwo/sdk/assignmentsoap.class.php | Line: 33 | Message: date_start - start date can not be more than 1 year in the past.
| Code: 0
Stack trace
This is being caused by the public function createAssignment( $assignment ) function as the code cant tell if it is being called by the moodle restore or import library below is the entire call stack for this error which should show the parent functions
line 488 of /lib/setuplib.php: moodle_exception thrown
line 683 of /mod/turnitintooltwo/lib.php: call to print_error()
line 149 of /mod/turnitintooltwo/turnitintooltwo_comms.class.php: call to turnitintooltwo_print_error()
line 842 of /mod/turnitintooltwo/turnitintooltwo_assignment.class.php: call to turnitintooltwo_comms::handle_exceptions()
line 1385 of /mod/turnitintooltwo/turnitintooltwo_assignment.class.php: call to turnitintooltwo_assignment::create_tii_assignment()
line 125 of /mod/turnitintooltwo/backup/moodle2/restore_turnitintooltwo_activity_task.class.php: call to turnitintooltwo_assignment->edit_moodle_assignment()
line 111 of /backup/util/plan/restore_task.class.php: call to restore_turnitintooltwo_activity_task->after_restore()
line 193 of /backup/util/plan/restore_plan.class.php: call to restore_task->execute_after_restore()
line 121 of /backup/moodle2/restore_final_task.class.php: call to restore_plan->execute_after_restore()
line 717 of /backup/moodle2/restore_stepslib.php: call to restore_final_task->launch_execute_after_restore()
line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_execute_after_restore->define_execution()
line 190 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
line 177 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
line 333 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
from moodle-mod_turnitintooltwo.
Hi @sharpchi and @barry-matthias ,
We have fixed this in our current development build so it will go out with the next release of the V2 plugin.
from moodle-mod_turnitintooltwo.
Thanks for letting us know. I'm not entirely sure it is fixed, though. In the turnitintooltwo_assignment.class.php
file you have this line:
if (($restore) && ($attribute < strtotime("-1 year"))) {
which checks the $attribute
value. I would expect that value to be a timestamp, but $attribute
is set just a few lines up to:
$attribute = "maxmarks".$i;
Would you mind checking please?
from moodle-mod_turnitintooltwo.
Hi @sharpchi ,
Thanks for pointing that out, after looking at it myself I do indeed see a bug in our fix. We haven't done our full sweep of QA and automations yet for the next release so we hadn't spotted it yet.
We will amend this before the release.
from moodle-mod_turnitintooltwo.
So, I think you need something like this:
$attribute = "dtstart".$i;
if (($restore) && ($this->turnitintooltwo->$attribute < strtotime("-1 year"))) {
from moodle-mod_turnitintooltwo.
Hi @sharpchi ,
Yeah this is the fix I had in mind. From my testing the fix you propose does work as intended. We'll get it through QA as soon as we can as we aim to release soon.
from moodle-mod_turnitintooltwo.
Fixed in v2016091401
from moodle-mod_turnitintooltwo.
Related Issues (20)
- Downloaded zipped file keeps corrupting when submissions exceed 100.
- Feature request: Additional files
- Display grade as percentage + not yet graded + PHP 8+ Causes an error. HOT 1
- Update icon for Moodle 4
- PHP8.0 Required parameter $tiicourseid
- Timeline and multiple parts
- Deprecated SOAP warning during installation HOT 6
- Show 'AI similarity' Score in submission table
- Files page throws Ajax error on site with many activities HOT 2
- Duplicating activity and calendar entries using turnitintooltwo and Moodle HOT 1
- "Undefined variable: coursetype" PHP warning when resetting mod_turnitintooltwo
- Failing unit test mod_turnitintooltwo_view_testcase::test_output_header, after MDL-78806
- Submissions table First Name sorting by id instead of First name
- Summary appearing twice on view page in Moodle 4.0+
- Expanding the 'GradeMark options' section in the assignment settings also expands 'Similarity Report Options' section
- Default activity completion: Required parameter $tiicourseid follows optional parameter
- Default activity completion - Can not add jQuery plugins after starting page output!
- User type exception trying to get fullname for revealed anonymous student.
- Failing core Behat tests in default_activiy completion.feature
- Bug: update_record_raw error when "Auto Generate Lastname" is "Yes" and value of "Student Pseudo Last Name" is empty.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-mod_turnitintooltwo.