List of participants / list of students as database activity field

List of participants / list of students as database activity field

by Sebastien Jaffredo -
Number of replies: 15

Hi

Is it possible to create a database activity in which one field would be a drop down menu containing the list of the course participants or the list of the students enrolled in the course ? This list ought to be dynamic, meaning when a student enroll or unenroll the drop down menu content would automatically change accordingly ?

Average of ratings: -
In reply to Sebastien Jaffredo

Re: List of participants / list of students as database activity field

by Itamar Tzadok -

Not possible in the standard module. Can added on with some development. The Dataform module has a similar feature which allows instructor to set the entry owner on behalf of students. What use cases do you have in mind? If a selected student is unenrolled, does the entry preseve the selection or reset it? etc. smile

In reply to Itamar Tzadok

Re: List of participants / list of students as database activity field

by Noah Freedman -

"The Dataform module has a similar feature which allows instructor to set the entry owner on behalf of students."

How do you do that?

In reply to Noah Freedman

Re: List of participants / list of students as database activity field

by Itamar Tzadok -

By the :edit option of the entry author pattern. In 2.6 onward it's the pattern [[EAU:edit] ]. In earlier versions it's ##author:edit##. In browse mode it works like the :name pattern, that is, displays the entry author's name linked to the user profile. When a teacher edits the entry, the pattern displays a dropdown of the course participants and selecting a participant will set the entry userid to the user id of that participant. smile

In reply to Itamar Tzadok

Re: List of participants / list of students as database activity field

by Sebastien Jaffredo -

Hi Itamar


Your proposition solved my problem beautifully, but now I'm facing another problem. I created a new role based on the Student role that better suits my needs for this course. The problem is : students under this new role don't appear in the dropdown menu generated by the field ##author:edit##. I'm under the impression this is not related to the permissions of this new role but rather that my new role is simply ignored in the dataform code. What do you think ? (this a 2.5 Moodle site)


Sébastien

In reply to Sebastien Jaffredo

Re: List of participants / list of students as database activity field

by Itamar Tzadok -

It takes the gradebook users, so if you make this new role a graded role (Administration > Site administration > Grades > General settings)  all users under this role will appear in the dropdown. 

Also good to know, you can add entries on behalf of users via the csv import. You can import the entry author by id, username or idnumber. This method allows you to assign any user on the site as an entry author, even if that user is not enrolled in the course where the Dataform activity resides.

For further Dataform questions and discussion we have now a designated forum at https://moodle.org/mod/forum/view.php?id=8192. See you there.

smile

In reply to Itamar Tzadok

Re: List of participants / list of students as database activity field

by Sebastien Jaffredo -

Hi Itamar,


Thanks for the answer.

What I'm trying to do: create a logbook in which each entry is a report created by a teacher T describing a lesson L about a student S.

The logbook is seen only by teachers (hidden to students).

Here's the context: different students and teachers are enrolled in a course. The course is not a real course but an interface used to manage private lessons. Teachers post availabilities using the Scheduler plug-in. Students book lessons using the same plug-in. Lessons are carried out through Skype. At the end of the lesson, the teacher writes a report. This report is structured as a form with the following fields:
- Author (the teacher->supposedly automatic)
- Date and time of the lesson (scheduled starting time)
- Name of the student
- Lesson number (First lesson, second lesson, etc. -> incremented from the previous one)
- Lesson content
- Advice for the next lesson
- Attached files

When the student books his next lesson with (possibly) another teacher, that teacher searches for the latest report of that student to prepare his lesson.

I am still not entirely sure about the best Moodle tool to use. I first tried with the "Note" function but it is too primitive.
I created a database which I think could work well enough. Still, I'm worried about the way teachers will populate the Student name fields. A simple spelling mistake could make the search difficult. Hence the idea of a field consisting in a drop-down menu pre-populated with the correct students names. Once a student is unenrolled, his name should disappear from the menu in editing context, but the entry should stay in the database and come out if you search that student's name.

