To fix this, can I write the code below in view.php

    143                 $currenttime = new DateTime(date('c', time()));
    144                 $start = $DB->get_record('facetoface_sessions_dates', array('sessionid'=>$session->id));
    145                 $starttime = new DateTime(date('c', $start->timestart));
    146                 $interval = $starttime->diff($currenttime);
    147                 $diffdays =  $interval->format('%a');
    148                 $disableddaysDB = $DB->get_record('facetoface_sessions', array('id'=>$session->id));
    149                 $disableddays = $disableddaysDB->disablenewenrolldays;
    150                 $disableoption = $disableddaysDB->disableoption;

and pass $disableoption as an argument in (print_session_list_table) that is being called in line 182 and 192 in view.php