Each user on a Moodle site has a profile with his/her photo.
For example, yours is:

But I don't think there is any way to add this automatically to a Moodle database activity?
It would need a field similar to ##user## returned from the database - maybe ##user_image## but this would have to be an addition to the database module.
For example, yours is:

But I don't think there is any way to add this automatically to a Moodle database activity?
It would need a field similar to ##user## returned from the database - maybe ##user_image## but this would have to be an addition to the database module.
I like the idea of having a ##userpicture## tag available for the database activity module. I have created MDL-20053 and attached a patch which I believe is functional. Those interested in this feature are welcome to watch and/or vote for the issue. For the bold, feel free to try the patch and provide any feedback by adding a comment to the tracker. Peace - Anthony
Hi Anthony,
that is a great idea.
I would have another idea for the database module:
Add the possibility to assign roles to the fields so that some fields only can be filled out by teachers, after a student has created an entry or that students can edit a field the teacher provided. So you can create complex exercices.
What do you think about that?
Yours,
David
that is a great idea.
I would have another idea for the database module:
Add the possibility to assign roles to the fields so that some fields only can be filled out by teachers, after a student has created an entry or that students can edit a field the teacher provided. So you can create complex exercices.
What do you think about that?
Yours,
David
David - I always enjoy new and creative ideas. Your idea sounds interesting but I am wondering how it might actually be used. In terms of implementation, it would just be a matter of adding a field to the data_fields table. I started looking at what would be needed to require a field and this would seem to be take off on that in so far as it is a type of field that is to be completed by the teacher. Essentially we could use the data manage activity capability (or create a new one) such that if the user has that capability then they can complete it otherwise they just see the value of it. To a limited degree, this might also be accomplished by adding a field but not showing it on the add record template. The disadvantage would be that the teacher would not have an easy way of editing or adding their data since editing a record also uses the add template. I personally do not envision this being something useful in core but it could be a nice little patch. Some possible scenarios explaining how this feature could be actually beneficial may be helpful in changing that personal opinion. Peace - Anthony
Hi Anthony,
yes I think you are right, that this would not be useful for many. I was just thinking, that this could be nice for example for administration purposes. The teacher could upload a certificate to a record created by a student. Or that some information entered in a record is only visible to the teacher (confidential) but all other fields are visible for all the students, ...
But there is another point perhaps more important: I develop courses for teachers like "Learn how to use moodle in your class". I personally like the database module and use it often instead of a wiki, because it is easier to use for the students.
Nevertheless teachers do not use the database tool for one specific reason: It is too complicated to create.
The solution would be a database creation wizard (Create your database in 5 guided steps)
1) Choose the fields you need
2) Now the fields chosen appear and you are asked to choose the ones appearing in list or single view, including checkboxes for the ##user##, ##...##
Example (instead of yes/no use checkboxes)
3) Choose display mode for list view (For 99% of the use of database 5 different display modes are enough)
First display mode: Fieldname as title of columns, records below. The teacher can choose to alter the name of the columns
Second display mode: Just group the records and display one below the other
Third display mode: Drag and drop the possible fields in a given matrix
Fourth display mode: manual template: Create your view with the editor (as it is now for html experts)
Fifth display mode: display records horizontally.
4) Choose the default display order of list view (sort by date, title, username, etc)
5) Choose style template (three styles available)
But perhaps this wizard takes too much time to program?
Another idea for the database: possibility to define certain fields as "required". Now you can submit a record with empty fields, this should not be possible if a field is required
Yours,
David
yes I think you are right, that this would not be useful for many. I was just thinking, that this could be nice for example for administration purposes. The teacher could upload a certificate to a record created by a student. Or that some information entered in a record is only visible to the teacher (confidential) but all other fields are visible for all the students, ...
But there is another point perhaps more important: I develop courses for teachers like "Learn how to use moodle in your class". I personally like the database module and use it often instead of a wiki, because it is easier to use for the students.
Nevertheless teachers do not use the database tool for one specific reason: It is too complicated to create.
The solution would be a database creation wizard (Create your database in 5 guided steps)
1) Choose the fields you need
2) Now the fields chosen appear and you are asked to choose the ones appearing in list or single view, including checkboxes for the ##user##, ##...##
Example (instead of yes/no use checkboxes)
List view |
Single view |
|
Show username |
yes/no |
yes/no |
Show the date the record was made | yes/no | yes/no |
Show the field "Uploaded File" | yes/no | yes/no |
Show the field "title" |
yes/no |
yes/no |
3) Choose display mode for list view (For 99% of the use of database 5 different display modes are enough)
First display mode: Fieldname as title of columns, records below. The teacher can choose to alter the name of the columns
TITLE |
Uploaded file |
Username |
Date uploaded |
Content of the field "title" |
Uploaded file |
example name |
date1 |
Content of the field "title" | Uploaded file | another name |
date2 |
Second display mode: Just group the records and display one below the other
Third display mode: Drag and drop the possible fields in a given matrix
Fourth display mode: manual template: Create your view with the editor (as it is now for html experts)
Fifth display mode: display records horizontally.
4) Choose the default display order of list view (sort by date, title, username, etc)
5) Choose style template (three styles available)
But perhaps this wizard takes too much time to program?
Another idea for the database: possibility to define certain fields as "required". Now you can submit a record with empty fields, this should not be possible if a field is required
Yours,
David
David - For your first use scenario of a teacher needing to give a certificate, I first thought of using the advanced upload assignment type. A student submits something and then the teacher responds by uploading a certificate. But I could see from that example how allowing certain fields to be completed by a teacher only could be helpful.
I see your ideas on templating as expanding the options for default templates. It would be nice to have that be a plugin where the wizards could just be dropped in. That would allow folks to develop options beyond some of the simple possibilities.
As for the required field, check out MDL-5583 and feel free to watch/vote for it. I started work on it but dealing with how to actually require the form became a mess and I have not had a chance to get back to it. I have a patch in MDL-11400 which creates the tick box and if I recall will highlight it so that it says it is required but it does not actually require it. Keep the ideas flowing.
Peace - Anthony
I see your ideas on templating as expanding the options for default templates. It would be nice to have that be a plugin where the wizards could just be dropped in. That would allow folks to develop options beyond some of the simple possibilities.
As for the required field, check out MDL-5583 and feel free to watch/vote for it. I started work on it but dealing with how to actually require the form became a mess and I have not had a chance to get back to it. I have a patch in MDL-11400 which creates the tick box and if I recall will highlight it so that it says it is required but it does not actually require it. Keep the ideas flowing.
Peace - Anthony
Hi Anthony,
yeah another ideo would be, that in the "Admin-Block->Modules->Database->Settings". The Admin of the Moodle Site can choose some database fields like skypename, username, or anything else to be displayed in the database with ##userprofilefieldname## or so. Other suggestions: subscribed courses, etc.. with ##subscribedcourses##. So for security reasons the admin can choose what the teachers can choose....
Thanks for posting the other issues, I just voted for them.
Yours,
David
yeah another ideo would be, that in the "Admin-Block->Modules->Database->Settings". The Admin of the Moodle Site can choose some database fields like skypename, username, or anything else to be displayed in the database with ##userprofilefieldname## or so. Other suggestions: subscribed courses, etc.. with ##subscribedcourses##. So for security reasons the admin can choose what the teachers can choose....
Thanks for posting the other issues, I just voted for them.
Yours,
David
Thank you, Anthony, for providing a patch. Sorry, that I didn't respond earlier. Although I subscribed to this forum, I have not received any forum digests. I am not sure whether I am bold enough to try out your patch, but I like the idea that it may be possible in Moodle 2.0.
With kind regards,
Hartmut
With kind regards,
Hartmut
Hartmut - It is curious that you did not receive the post. You may also want to start by reading Development:How_to_apply_a_patch. If you have questions about how to test the patch just let me know. Peace - Anthony
Hi Anthony,
Today we updated to Moodle 1.99. When TMDHosting tried to apply the patch for adding user pictures to any database activity, they received the error message:
can't find file to patch at input line 25
Is this patch working in Moodle 1.99? How can I apply this patch to an Apache server with PHP 5.2.11?
Any help is highly appreciated.
With kind regards,
Hartmut
I think that MDL-20140 would take care of making the email field available. I had commented on that issue that some care will need to be taken so as not unwittingly reveal personal information about a person that is not readily available by viewing their Moodle profile so we will need to do the same checks. You may want to watch and vote for MDL-20140. Peace - Anthony