7935 Posts in 1536 Topics by 943 members
Page: 1 2
|Go to End||Next >|
26 June 2009 at 1:18am
I have this many_many mentor-student relationship and I'm using the DataObjectManager module (ManyManyDataObjectManager) on the MentorPage to show related students.
Now it's possible to show only the related (checked) students by using the filter clause in the ManyManyDOM, BUT is it also possible to hide the checkboxes completely, so that one can view/edit the students, but CAN NOT remove the relationship (uncheck the checkbox)?
26 June 2009 at 2:16am
So no one can uncheck these boxes? Seems kind of limiting. I could definitely see adding a checkpoint for permissions that would disable/enable the checkboxes, but I don't think unconditionally turning them off is a good idea.
26 June 2009 at 3:23am
What I'm looking for is the following: suppose there are 10.000 students and they are assigned to the mentors outside the CMS (using front-end form) or through ModelAdmin. Would be nice though to only show the assigned students (say 10 or so) on the mentor page in the CMS and not all 10.000. This can be done easily by using the filter clause (show related students only), but then there are still check boxes, which is a bit weird and users could accidentally remove the relation by unchecking the checkbox and saving the mentorpage.
Sorry for the strange example, but I hope I explained the situation with it.
26 June 2009 at 3:41am
Understood, but somebody needs the privileges to remove that relation, right? So I think it would make sense to assign a permission level to the checkboxes rather than just remove them all together. A top-level admin should have the power to remove the relations if he wants.
26 June 2009 at 3:43am
Ah, yes, agreed!
26 June 2009 at 7:07am
UncleCheese, one more thing. It turns out that the filter clause is not that simple. I want to show only related students on a mentor page. I'm using this on 'MentorPage':
$manager = new ManyManyDataObjectManager(
$this, // Controller
'Students', // Source name
'Student', // Source class
'Name' => 'Name'
), // Headings
'', // Filter clause
'', // Sort clause
'' // Join clause
What filter clause do I need to show only assigned(related) students? Do I need a join with MentorPage_Students? I'm sorry but my knowledge is scarce on this point. Would be very (very!) nice if you could help, sorry for inconvenience, if any ;)
26 June 2009 at 7:40am
I don't believe that type of filter is possible at this point. I did, however, just check in the feature for adding marking permissions. You might want to give that a test.
26 June 2009 at 9:31am
Ok, thanks!!! Would there be another way to show only related Students on a MentorPage (i.e. by using something else than DOM?)
Page: 1 2
|Go to Top||Next >|