Intranet with custom Workflows in OpenAtrium/Drupal - drupal

I've been reading about building an intranet site with different frameworks and I've found Open Atrium to be a great alternative since it's naturally oriented to that use.
I'd love to add some custom workflows associated with personnel management, for example, each team member gets a reminder every Friday to fill out a form with the hours of the week dedicated to each project. Once submitted, the role 'administrator' gets notification of all the forms received and of those not received, the details of each one and the sum of hours per
project. Any insight on how to proceed with this implementation would be greatly appreciated.
I've searched but haven't found a module that has this kind of workflow. How would this be implemented with cck, views or fields?

I would use the Rules module to create the first part: emailing users to remind them to fill in their forms. The rules module has a 'Send mail to all users of a role' action which you can use.
I would use the Views module to create a new view of the filled in forms (which I assume will just be nodes of a certain content type) and make that view accessible only to the administrator in the view's 'Access' section. Views are quite powerful, and you'll probably be able to do most all of what you require with them, but it's hard to be more specific without knowing which version of Drupal you're using and any more details about the problem (such as, will this form users are filling out really be just a node or a webform?). As an example of a views feature: if you go to add a field to your view, you should be able to see a ' Global: Math expression' field, where you can do things like add previous fields together, etc.
On the other hand, if you use the Webform module to build the form users have to fill out, that can send an email automatically each time it's submitted and the responses can be downloaded into an excel file by the administrator to manipulate further.
Hope some of those ideas help!

Related

How to extend existing pages, such as Customer or Shopping Cart, through plugins?

I've read everywhere that it's better to write new plugin than touch the core code. The problem is that I've not been able to find documentation where it's explain clearly how to modify pages from the plugin.
The way I understood it, to display partial pages from the plugin, one needs to tells where to display them by return using this method:
public IList<string> GetWidgetZones()
But if you return more than one zone, the widget will be displayed in multiple zones. What if I want to display bit of information on different zones?
To start off, I'd like to extend the the Customer page. The menu on that page has 7 items: customer info, addresses, orders, downloadable products, back in stock subscriptions, reward points, and change password.
I'd like to add 2 more items: personal info and connections. When personal info is clicked, the customer will able to add extra info, such as his/her photo. When the connections is clicked, user would be able to see what other have been doing.
Can someone point me to the documentation that explain how one can extend existing pages, such as Customer and Shopping Cart, without touching the core code.
Thanks for helping
I have read people saying do modifications as much as using plugin. But in practical i do find modifying core logic is one good way to find elegant and less complex way of customizing to our need.
Because, plugins only provides up to a certain limit of modification. In your case, widgets can be extended. But i don't think customer detail page can be extended using plugins. based on your requirements, you may need to add additional columns/attributes for customers. Yes, you can add/remove columns while installing/removing plugins. But in practical, any user in admin can uninstall a pluign. Think if this happens in PROD. Also you have not elaborated about connections.
I have done 250+ custom modifications (to suite our need) on core nopcommerce for my organization over the period of 2.5years. I started with nop 2.65 then moved to 2.80 and then moved to 3.20. Its bit complex to upgrade nop commerce versions on top of our custom modifications. But i can be done, if you are organized from day one.
Here are few rules i follow,
Keep a detailed custom modification list in excel.
Always update code in such as way that new feature can be managed from admin. Example: if you add a new menu in the header, just make sure it can be shown/hidden under admin settings. And this helps to contribute back to nop commerce if possible.
Use a good database Diff tool.
Use version control.
So when a new version of nop is released, i quickly compare my excel with release notes. for migration details see here

Defining structure for content in drupal

