Example file for adding sessions in bulk

Example file for adding sessions in bulk

by Colin Mackenzie -
Number of replies: 6

Hello

First of all, thank you for all teh work that has gone into teh attendence plug-in. I've got two queries about adding sessions in bulk.

I've got the headers (course, groups, sessiondate, from, to, description, repeaton, repeatevery, repeatuntil, studentscanmark, passwordgrp, randompassword, subnet, automark, autoassignstatus, absenteereport, preventsharedip, preventsharediptime, calendarevent, includeqrcode, rotateqrcode) but would like to know if there is a standard format for the date, from, to etc. Does anyone have an example filled-in file they could share? I'm not the site administrator, so I need to give him the right input.

Secodnly, The site administrator is saying that each session gets set up in a new course, or something like that, I was assuling that if I put the right course idnetifier in the course column that it would go into an existing course, is that not right?

Many thanks

Colin

Average of ratings: -
In reply to Colin Mackenzie

Re: Example file for adding sessions in bulk

by Colin Mackenzie -
Sorry to have bothered you. We've worked it out. I didn't get what mapping a header was and our administrator hadn't seen the upload button. All sorted now.
In reply to Colin Mackenzie

Re: Example file for adding sessions in bulk

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
great! - the code uses the PHP function "strtotime" which expects a string containing an English date format - which could be anything from "11 September 2012" or "2018-12-06T09:04:55" - keep in mind that your server timezome comes into play as well
In reply to Dan Marsden

Re: Example file for adding sessions in bulk

by Gordon McLeod -
Picture of Plugin developers
Hi Dan,
Just testing out a more recent version (2021082609) than we have on our live site, great to see the ability to import the sessions is now available for staff. When trying to upload a csv to bulk create the session events I'm getting the error "A session date is invalid! Skipping."
I've tried 10/10/2022 and 01 October 2022 as date formats. Is there something I'm missing?
I don't have admin rights on the test server, so will need to go back to our site admin if there's something they need to change.
Thanks, Gordon.
In reply to Gordon McLeod

Re: Example file for adding sessions in bulk

by Chandrashekaran A -

You may try the format 21-10-2022 and this works for me. I am using Moodle 3.11.2 with the latest attendance plugin.

Regards,

Chandru

In reply to Colin Mackenzie

Svar: Re: Example file for adding sessions in bulk

by Bo Kristian Olsen -

Hi,

I'm currently trying to learn how to use the import function in attendance. Ideally I'd want to make a template-file for all of our users to use.

However I have absolutely no clue on the different headers and how the template should look. So when I saw this I hoped I would find a downloadble file / something to look at. Would you be able to share the file so I could have a look at the format, Colin?


In reply to Bo Kristian Olsen

Re: Svar: Re: Example file for adding sessions in bulk

by Colin Mackenzie -
Hello
It's a csv file, there are a number of headings you can use the that the attendance module recognises

course groups sessiondate from to description repeaton repeatevery repeatuntil studentscanmark passwordgrp randompassword subnet automark autoassignstatus absenteereport preventsharedip preventsharediptime calendarevent includeqrcode rotateqrcode

I use:
course groups sessiondate from to description

course is, I think, the course short name, date has a specific format e.g. 16.09.2022, description, for me, is Lesson 1, lesson 2 etc

All the best
Colin