Remove "time" selection options

Remove "time" selection options

by Tom Adair -
Number of replies: 4

I want to remove the selection options from the session en reports tabs so that it defaults on All. Its confusing people and we do not need the other options due to the duration of the courses.

Can someone point me in the direction on what to remove / comment out where? Been looking, but its not as clear as I hoped smile Well that and I'm still fuzzy from a nasty sinus infection.

Can someone help me?

Average of ratings: -
In reply to Tom Adair

Re: Remove "time" selection options

by Luis Ramón López -

I suppose you are on the latest 4.3.0beta.

Try this: (warning, untested!)

  • Go to locallib.php and comment out lines 361 to 394 but not 391 & 392. This should get away the real session filter.
 //switch ($view) {
// case 'days':
// $format = get_string('strftimedm', 'attforblock');
// $startdate = make_timestamp($year, $mon, $mday);
[...]
// case 'all':
$startdate = 0; <- do not comment out
$enddate = 0; <- do not comment out
// break;
//}
  • Comment out 526 & 527. This should take away the controls.
  // echo "<td width=\"20%\" align=\"center\">$curdatecontrols</td>";
// echo "<td width=\"35%\" align=\"right\">$viewcontrols</td></tr></table>";

If it does not work, just let me now...

In reply to Luis Ramón López

Re: Remove "time" selection options

by Tom Adair -

Going to test this early next week, will get back to you on it.

Thanks for the help so far!

In reply to Tom Adair

Re: Remove "time" selection options

by Tom Adair -

Does exactly what I hoped for.

Going to let a few people test it tomorrow, but its looking good!

BIG Thanks!