Forum .LRN Q&A: Calendar (week instead of daily view)

Hi everybody,

is it possible to show the user a calendar view that is different to the daily view like weekly or monthly?

Greetings,
Nima

Collapse
Posted by Malte Sussdorff on
I discussed this with Martin and Oliver in Frankfurt. It should be possible if you extend the portlets functionality with a URL to call the current page with an additional parameter, that sets the daily vs. weekly format. The calendar portlet does this already with the "view" parameter, it should not be too much work to enable this as well in the daily-view portlet.
Collapse
Posted by Dirk Gomez on
Set the parameter it in the calendar-portlets' adp files.

And set up an enhancement request in the bugtracker, I'll add an parameter in 5.1 (or a user-dependant prefs table, I need to think about this and solicit opinions).

Collapse
Posted by Raad Al-Rawi on
Nima - If you are thinking of trying to set the default view on a per-user basis, take a look at this thread https://openacs.org/forums/message-view?message_id=121873

I found it was quite easy to set this up, and I can give you some pointers if you wish.

If it's a general site-wide setting, then it probably better to go with Dirk's suggestion and set it up in the package's files. Bear in mind you will have to set it in calendar-portlet/calendar-full-portlet.tcl, and calendar/view.tcl to be consistent.

<Raad>

Collapse
Posted by Nima Mazloumi on
Hi Malte, hi Dirk

thank you for your replies.
I looked at the /packages/calendar-portlet/www/calendar-portlet.adp file.

Depending on the view paramter the content of the portlet is redirected to

packages/calendar/www/view-one-day-display
packages/calendar/www/view-list-display
packages/calendar/www/view-week-display
packages/calendar/www/view-month-display

But where is the parameter view initially set to day so that I can change it to week?

Greetings,
Nima

Collapse
Posted by Carl Robert Blesius on
This should definitely be a user setting, where the default can be set by the package instance admin.

In .LRN that translates to:
Course admin should be able to set the default view for the class and give members the option to change the view (or not).

This reminds me of another calendar issue: permissions UI. In some cases it makes sense to allow all class/club members to post to the calendar in others it doesn't. I thought this could be set in the .LRN UI, but I can not find a permissions interface when signed in as a calendar admin.

Collapse
Posted by Oliver Emmler on
I agree with Carl but ...

I think there should be three types of portlets (Day, Week, Month-Summary) for the user. Admin or Prof may set the default.

The User should be able to add one or more of the above portlets to his/her portal.

So One User might want to see the day summary on the left side and the week summary on the right side.

Should be esier to produce a clone with different parameters for week and month.

Collapse
Posted by Raad Al-Rawi on
Carl - couldn't agree wih you more!
I think the way to go is user-preferences, but it's not obvious to me at this stage, how to set things up so that individual communities have their own settings which are also per-user. Perhaps the package_id holds the answer - do communities have unique "package_id"s?

Either way, there is quite a bit of integration work to specify (?standardise) these types of preferences, and get calendar (?and other packages) to recognise the presence of the user-preferences package and adjust the UI accordingly.

Regarding calendar permissions - I am certain there is no UI/functionality to allow ordinary member creation of events. I'd have used it myself otherwise!

This sort of thing would be very nice, and I think it points to a need for better permissions management.
Getting a bit OT, but imagine how cool it would be for a community administrator to define a role, assign it any number of standard permissions (add calendar events, manage news articles, etc.) and then assign the role to specific users within the community. Maybe for v 3.0 ;)

<Raad>