Example #1
0
 /**
  * View marks of locked assignments
  * Enter description here ...
  */
 public function assignmentAction()
 {
     $this->_helper->viewRenderer->setNoRender(false);
     $this->_helper->layout()->enableLayout();
     //        $authInfo = Zend_Auth::getInstance()->getStorage()->read();
     //        $department_id = $authInfo['department_id'];
     //        $degree_id = $authInfo['degree_id'];
     //        $semester_id = $authInfo['semester'];
     //        $rollno = $authInfo['user_id'];
     /**
      * 
      * @todo dynamic entry of fields
      */
     $department_id = 'CSE';
     $degree_id = 'BTECH';
     $semester_id = '6';
     $rollno = '2308001';
     $name = 'Prarthana';
     $this->view->assign('name', $name);
     $this->view->assign('rollno', $rollno);
     $this->view->assign('sem', $semester_id);
     $this->view->assign('degree', $degree_id);
     $this->view->assign('deptt', $department_id);
     $model = new Acad_Model_Assessment_Assignment();
     $result = $model->fetchMarks($department_id, $degree_id, $semester_id, $rollno);
     $this->view->assign('marks', $result);
     /*$response->page = $this->gridparam['page'];
       $response->total = $this->total_pages;
       $response->records = $this->_count;*/
     /*  
             foreach ($result as $key => $row)
             {
                 $response->rows[$key]['id']=$row['test_info_id'];
                 $response->rows[$key]['cell']=array(
                                                 $row['test_id'],
                                                 $row['subject_code'],
                                                 $row['subject_name'],
                                                 $row['max_marks'],
                                                 $row['pass_marks'],
                                                 $row['marks_scored'],
                                                 $row['status']);
             }
             $this->_helper->logger($response);
             echo $this->_helper->json($response);*/
 }
 /**
  * fetches the schedule of unlocked assignments
  * date of conduct refers to date of submission
  */
 public function assignmentAction()
 {
     /* $authInfo = Zend_Auth::getInstance()->getStorage()->read();
         $department_id = $authInfo['department_id'];
         $degree_id = $authInfo['degree_id'];
         $sem = $authInfo['semester'];
        $id = $authInfo['user_id'];
         $values = array('department_id'=>$department_id,'degree_id'=>$degree_id,'semester_id'=>$sem,'user_id'=>$id);
         $model = new Acad_Model_Assessment_Assignment($values);
         $schedule = $model->fetchSchedule();
         
         
         
             $result = array();
             //$header = $result[$schedule->getTest_type_id()][$schedule->getSubject_code()][$schedule->getSubject_name()];
             foreach ($schedule as $key => $value) 
             {
             $result[]=array($value->getTest_info_id(),
                             $value-> getTest_type_id(),                            
                             $value->getTest_id(),
                             $value->getSubject_code(),
                             $value->getSubject_name(),
                             $value->getDate_of_conduct(),
                             $value->getTime());
             }
             $this->_helper->logger($result);
             echo $this->_helper->json($result, false);*/
     $department_id = 'CSE';
     $degree_id = 'BTECH';
     $semester_id = '6';
     $rollno = '2308001';
     $name = 'Prarthana';
     $this->view->assign('name', $name);
     $this->view->assign('rollno', $rollno);
     $this->view->assign('sem', $semester_id);
     $this->view->assign('degree', $degree_id);
     $this->view->assign('deptt', $department_id);
     $model = new Acad_Model_Assessment_Assignment();
     $schedule = $model->fetchSchedule($degree_id, $department_id, $semester_id);
     $this->view->assign('schedule', $schedule);
 }