I am trying to create a site that will enable users to publish their projecs and enlist other people to join their project.
A user should be able to list a project, specify certain attributes (name,description, etc..).
There are few things i'm having trouble with.
First, by default publishing content is refered to as "content", i dont want a user to "add new content" but rather to "list new project".
Second, a project should have certain attributes, some optional and some mandatory, rather then the default title and body,
users should later be able to filter by these attributes when searching for projects.
is there a way to define the structure of content?.
Third, a user should be able to apply to a project, if he applies, the owner of that projects should receive the appliance, and accepte\reject.
In case he accepts, the users profile should be added a record that he is part of that project.
I am completly new to Drupal, and CMS in general.
My main expertise is with java, and I initially thoght about building the site with a java REST api in the backend and angular js in the frontend, but I have 0 experience with security and dodn't know how to do the user authentication and session management.
So I am currently trying out Drupal.
Is Drupal the right solution?
If so, how should I approach the requirements specified above?
Drupal (assuming that you are talking about version 7 since 8 is still in beta) is pretty powerful CMS, with a lot of (free) modules allowing it to expand it's possibilities.
When you are in back-end under Structure -> Content types you can see all available content types defined. There is also link "Add content type" which you can use to define your own. That basically means you can add any fields in any types you want. If you don't see the field type you need there is a big chances that there is a module which adds that field type so you just have to install it. You can also remove body (hide it actually), but title must remain (but you don't have to show it on front-end).
There is a "node reference" field type, but you have to install a module for it: https://www.drupal.org/project/references
So you can create dependencies you like.
And that "add new content" is just a link - you can create your own, set title as you like, just keep the same path. You can also set different theme for (some) admin pages if you want them to look differently. Under Structure -> Menus you can even edit admin menu, add new link and stuff..
Drupal is a bit heavy on resources, because of it's complex structure and database abstraction. For static content just turning on (built in) caches will help, but generally adding some additional caching mechanism won't hurt.

User Access and displaying fields based on user type

I have a website written in ASP.NET using VB. Users log into this site. There are many different types of users based on the department. Depending on the type of user, we need to have certain things displayed for some user types and other things display for other user types. I would like to have a system of displaying things based on that user type but not have a bunch of IF statements if possible. Currently we have a folder for each user type that has pages that are using a master page for that type. Those pages in come cases use user controls but in other cases do not. When they do not use user controls, we are getting duplication of fields across many of the pages. This is making maintenance and enhancements time consuming. The bad part is, if I were to put for example 'Contact Information' in a user control, not all of the contact information would be displayed for each type of user. Some types of users have somethings and other types of users have other things.
Please keep in mind, one of the main problems we have is, this website is already very large so I cannot completely redesign it at this time.
Does anyone have any strategies or resources I can look at to develop a really great and organized way of doing this?
While you can put a web.config in each folder to control access to each folder, this does not solve your issue with the UserControl. You will have to use IF statements in that control. But that doesn't seem like a big deal. It's just one control.
Controling security with web.config

Different registration forms for different types of users

This is my first time building a site with Drupal (7). I have plenty experience with LAMP, HTML/CSS and javascript, but I want to make sure I am doing things the 'Drupal way' before I start hacking together a custom solution unnecessarily. I've searched forums and modules, but have come up empty.
The site I am building will have different tiers of users: students, teachers, and parents. The difference between these users is:
The information collected during registration, and
The pages the user's have access to.
I think at least part of the solution lies with creating roles for each type of user, but it seems Drupal only has one registration page for all users. How would I create a different registration form for each type of user? What is the 'usual' way of assigning roles to users automatically?
I know this is late the game here but I thought I might refer people to the "Rules" module... Instead of thinking about this from the "user-specific" registration form perspective, think of it instead from the perspective that you still have only 1 form but with additional / optional inputs, whereby subsequent actions (rules) are then enacted upon depending on the values of said additional / optional fields.
You might also check this out, too:
how do i make diffrent registration form in drupal?
I'm just updating my answer as I see it didn't apply for D7.
I've just begun developing a D7 site with a similar request.
There seems to be a module which should fit perfectly, although I still have to try it:
http://drupal.org/project/profile2
Good luck with it.

Drupal reserve checkbox module?

I have a drupal site I'm working on here: selkirk.treethink.net
I have CCK and Views modules installed, so on the frontend you see the Request Work page created using CCK. On the backend admins and students can view all the work post through that form with the Views module.
I need to add a checkbox that the person submitting the work can't see but students can see in the page that lists the work through "Views". This checkbox will need to only be able to be checked once as it will reserve the job for that student. But the same student that checked it needs to be able to uncheck it...And only that student (or an admin)
In other words: Just a little box that sits on the "Views" page that a student can check and then no one else can uncheck it afterwards except the student that checked it or an admin.
Is there a module that can do this?
Thanks, Wade
My first thought when reading your question was Flag module. There is already a thread in the issue queue about exactly your question: http://drupal.org/node/624746. What it comes down to, is that flag can do most of the job, but you would have to write some code yourself (or possibly use the Rules module) to register which user flagged the node.
Another option would be to use the Workflow module and create an 'assigned' state. I have not done much with workflow myself so I can't really tell you which option is better.
The Field Permissions module lets you specify create, view, and edit permissions for CCK fields. I don't think it will do everything you want, but it's a start.

Resources