Forum .LRN Q&A: Re: Changing Schedule Properties

Collapse
Posted by Dirk Gomez on

You need to change that in the calendar-portlet files.

E.g. have a look at calendar-full-portlet.tcl, you'll find this code snippet:

if {$view == "list"} {
    set sort_by [ns_queryget sort_by]

    set thirty_days [expr 60*60*24*30]
    set start_date [ns_fmttime [expr [ns_time] - $thirty_days] "%Y-%m-%d 00:00"]
    set end_date [ns_fmttime [expr [ns_time] + $thirty_days] "%Y-%m-%d 00:00"]

    set cal_stuff [calendar::list_display \
            -item_template $item_template \
            -date $current_date \
            -start_date $start_date \
            -end_date $end_date \
            -calendar_id_list $list_of_calendar_ids \
            -sort_by $sort_by \
            -url_template "?view=list&sort_by=\$order_by&page_num=$page_num" \
            -url_stub_callback "calendar_portlet_display::get_url_stub" \
            -show_calendar_name_p $show_calendar_name_p]
}

Change the end_date creation to whatever you want.

In what is DotLrn alpha (or beta?) there's a field "Show the next xxx days" that lets you choose how many days you want. May make sense to store that as a calendar-portlet parameter - but that is more like 5.1.