/**
  * entryoptions
  *
  * @param xxx $hotpot
  * @return xxx
  */
 public function entryoptions($hotpot)
 {
     $output = '';
     $table = new html_table();
     // define the date format - can be one of the following:
     // strftimerecentfull, strftimedaydatetime, strftimedatetime
     $dateformat = get_string('strftimedaydatetime');
     // show open / close dates
     if ($hotpot->entryoptions & hotpot::ENTRYOPTIONS_DATES) {
         if ($hotpot->timeopen) {
             $table->data[] = new html_table_row(array(new html_table_cell(get_string('timeopen', 'hotpot') . ':'), new html_table_cell(userdate($hotpot->timeopen, $dateformat))));
         }
         if ($hotpot->timeclose) {
             $table->data[] = new html_table_row(array(new html_table_cell(get_string('timeclose', 'hotpot') . ':'), new html_table_cell(userdate($hotpot->timeclose, $dateformat))));
         }
     }
     // show grading info
     if ($hotpot->entryoptions & hotpot::ENTRYOPTIONS_GRADING) {
         if ($hotpot->attemptlimit > 1) {
             $table->data[] = new html_table_row(array(new html_table_cell(get_string('attemptsallowed', 'quiz') . ':'), new html_table_cell($hotpot->attemptlimit)));
         }
         if ($hotpot->timelimit > 0) {
             $table->data[] = new html_table_row(array(new html_table_cell(get_string('timelimit', 'hotpot') . ':'), new html_table_cell(format_time($hotpot->timelimit))));
         }
         if ($hotpot->gradeweighting && $hotpot->attemptlimit != 1) {
             $table->data[] = new html_table_row(array(new html_table_cell(get_string('grademethod', 'hotpot') . ':'), new html_table_cell($hotpot->format_grademethod())));
         }
     }
     if (count($table->data)) {
         $table->attributes['class'] = 'hotpotentryoptions';
         $output .= html_writer::table($table);
     }
     // print summary of attempts by this user at this unit
     if ($hotpot->entryoptions & hotpot::ENTRYOPTIONS_ATTEMPTS) {
         $output .= $this->attemptssummary($hotpot);
     }
     return $output;
 }