We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38190
    • 15 Posts
    Hello everyone!

    This is my second posting regarding the application I’d like to build and because of the Bob Ray’s reply at https://forums.modx.com/thread/72918/users-profiles-as-resources I’m still considering Modx even though it seems a bit complicated right now, but it will be a good way to learn about Modx complex features.

    So, basically the application it’s a network of students from different universities/ departments working together on some common projects.

    College1
    -Department1
    --Student1
    --Student2
    -Department2
    --Student3
    College2
    -Department1
    --Student4
    --etc

    I created the College/Department with normal Resources but StudentX has to extend somehow the UserX and have the following design (see StudentProfile-att1.jpg):
    -About: a basic introduction/ profile
    -Project: a daily log where the Student should write the current status of his/ her assignment
    -Contact: ways of contacting the Student, which should probably retrieved from the UserX profile, so we won’t duplicate content

    The problems I’m facing:
    1. Each UserX should be able to edit only his/ her resource StudentX. In order to do that I have to create an userGroup (userGroupX) and assign only the UserX to it, and the ResourceGroupX where StudentX resource has to be assigned to it. The network will have probably a couple of hundred students, so this has to be done programmatically through a plugin onUserFormSave system event, but I don’t know how to do that.

    2. I managed to create a basic Custom Resource Class following this tutorial http://rtfm.modx.com/display/revolution20/Custom+Resource+Classes but I don’t know how to customize it and have the tabbed structure in manager (see StudentProfile-att1.jpg) . The “Contact” tab doesn’t have to show up in the manager since will be populated with information from the User Profile.

    3. How can I add the already existing College/ Department structure to New User form field (see bottom of StudentProfile-att2.jpg) so that the ResourceX will be created under the desired College/ Department?

    I’d really appreciate if you can point me to the right direction and off course, if you can post some specific bits of code will be even better!