It can be more easily done by changing `assignment_info` function in `Assignment_model` to:
```php
	public function assignment_info($assignment_id){
		$query = $this->db->get_where('assignments', array('id'=>$assignment_id));
		if ($query->num_rows() != 1)
			return array(
				'id' => 0,
				'name' => 'Not Selected',
				'finish_time' => 0,
				'extra_time' => 0,
				'problems' => 0
			);
		return $query->row_array();
	}
```