Course id/idnumber/shortname

Course id/idnumber/shortname

by Paolo Oprandi -
Number of replies: 4
Hi all,

In our University all courses have an id code. No surprise there. I put this code in the short name and the idnumber fields of the Moodle course. When coming from a course on the University's intranet to its corresponding Moodle course I look for the course code in the shortname field and convert it into the Moodle id. Is there anyway that I can use th University's course ids to reference the Moodle courses? (I am guessing this is why the idnumber field has been added).

Thanks a lot,
Paolo
Average of ratings: -
In reply to Paolo Oprandi

Re: Course id/idnumber/shortname

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Yep, you can reference courses by shortname like this:

http://moodle.org/course/view.php?name=Using%20Moodle

And in 1.5 you'll be able to use the idnumber as well:

http://moodle.org/course/view.php?idnumber=USING001

In reply to Martin Dougiamas

Re: Course id/idnumber/shortname

by Paolo Oprandi -
Hi, what happened to this? idnumber still seems to fail where name works. Any ideas?
Thanks, Paolo
In reply to Paolo Oprandi

Re: Course id/idnumber/shortname

by Paolo Oprandi -
In Moodle 1.5.2 line 16 of course/view.php should read:

 if (empty($id) && empty($name) && empty($idnumber)) {

rather than:

 if (empty($id) && empty($name)) {

Quite important me thinks...

Should I raise a bug report about this sort of issue?
Paolo
In reply to Paolo Oprandi

Re: Course id/idnumber/shortname

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
You caught it Paolo, thanks!

It has been solved in 1.5. Will be available in next daily build.

Ciao smile