Help with a interface atatched a database

Hello
I need to generate an interface that allows to massively manipulate the qualifications of the
students who take a certain subject. I have this part of my code in php that is in inscriptioncontroller.php

_ public function edit($id = null)
{
$inscription = $this->Inscription->get($id, [
‘contain’ => []
]);
if ($this->request->is([‘patch’, ‘post’, ‘put’])) {
$inscription = $this->Inscription->patchEntity($inscription, $this->request->getData());
if ($this->Inscriptions->save($inscription)) {
$this->Flash->success(__(‘The inscription has been saved.’));

            return $this->redirect(['action' => 'index']);
        }
        $this->Flash->error(__('The inscription could not be saved. Please, try again.'));
    }
    $this->set(compact('insc_iption'));
}_

https://book.cakephp.org/3.0/en/orm/saving-data.html#saving-hasmany-associations
https://book.cakephp.org/3.0/en/views/helpers/form.html#creating-inputs-for-associated-data

and this
https://book.cakephp.org/3.0/en/orm/saving-data.html#converting-hasmany-data