예제 #1
0
 function get_item_display_options($column, $class)
 {
     $classobj = new pmclass($class);
     if (!$classobj->is_enrollable()) {
         return get_string('notenrollable', 'enrol');
     }
     if (student::count_enroled($class->id) < $class->maxstudents || empty($class->maxstudents)) {
         $action = 'savenew';
     } else {
         $action = 'confirmwaitlist';
     }
     return '<a href="index.php?s=crscat&amp;section=curr&amp;clsid=' . "{$class->id}&amp;action={$action}\">" . get_string('choose') . '</a>';
 }