How To Use Assets Manager For Js Inside Php

For example this wiki article:

Here it is the php view with a script inside.

There are some php code for render another view.

How can I publish this script using Assets Manager?

<script type="text/javascript">

// initializiation of counters for new elements

var lastStudent=<?php echo $students->lastNew?>;


// the subviews rendered with placeholders

var trStudent=new String(<?php echo CJSON::encode($this->renderPartial('form/studentRow', array('id'=>'idRep', 'model'=>new Student, 'form'=>$form), true));?>);



function addStudent(button)







function deleteStudent(button)