Giter Club home page Giter Club logo

Comments (10)

jmcgettrick avatar jmcgettrick commented on September 17, 2024

Hi Howard, I'll have to look at this and figure something out.

from moodledirectv2.

danmarsden avatar danmarsden commented on September 17, 2024

there's also an issue with the postdate calcs.

If timestart and timedue are both in the future,
and this check runs
$dtpost = ($dtdue <= $dtstart) ? time() : $dtdue;

it sets $dtpost to time() which is earlier than dtstart or dtdue

and so we get this error:
Message: date_due - due date must be after start date date_post - post date must be after start date

from moodledirectv2.

danmarsden avatar danmarsden commented on September 17, 2024

I think this should be:
$now = time();
if ($dtdue <= $dtstart && $dtstart > $now) {
$dtpost = $now
} else {
$dtpost = $dtdue;
}

from moodledirectv2.

thepurpleblob avatar thepurpleblob commented on September 17, 2024

I've seen the 'post date must be after start date' message in the cron logs quite a lot, but I'm reasonably sure that the start date wasn't in the future. Having said that, the cron doesn't tell you which submission it is moaning about so it's very hard to tell for certain.

from moodledirectv2.

danmarsden avatar danmarsden commented on September 17, 2024

yeah - I noticed it as I had over 50,000 events in a clients queue due to EULA check failures, external entity issues - finally managed to clear all the file upload events tonight (it's taken over 8hrs) but still have a lot of mod_updated calls in a held state due to the post-date issues. Of course these events aren't as important so I'm leaving them for today!

from moodledirectv2.

danmarsden avatar danmarsden commented on September 17, 2024

in fact - this might be a better option:
$now = time();
if ($dtdue <= $dtstart) {
if ($dtstart > $now) {
$dtpost = $dtstart;
} else {
$dtpost = $now;
}
} else {
$dtpost = $dtdue;
}

from moodledirectv2.

danmarsden avatar danmarsden commented on September 17, 2024

and after fixing that we end up with problems with dtdue being before dtstart if the dtstart is in the future so we need to change the +1month patch for $dtdue to this:
if ($dtdue <= $dtstart) {
$dtdue = strtotime('+1 month', $dtstart);

    }

from moodledirectv2.

jmcgettrick avatar jmcgettrick commented on September 17, 2024

The post date will be handled better in the next release. It will take the 'hidden until' value that is set via Gradebook. If that is not set then it will be set to the start date.

from moodledirectv2.

alexumn avatar alexumn commented on September 17, 2024

A question about this change: After the Moodle Assignment with PP is created, if an instructor enables or changes the the "hidden until" value via the Gradebook, will that change be reflected in the post date in Turnitin?

from moodledirectv2.

jmcgettrick avatar jmcgettrick commented on September 17, 2024

The cron job will change any post dates in Turnitin that require changing. There is also an assignment sync-up done before a submission is made which would make this change.

from moodledirectv2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.