Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to dates not syncing with Calendar #19

Open
viapotentia opened this issue Sep 11, 2018 · 10 comments
Open

Changes to dates not syncing with Calendar #19

viapotentia opened this issue Sep 11, 2018 · 10 comments

Comments

@viapotentia
Copy link

viapotentia commented Sep 11, 2018

Not sure if this is problem with the calendar system or the Dates plugin.

Updated various dates for several forums, assignments and quizzes using the Dates Report system / plugin. The changes appeared to be saved to the individual activities, but did not update in the calendar system.

If I then open up (edit) the individual activity, I can see that the date was changed. When I then save the activity (even though I made no additional changes), the date is updating on the calendar.

I don't know the inner-workings of the Dates plugin, but it appears that some kind of database write is happening when saving directly from an activity that isn't happening when editing activity dates via the Dates plugin.

I am running Moodle 3.5.2 (just updated a day or two ago).

@timhunt
Copy link
Member

timhunt commented Nov 21, 2018

Sorry, I don't have time to look into this yet. As you say, something must be happening in the activity code that we need to replicate.

@jschwar1
Copy link

Hi TIm,

I've observed this issue as well. For some reason the events just weren't created for the resources I modified using Reports-->Dates

We're running Moodle 3.4.3. The activities I was editing using Report-->Dates had been imported from a previous course. I was updating Expected completion dates. After editing expected completion dates using the Dates plugin, the updated file and URL activities weren't showing on the course calendar. If I enter the Edit settings individually for each of the activities and save, the activities then show in the calendar.

The plugin is a huge timesaver. Please work to resolve this issue! Let me know if there is any additional information I can provide.

@brian-winstead
Copy link

I suspect that this problem with the dates on calendar events not updating after dates have been modified via the Edit Dates tool is actually an issue with core Moodle code and not the plugin. However, I have an idea for how it might be addressed via the plugin.

Moodle has an adhoc task, refresh_mod_calendar_events_task, whose purpose is to update the dates on calendar events to ensure they are aligned to the dates in the settings of the course modules. For example, when you restore a course in Moodle, an instance of this adhoc task is created for the course. A couple years ago I had researched the origins of this task and it sounded like the task was Moodle's concession that some scenarios did not update calendar dates and that the task was an easier solution than trying to fix all the possible scenarios in a myriad of activity plugins.

My suggestion would be to code the Edit Dates plugin to create an instance of the refresh_mod_calendar_events_task adhoc task for the course when a user submits any changes through the plugin. This would ensure that within a few minutes of updating dates on the activities in the course that the corresponding calendar events are also updated.

@JosephKennedy4
Copy link

There is a time saver if you want to use the tool, but have the Calendar work. After changing all the dates,

  1. Go to the main course page
  2. Click “Edit” next to an activity, then right-click “Edit Settings” and choose “Open in a new tab”
  3. Do this for all the activities. You’ll have a LOT of open tabs.
  4. You can then click on a tab, “Save and return to course,” click the next tab . . .
    It’s obnoxious, but it doesn’t take too much extra time.

In the meantime, it would indeed be nice to see this bug addressed!

@lispolzleitner
Copy link

I am also working with the Dates plugin and find it useful -- even if I have to open and save all the assignments it still saves time.
However, there seems to be another problem related to it. My students are getting automatic mail reminders with wrong (apparently old) dates -- even if all the dates in the assignments and in the calendar are correct. These old dates must be stored somewhere deep down in the system (forgive my wording -- I am an English teacher -- not a programmer). Can anyone help solve this issue??????
Please :)

@timhunt
Copy link
Member

timhunt commented Apr 22, 2021

We don't us teh assignment tool much ourselves, and I am busy with other things. However, if someone has time to make a pull request, I will find time to review it.

@Syxton
Copy link
Contributor

Syxton commented Aug 31, 2021

I haven't check all the mod types, but I have a proposed fix for forums. #40

@Syxton
Copy link
Contributor

Syxton commented Aug 31, 2021

I have been testing the adhoc task that @brian-winstead mentioned. I'm currently just looking at forums. What I found is 2 things.
#1 The task worked for the Completion Expected date, but doesn't update the due date....
#2 Without the task, the completion expected calendar event wasn't being created with my first attempt #40

So I have combined the two fixes. Using the task to rebuild some of the tasks, plus a fix for forums as well. #40 is now updated with this knowledge. :)

@QPEIFFE
Copy link

QPEIFFE commented Jan 23, 2024

In #60 , Tim mentioned that "what I said [in this thread] is the latest position": that " if someone has time to make a pull request, I will find time to review it." I've pinged Tim in the pull request mentioned #40 so that they can take a look! Hope I'm not being too obtrusive, and I appreciate anyone's time.

@Gladst1
Copy link

Gladst1 commented Aug 6, 2024

This problem still exists and we regularly receive feedback from teachers at our university about incorrect dates in the calendar.

I would really appreciate if someone could take a look at this now that the pull request has been made. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants