Hello there,
As part of a contract I'm currently doing for a French university (http://ensieta.fr), I have developed 2 minor (but interesting IMHO) features in the Database activity. I'm describing them in the next paragraph of this message. We need these features for an application we're setting up with Moodle. My question is simply: can these features go in the official code? Needless to say your answer will determine how I finish this development.
The 2 features are:
- A "Mandatory Field" option that can be set to almost every field of a database. If set, the user cannot save a db entry without those fields filled in. A message with the name of the missing fields is displayed when the save button is pressed.
- A "Can be modified by teachers only" option that can be set to every field of a database. If set, the fields marked with this option cannot be modified by a student. Instead of being editable, they're just displayed (followed by an explanation text).
Please let me know...
Best regards,
Laurent
BTW: Kudos to Martin and the Moodle developers. This is a great piece of work...
I added 2 minor features to the DB activity, could they go in the official code?
回帖数:8
回复Laurent Domenech
Re: I added 2 minor features to the DB activity, could they go in the official code?
回复Martin Dougiamas
Re: I added 2 minor features to the DB activity, could they go in the official code?
回复N Hansen
Re: I added 2 minor features to the DB activity, could they go in the official code?
OK, I have added a new issue: MDL-6821.
(BTW: sorry, I unknowingly set the priority to major, couldn't change it after.)
On both issues, I have attached the same file that resolves both issues (MDL-6821 and MDL-5583). If this is a problem, I'll take the time to separate the issues.
I didn't find the fr_utf8 files in the cvs branch. However, I do have the French translation for the changes I've made in lang/*/data.php.
For obscure reasons with the network here, I don't have a proper CVS access. The result is that I only tested this in my 1.6.2 and I copied the changes over the modified files downloaded through the CVS web interface at sourceforge. I have been very careful not to miss anything, and these features aren't too big, but I don't like it. If anyone can send me a zip with the full latest moodle files, I'll be glad to set up a new site and test what I've done with the latest version.
If anything is unclear or missing, do not hesitate to let me know.
Regards,
Laurent
(BTW: sorry, I unknowingly set the priority to major, couldn't change it after.)
On both issues, I have attached the same file that resolves both issues (MDL-6821 and MDL-5583). If this is a problem, I'll take the time to separate the issues.
I didn't find the fr_utf8 files in the cvs branch. However, I do have the French translation for the changes I've made in lang/*/data.php.
For obscure reasons with the network here, I don't have a proper CVS access. The result is that I only tested this in my 1.6.2 and I copied the changes over the modified files downloaded through the CVS web interface at sourceforge. I have been very careful not to miss anything, and these features aren't too big, but I don't like it. If anyone can send me a zip with the full latest moodle files, I'll be glad to set up a new site and test what I've done with the latest version.
If anything is unclear or missing, do not hesitate to let me know.
Regards,
Laurent
回复Laurent Domenech
Re: I added 2 minor features to the DB activity, could they go in the official code?
回复Martin Dougiamas
Re: I added 2 minor features to the DB activity, could they go in the official code?
回复Martin Dougiamas
Re: I added 2 minor features to the DB activity, could they go in the official code?
OK, I've looked at the new roles (great stuff BTW) and before I go on I thought I'd share with you what I'm thinking in doing...
Initially, the new option "Data can be modified" was to have these options :
by everyone (default)
by teachers only
by teachers and the owner only
by teachers and the owner's group only
From what I've read, this is what I would do:
1- Add a new capability to the Database module, called "Write Protected Fields", which means you're allowed to edit the protected fields of records. The capability would be granted to admins, course creators and teachers.
2- Add the "Data can be modified" with these options:
by everyone (default)
by users with the "Write Protected Fields" capability only
Let me know.
Regards,
Laurent
Initially, the new option "Data can be modified" was to have these options :
by everyone (default)
by teachers only
by teachers and the owner only
by teachers and the owner's group only
From what I've read, this is what I would do:
1- Add a new capability to the Database module, called "Write Protected Fields", which means you're allowed to edit the protected fields of records. The capability would be granted to admins, course creators and teachers.
2- Add the "Data can be modified" with these options:
by everyone (default)
by users with the "Write Protected Fields" capability only
Let me know.
Regards,
Laurent
回复Laurent Domenech
Re: I added 2 minor features to the DB activity, could they go in the official code?
Laurent, I'm the guy in charge of the french translation. If you need help, don't hesitate to contact me in the course Moodle en français.
Nicolas