Regarding dataform, I've just installed it but I'm still struggling with the basic use (I could create fields but I haven't found how to create a new entry). 
Now, if dataform enables the teacher to change the author name, I guess I could decide that "Author" is actually the student's name, and decide too that the name of the teacher appears as a field in the form. I won't have more than a dozen teachers at a time, so it could be a drop down menu that I edit from time to time when a new teacher joins.

I'm using Moodle 2.5 (cannot upgrade for the time being) and dataform 2.3
In reply to Sebastien Jaffredo

Re: List of participants / list of students as database activity field

by William Lu -
Picture of Particularly helpful Moodlers

Try Booking:

https://moodle.org/plugins/view.php?plugin=mod_booking

Then, your teacher never need to manually input anything, all done automatically smile

I used it a lot of, very reliable for any version.

HTH

In reply to William Lu

Re: List of participants / list of students as database activity field

by Sebastien Jaffredo -

Hi William


Thanks for the tip. Actually I did test the Booking module when I was looking for a reservation system. As it happens, the Scheduler plugin I am now using was fitting my needs better.

The reservation part is therefore not the issue: my problem is reporting about the reserved lessons once they're finished.

I'm looking for a tool that enables the teacher to make comments and add files about the booking after it's over, another teacher to easily look for and view this comment, while that comment is hidden to the student. I couldn't find anything in the Booking module that does that.

In reply to Sebastien Jaffredo

Re: List of participants / list of students as database activity field

by William Lu -
Picture of Particularly helpful Moodlers

Good, I love Scheduler as well.

I agree with you. Neither Booking nor Scheduler has comment and file function.

Then I am thinking to create a Database Module with an URL filed links to the reservation page, also have a file field and enable comments.

No so ideal, because you have to use 2 Mods. But for these combined 2 tasks, hope it can make do. 

In reply to William Lu

Re: List of participants / list of students as database activity field

by Sebastien Jaffredo -

Hi William


Thanks for your answer.

Scheduler does enable comments, but they are meant to be viewed by the student.

What it should have is an extra text area for each booking, labelled "Report" for instance, that would be seen only by teachers and managers. And an extra view displaying the reports.


I've just added a feature request on the tracker (https://tracker.moodle.org/browse/CONTRIB-5270). Feel free to vote for it (and spread the good word) if you think it's a good idea.


Cheers


Sébastien

In reply to Sebastien Jaffredo

Re: List of participants / list of students as database activity field

by Itamar Tzadok -
The default view template contains a pattern ##addnewentry## which should display a button to add a new entry. See . smile
In reply to Itamar Tzadok

Re: List of participants / list of students as database activity field

by Sebastien Jaffredo -

Thanks a lot for that Itamar Itamar ! The first steps were a bit confusing, but it doesn't take long to understand how the plugin works.

What happened was that the first view I chose was "Editon" (first on the list) and for some reason that view doesn't display anything. Actually, even when there are entries the default "Editon" view doesn't display them, not sure why (that's Moodle 2.5)

Now that I've spent quite some time working it out, I'm still stuck with one problem. Here it is.

I want 2 views, namely:

1- a list of all entries: a table with each entry on each row

2- a single entry view: one page showing all the fields for one entry only

What I'd like to do have is a link on each row of the view 1. When clicked, that link would point to view 2, showing only the corresponding entry.


Any idea how to do this ?


Thanks again for this great tool.


Sébastien

In reply to Sebastien Jaffredo

Re: List of participants / list of students as database activity field

by Itamar Tzadok -

The Editon view never fully worked. Its name is compelling, to be sure, which often makes it the first choice. It has been dropped from 2.6 in favour of better ways to achieve the intended effect.

I trust the you use the latest 2.3 version from git under the MOODLE_23_STABLE branch. It is as good as it gets before 2.6.

See this post for a custom view link. In 2.6 onward it is made easier in various ways, so upgrade your moodle as soon as you can.

smile

In reply to Itamar Tzadok

Re: List of participants / list of students as database activity field

by Sebastien Jaffredo -

That's splendid, thanks !  That was simple !

I was wondering what these letters meant. I had guessed that "D" stands for "default", now I know about "M". How about "E" ? My best guess would be "Embed"...

In reply to Sebastien Jaffredo

Re: List of participants / list of students as database activity field

by Itamar Tzadok -

D = Default

M = More

E = Edit

That was a way to set default target view for the Edit action and More action in the activity level. Didn't work very well and has been dropped in favour of patterns. The long term plan is to create a field type for entry action that would provide UI for setting the entry actions.

smile