Add parents to a course offering via Valence - desire2learn

According to the Valence documentation there doesn't seem to be a way to add parents to a course offering via Valence. I see that the Course.CreateCourseOffering doesn't have options for parents nor does it's Course.CourseOfferingInfo used for updating a course offering. For the Course.CreateCourseTemplate there is an option for parents. I also see that with OrgUnits there are options for this with structure, but I don't see anything for Course Offerings.
The Org Unit Editor in D2L itself does allow me to add parents to a course offering, but I would like to do so through Valence. Is this possible?

You can add parents or children to an arbitrary org unit (including course offerings) with one of:
http://docs.valence.desire2learn.com/res/orgunit.html#post--d2l-api-lp-(version)-orgstructure-(orgUnitId)-children-
http://docs.valence.desire2learn.com/res/orgunit.html#post--d2l-api-lp-(version)-orgstructure-(orgUnitId)-parents-
You still need to create the other org unit or have it created already before calling one of these.

Related

Umbraco 8 - hide Member Groups

Can anyone advise if and how I can hide the Member Groups folder within Members in Umbraco 8 for a specific user group?
Failing that, can I give users access to the members section but prevent member group deletion?
thanks
From an API point of view this can be done now with events so it would be up to you at a granular level to decide what rules are applied to hide properties. You can subscribe to the event EditorModelEventManager.SendingContentModel and modify the outgoing model which means you can add/remove tabs/properties, and pretty much whatever you want. If you wanted to pursue that without modifying the core It would also be possible to create a package to have some UI to control these rules if you wanted.

Subgraph access control

In the official Documentation (3.1: http://neo4j.com/docs/operations-manual/current/security/authentication-authorization/subgraph-access-control/)
It is said
"For example, a user can be allowed to read, but not write, nodes labelled with Employee and relationships of type REPORTS_TO"
But nowhere it's written in this page and others how to do it.
With the "call dbms.procedures()" we can see many more function in the enterprise edition but nothing about defining this Subgraph control
We think on changing the an enterprise edition, but if we are sure to be able to do that.
Can anyone explain me or gives me the address of the relevant documentation
Thanks
The documentation is all right there. Note the first sentence:
Through the use of user-defined procedures and custom roles, an
administrator may restrict a user’s access and subsequent actions to
specified portions of the graph.
The approach seems to be, for users without write permission, create roles for them as appropriate, then create (or use existing) user-defined procedures to do what operations they are allowed to do. Then configure the permissions of the procedures to the appropriate level, and associate the roles of the procedures (by modifying dbms.security.procedures.roles) with the roles you previously created. This allows the procedures you created to be executed by the roles you associated it with.
For example, given an HR user, who does not have write permissions, you could create a procedure to create or delete a :REPORTS_TO relationship between :Employee nodes. The procedure would need to be set to mode=WRITE since it needs write access. This would normally not be executable by this HR user, since they don't have write permissions.
But if you created a role, say 'hr', and added that role to this user, and set the procedure to be accessible by the hr role in dbms.security.procedures.roles, then the hr user could execute this procedure, and it would perform the necessary write operations.
In summary, Neo4j's subgraph access control isn't defined on the nodes or labels themselves, nor does it apply when executing write statements in Cypher. This access control is specific to user-defined procedures, and allows users with certain roles (where that role is associated with those procedures) to execute those procedures even if they normally would not be able to due to their access level.
EDIT
One final thing that could work for you...Neo4j has a means of registering transaction event handlers that can perform checking and logic on a transaction in progress, and reject if some criteria are not met. I would assume you could get a user's roles here, and probably check the transaction for writer operations on certain labels. Odd that this wasn't referenced in the securing the subgraph section of the documentation. I haven't tried this approach myself (I'll try my own testing later) so I'm not sure if it will fulfill what you need, but it's worth a look.
UPDATE:
It's been awhile, but we do have a more comprehensive means of access control coming to the upcoming Neo4j 4.0.
4.0 will include schema-based security, full ability to define, per user and role, the ability to grant or deny various levels of permissions (read, write, traverse, and more) for nodes and relationships of specific types. So for example you can have various roles that only have visibility on certain kinds of nodes, or are specifically denied visibility on others. You can also restrict whether certain nodes can be traversed through at all.
This should fulfill the needs of everyone who has been waiting for a more comprehensive security and access solution in Neo4j.
Here's the Neo4j 4.0 MR2 documentation, more to come as we approach the official 4.0 release!

Where best to create company wide groups in OFBiz?

I am trying to create branches of a company (and then hopefully teams within branches) in Ofbiz. I had a look at the HR app, and whilst it does list a company and some departments and other stuff in the main view, I haven't been able to find a way to modify this org tree to remove or add to it. The only thing I can think off is to delete/modify this information in the DB, but I'd rather not resort to such tinkering (if it is indeed actually possible to do it this way)
This can be done with Relationsships in the Partymanager application.
(See https://localhost:8443/partymgr/control/EditPartyRelationships?partyId=Company if you're running a local default installation)

How do I use the Desire2learn Valence API to enroll a student in a course?

In trying to automate a workflow, how do I use the D2L REST API to enroll a student in a course?
D2L works on enrollments that are a tuple of the user, the role and the course or org structure (orgunitid represents course or a structural element like a department or faculty). The call to create these enrollments allows you to specify all these values, and other calls allow retreival of the ids for users or courses.
Most often developers need to search by course code, but that is not possible directly on version 9.4.1 or version 10.0 so you will want to locate the d2lid from the course code in the calling code (this course code search is covered in other questions as well).

What is IdentityPart in Orchard CMS good for?

I havent found any mention in Orchard documentation about IdentityPart despite it being used in some main modules like Comments. I took a look at some relevant sources, but it didn't help me to fully understand it's purpose.
So what's it for and when should I use it?
Thanks in advance!
This is part of the import/export feature. In order to be able to move contents around servers reliably and in a repeatable way that takes into account updated and new items, we need a way to identify content items that's not just a simple id. Some contents have a path but not all types do (widgets, users, etc.). The export/import hooks for any part can participate in building the id of the item and in recognizing it on import. The routable part for example implements the use of path. But for those types that do not have routable, you can add the IdentityPart to fulfill that role. The id that gets exported in the end is a composite of all contributed ids.
Makes sense?

Resources