<commit_before><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Therapy_session extends CI_Controller {

	public function __construct()
    {
        parent:: __construct();

        $this->load->database();
        $this->load->helper('url');
        $this->load->helper('html');
        $this->load->library('session');

        $this->load->library('grocery_CRUD');
    }

    public function therapy_session_output($output = null)
    {
        $this->load->helper('form');

        $data['output'] = $output;
        $data['main_content'] = 'site/therapy_session_view';
        $data['user'] = $this->session->userdata('username');
        $data['al'] = $this->session->userdata('al');
        $this->load->view('includes/template', $data);
    }

	// Staff table is called frome here
    public function therapy_session()
    {
        // Loading view home page views, Grocery CRUD Standard Library
       // $this->load->view('templates/header');

        $crud = new grocery_CRUD();

        //$crud->where('enabled', 'N');

        $crud->set_theme('flexigrid');

        //table name exact from database
        $crud->set_table('therapySession');
        $crud->set_subject('Therapy sessions'); 

        // replace staff number with name of therapist
        $crud->set_relation('staffNo', 'staff', '{fName} {lName}', array('accessLevel' => '3'));

        // choose room number from list of rooms available
        $crud->set_relation('therapyId', 'therapy', '{therapyName} - {tType}', array('isOffered' => 'Y'));

        // choose the manager of the therapist
        //$crud->set_relation_n_n('managerNo', 'staff', 'staffNo', '');

        	        //give focus on name used for operations e.g. Add Order, Delete Order
        $crud->columns('sessionId', 'therapyId', 'staffNo', 'sDate', 'startTime', 'finishTime', 'enabled');
        	        //change column heading name for readability ('columm name', 'name to display in frontend column header')

        $crud->display_as('sessionId', 'Therapy Session Reference')
            ->display_as('therapyId', 'Therapy Name')
            ->display_as('staffNo', 'Therapist Name')
            ->display_as('sDate', 'Therapy Date')
            ->display_as('startTime', 'Therapy Start Time')<commit_msg>Code cleaning<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Therapy_session extends CI_Controller {

	public function __construct()
    {
        parent:: __construct();

        $this->load->database();
        $this->load->helper('url');
        $this->load->helper('html');
        $this->load->library('session');

        $this->load->library('grocery_CRUD');
    }

    public function therapy_session_output($output = null)
    {
        $this->load->helper('form');

        $data['output'] = $output;
        $data['main_content'] = 'site/therapy_session_view';
        $data['user'] = $this->session->userdata('username');
        $data['al'] = $this->session->userdata('al');
        $this->load->view('includes/template', $data);
    }

	// Staff table is called frome here
    public function therapy_session()
    {
        // Loading view home page views, Grocery CRUD Standard Library
       // $this->load->view('templates/header');

        $crud = new grocery_CRUD();

        $crud->where('therapySession.enabled', 'N');

        $crud->set_theme('flexigrid');

        //table name exact from database
        $crud->set_table('therapySession');
        $crud->set_subject('Therapy sessions'); 

        // replace staff number with name of therapist
        $crud->set_relation('staffNo', 'staff', '{fName} {lName}', array('accessLevel' => '3'));

        // choose room number from list of rooms available
        $crud->set_relation('therapyId', 'therapy', '{therapyName} - {tType}', array('isOffered' => 'Y'));

        // choose the manager of the therapist
        //$crud->set_relation_n_n('managerNo', 'staff', 'staffNo', '');

        	        //give focus on name used for operations e.g. Add Order, Delete Order
        $crud->columns('sessionId', 'therapyId', 'staffNo', 'sDate', 'startTime', 'finishTime', 'enabled');
        	        //change column heading name for readability ('columm name', 'name to display in frontend column header')

        $crud->display_as('sessionId', 'Therapy Session Reference')
            ->display_as('therapyId', 'Therapy Name')
            ->display_as('staffNo', 'Therapist Name')
            ->display_as('sDate', 'Therapy Date')
            ->display_as('startTime', 'Therapy Start Time')
{'fraction_non_alphanumeric': 0.16597781161627148, 'fraction_numerical': 0.00043506634761801175, 'mean_word_length': 2.886728655959425, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4430143', 'n_tokens_mistral': 1349, 'n_tokens_neox': 1300, 'n_words': 314}