Adding unique identifiers automatically

Adding unique identifiers automatically

Lisa McIver -
回帖数:2

Hello all

We're using Moodle 2.6 (soon to be Moodle 2.8).  An academic has just asked us whether there is a way of having Moodle automatically add a unique identifier to each record entry - can anyone advise whether this is possible?  I assumed it would be, but I can't see a way of doing this.

Many thanks in advance,

Lisa

回复Lisa McIver

Re: Adding unique identifiers automatically

Itamar Tzadok -

Each record entry has the DB record id which is unique not only in the activity but also between all Database activities on the site. But afaict the Database activity doesn't give you a way to display it.

The Dataform module allows you to display that entry id by the pattern [[entryid] ]. There also used to be a specialized field type which allowed you to store a unique id for each entry and also configure it to a certain size, prefix etc.

hth 微笑

回复Itamar Tzadok

Re: Adding unique identifiers automatically

Lisa McIver -
Drat.  I was hoping to avoid any additional plugins.

Never mind.  Thanks for the quick response - much appreciated. 微笑