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

Allow CSV import on course id values - not just shortname. #706

Open
t-schroeder opened this issue Oct 13, 2023 · 2 comments
Open

Allow CSV import on course id values - not just shortname. #706

t-schroeder opened this issue Oct 13, 2023 · 2 comments

Comments

@t-schroeder
Copy link
Contributor

In our Moodle instance we have multiple courses using the same shortname. So when we want to import sessions into a course that has a non-unique shortname, we get an error here:

$course = $DB->get_record('course', ['shortname' => $session->course]);

Would it be possible to make the import work with course IDs instead of shortnames?

P.S.: I'm aware that normally shortnames are unique in Moodle.

@danmarsden danmarsden changed the title CSV import fails if course shortname is not unique Allow CSV import on course id values - not just shortname. Oct 15, 2023
@danmarsden
Copy link
Owner

Hey Tim - yes, sounds like a good option to add - if you have internal development capabilities, pull requests are always welcome. Alternatively feel free to reach out if you would like to fund the time to add improvements to the plugin!

@PatriViaut
Copy link

@danmarsden Hello! Question: Do you have an example of the data that should be included in the CVS because it does not work for me? Thank you.

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

No branches or pull requests

3 participants