Trying to control course content visibility to a moodle group - moodle

I am using moodle 2.2.4.
I have students in a course from district 1 and district 2. I have a request that the student in district 2 be assigned an advisor in the course. The advisor must only see the data of the student in district 2.
This is how I am trying to accommodate the request.
I created a new role called advisor based on the student role.
I created a new group in the course called group1.
I created a new account called group2_advisor
I enrolled group2_advisor in the role of advisor into group1 in the course.
I moved the student into group1.
When I log in group2_advisor, I can see just the district 1 student (which is great), BUT, I still see district 1 data when I click on the forum or quiz activities.
I initially based the advisor role on the non-editing teacher role, but that still showed both districts even after I had completed steps 1-4. When I based the advisor role on the student role I was only able to see the district 2 data (which is what i am after).
Any insights are very much appreciated.

Look at Moodle group default feature group content visibility.

Related

Taking the Name of the ROLE the user is in and populating it to a pick-list on the Opportunity

My customer has created roles with the names of the company's business divisions and sub-divisions. He wants to take the role the creating user is in, along with the next level up Role and populate that into two fields on the opportunity, to then use those two fields. (ROLE and SUB-ROLE) as Dashboard filters. Since the role is in the setup section and is also not a field on the user record, I'm assuming some type of Apex Trigger or Flow would be needed to take the role names of the creating user and then insert them?
They are new to Salesforce.. they have not tried anything yet.

Strapi add extra field in the relationship table

I am using Strapi for my application. I am using Postgres as a database. There is user table. I want to create a Teams table linked with Team Leaders and Team Members related to users table. I added team name, team code, and Team Leaders(Relationship field -> Many to Many Relationship), Team members(Relationship field -> Many to Many Relationship)
After I did this, My table fields look like this,
Teams,
Id, name, code
teams_team_leaders__users_team_leaders
Id, Team id, User id
teams_team_members__users_teams
Id, Team Id, User id
But here I wanted to add one extra field (custom_role) in the teams_team_leaders__users_team_leaders and teams_team_members__users_teams table. Is there any way to add a new field/column into Relationship tables?

Database optimization for subscriptions and activation codes

I wonder about the structure of the database and how it should be designed optimally.
Problem:
An application for publishing books, books is added by the administrator. There is a Cooperator module, when publishing a book to the platform, you can add a Cooperator. Cooperator has activation codes. The activation code allows the user to access content that has been tagged with a given Cooperator. You can purchase a subscription, a subscription gives you the opportunity to access books without the specified Cooperator. I do not know how to solve it correctly from the database side, to make it as optimal as possible, in addition, if the user does not activate the Cooperator code, he should not see these books at all.
Actual Database:
Book Entity:
Date Created
Date Updated
Id
Name
Categories
Cooperator
Cooperator Entity
Date Created
Date Updated
Id
Name
CodeBatches (One to Many)
Code Batche Entity:
Date Created
Date Updated
Id
Name
Access In Months
Cooperator (Many to One)
CodesActivation (One to Many)
Code Activation Entity
Date Created
Date Updated
Id
Status
Activation Code(Unique)

How to relate entities - users with multiple roles

I have 3 entities to represent Users, Roles and Conferences
So far I got this diagram:
So,
-A user can be associated with zero or more conferences.
-A conference may have one or more users.
and...
-The same user can have different roles depending on which conference he is.
but...
-How can I improve the diagram so i can see the different roles of a user in all the conferences he has attended?
[UPDATE]
From your description it sounds like users belong to roles, and then the combination of userRoles belongs to a conference. So, without the fancy diagram, your entities would be something like this...
Users
Id
Roles
Id
Conferences
Id
UserRoles
UserId
RoleId
ConferenceUserRoles
ConferenceId
UserId
RoleId
You may need to add a "UserRoleId" to UserRoles and use that in ConferenceUserRoles. I'm not exactly sure how EF will handle the three-way relation table.
Hope this helps!

OO Design and the data model for change log function

: EJB 3, JPA (EcipseLink) and Oracle Database
An application has two entities: Group and Person. There is a one-to-many relationship.
The requirement is, that every changes of Group and Person must be saved for later to roll or show.
The 1st idea:
make the id and timestamp of the change/create as a composite primary key for Group and Person.
Every change will create a new object with the same id and new timestamp. For Example, a Group hat been changed, then create a new Group. but the relationship between Group and Person unchange. Here hat a problem: the constrait "one-to-many" will breaked!. Now one person hat the relation to two groups with the same id.
The 2nd idea:
for Group and Person create two another Entities GroupArchive and PersonArchive. In Group and Person only the lastest Infomation. Any changes will be copied and saved to Archive Entities. Between Group and GroupArchive hat a one-to-many relationship. And same for Person and PersonArchive.
Are my ideas realizable? Has anybody a better idea?