207
208 $ass_type = $this->types->getById($a_type);
209 $ass_type_gui = $this->type_guis->getById($a_type);
211
214 if ($a_mode == "edit") {
215 $form->setTitle(
$lng->
txt(
"exc_edit_assignment"));
216 } else {
217 $form->setTitle(
$lng->
txt(
"exc_new_assignment"));
218 }
219 $form->setFormAction($ilCtrl->getFormAction($this));
220
221
223 $ti->setMaxLength(200);
224 $ti->setRequired(true);
225 $form->addItem($ti);
226
227
229 $ty->setValue($a_type);
230 $ty->setDisabled(true);
231 $form->addItem($ty);
232
233
234
235
236
237 $ass_type_gui->addEditFormCustomProperties($form);
238
239
240
241
242
243 if ($ass_type->usesTeams()) {
244 if ($a_mode == "edit") {
246 } else {
247 $has_teams = false;
248 }
249
250
253
255 $lng->
txt(
"exc_team_by_participants"),
257 $lng->
txt(
"exc_team_by_participants_info")
258 );
259
261 $lng->
txt(
"exc_team_by_tutors"),
263 $lng->
txt(
"exc_team_by_tutors_info")
264 );
265
266 #23679
267 if (!$has_teams) {
268
270 $rd_creation_method->setRequired(true);
271 $rd_creation_method->setValue("0");
272
273
275 $lng->
txt(
"exc_team_by_tutors_manual"),
276 "0",
277 $lng->
txt(
"exc_team_by_tutors_manual_info")
278 );
279 $rd_creation_method->addOption($rd_creation_manual);
280
281
282 $add_info = "";
284 $add_info =
" <strong>" .
$lng->
txt(
"exc_team_by_random_add_info") .
"</strong>";
285 }
287 $lng->
txt(
"exc_team_by_random"),
289 $lng->
txt(
"exc_team_by_random_info") .
"<br>" .
$lng->
txt(
"exc_total_members") .
": " . $this->getExerciseTotalMembers() . $add_info
290 );
291 $rd_creation_method->addOption($rd_creation_random);
292
294 $number_teams->setSize(3);
295 $number_teams->setMinValue(1);
297 $number_teams->setRequired(true);
298 $number_teams->setSuffix(
$lng->
txt(
"exc_team_assignment_adopt_teams"));
299 $rd_creation_random->addSubItem($number_teams);
300
301 $min_team_participants =
new ilNumberInputGUI(
$lng->
txt(
"exc_min_team_participants"),
"min_participants_team");
302 $min_team_participants->setSize(3);
303 $min_team_participants->setMinValue(1);
305 $min_team_participants->setRequired(true);
306 $min_team_participants->setSuffix(
$lng->
txt(
"exc_participants"));
307 $rd_creation_random->addSubItem($min_team_participants);
308
309 $max_team_participants =
new ilNumberInputGUI(
$lng->
txt(
"exc_max_team_participants"),
"max_participants_team");
310 $max_team_participants->setSize(3);
311 $max_team_participants->setMinValue(1);
313 $max_team_participants->setRequired(true);
314 $max_team_participants->setSuffix(
$lng->
txt(
"exc_participants"));
315 $rd_creation_random->addSubItem($max_team_participants);
316
318 if (count($options)) {
320 $lng->
txt(
"exc_team_by_assignment"),
322 $lng->
txt(
"exc_team_by_assignment_info")
323 );
324
326 $radio_assignment_adopt->setRequired(true);
327 $radio_assignment_adopt->addOption(
new ilRadioOption(
$lng->
txt(
"exc_team_assignment_adopt_none"), -1));
328
329 foreach ($options as
$id => $item) {
331 $option->setInfo(
$lng->
txt(
"exc_team_assignment_adopt_teams") .
": " . $item[
"teams"]);
332 $radio_assignment_adopt->addOption($option);
333 }
334 $radio_assignment->addSubItem($radio_assignment_adopt);
335 $rd_creation_method->addOption($radio_assignment);
336 }
337
338 $radio_tutors->addSubItem($rd_creation_method);
339 }
340 $rd_team->addOption($radio_participants);
341 $rd_team->addOption($radio_tutors);
342
343
344
345 $form->addItem($rd_team);
346
347 if ($has_teams) {
348 $rd_team->setDisabled(true);
349 }
350 }
351
352
353 if (!$this->random_manager->isActivated()) {
355 $cb->setInfo(
$lng->
txt(
"exc_mandatory_info"));
356 $cb->setChecked(true);
357 $form->addItem($cb);
358 } else {
359
361 $ne->setValue(
$lng->
txt(
"exc_mandatory_rand_determined"));
362 $form->addItem($ne);
363 }
364
365
367 $sub_header->setTitle(
$lng->
txt(
"exc_work_instructions"));
368 $form->addItem($sub_header);
369
371 $desc_input->setRows(20);
373 $desc_input->setUseRte(true);
374 $desc_input->setRteTagSet("mini");
375 }
376 $form->addItem($desc_input);
377
378
379 if ($a_mode == "create") {
381 $files->setFilenames(array(0 => ''));
382 $form->addItem($files);
383 }
384
385
387 $sub_header->setTitle(
$lng->
txt(
"exc_schedule"));
388 $form->addItem($sub_header);
389
390
392 $start_date->setShowTime(true);
393 $form->addItem($start_date);
394
395
397 $radg->setValue(0);
399 $radg->addOption($op1);
401 $radg->addOption($op2);
402 $form->addItem($radg);
403
404
406 $deadline->setShowTime(true);
407 $op1->addSubItem($deadline);
408
409
411 $deadline2->setInfo(
$lng->
txt(
"exc_deadline_extended_info"));
412 $deadline2->setShowTime(true);
413 $deadline->addSubItem($deadline2);
414
415
416
417 $rmd_submit =
new ilCheckboxInputGUI($this->
lng->txt(
"exc_reminder_submit_setting"),
"rmd_submit_status");
418
419 $rmd_submit_start =
new ilNumberInputGUI($this->
lng->txt(
"exc_reminder_start"),
"rmd_submit_start");
420 $rmd_submit_start->setSize(3);
421 $rmd_submit_start->setMaxLength(3);
422 $rmd_submit_start->setSuffix(
$lng->
txt(
'days'));
423 $rmd_submit_start->setInfo($this->
lng->txt(
"exc_reminder_start_info"));
424 $rmd_submit_start->setRequired(true);
425 $rmd_submit_start->setMinValue(1);
426 $rmd_submit->addSubItem($rmd_submit_start);
427
428 $rmd_submit_frequency =
new ilNumberInputGUI($this->
lng->txt(
"exc_reminder_frequency"),
"rmd_submit_freq");
429 $rmd_submit_frequency->setSize(3);
430 $rmd_submit_frequency->setMaxLength(3);
431 $rmd_submit_frequency->setSuffix(
$lng->
txt(
'days'));
432 $rmd_submit_frequency->setRequired(true);
433 $rmd_submit_frequency->setMinValue(1);
434 $rmd_submit->addSubItem($rmd_submit_frequency);
435
437 $rmd_submit_end->setRequired(true);
438 $rmd_submit->addSubItem($rmd_submit_end);
439
441
442
443 $rmd_grade =
new ilCheckboxInputGUI($this->
lng->txt(
"exc_reminder_grade_setting"),
"rmd_grade_status");
444
445 $rmd_grade_frequency =
new ilNumberInputGUI($this->
lng->txt(
"exc_reminder_frequency"),
"rmd_grade_freq");
446 $rmd_grade_frequency->setSize(3);
447 $rmd_grade_frequency->setMaxLength(3);
448 $rmd_grade_frequency->setSuffix(
$lng->
txt(
'days'));
449 $rmd_grade_frequency->setRequired(true);
450 $rmd_grade_frequency->setMinValue(1);
451 $rmd_grade->addSubItem($rmd_grade_frequency);
452
454 $rmd_grade_end->setRequired(true);
455 $rmd_grade->addSubItem($rmd_grade_end);
456
458
459 $form->addItem($rmd_submit);
460 $form->addItem($rmd_grade);
461
462
464 $ti->setMinValue(1);
465 $ti->setRequired(true);
466 $ti->setMaxLength(3);
467 $ti->setSuffix(
$lng->
txt(
"days"));
468 $ti->setSize(3);
469 $op2->addSubItem($ti);
470
471
473 $last_submission->setInfo(
$lng->
txt(
"exc_rel_last_submission_info"));
474 $last_submission->setShowTime(true);
475 $op2->addSubItem($last_submission);
476
477
478
479
480 if ($ass_type->usesFileUpload()) {
482 $sub_header->setTitle($ass_type->getTitle());
483 $form->addItem($sub_header);
485 $form->addItem($max_file_tgl);
486
488 $max_file->setInfo(
$lng->
txt(
"exc_max_file_info"));
489 $max_file->setRequired(true);
490 $max_file->setSize(3);
491 $max_file->setMinValue(1);
492 $max_file_tgl->addSubItem($max_file);
493 }
494
495
497 $sub_header->setTitle(
$lng->
txt(
"exc_after_submission"));
498 $form->addItem($sub_header);
499
500 if (!$ass_type->usesTeams() && !$this->random_manager->isActivated()) {
501
503 $peer->setInfo(
$lng->
txt(
"exc_peer_review_ass_setting_info"));
504 $form->addItem($peer);
505 }
506
507
508
509
511 $form->addItem($fb);
512
514 $fb_file->setRequired(true);
515
516 $fb->addSubItem($fb_file);
517
519 $fb_date->setRequired(true);
522
523
525 $fb_date_custom_date->setRequired(true);
526 $fb_date_custom_date->setShowTime(true);
528 $fb_date_custom_option->addSubItem($fb_date_custom_date);
529 $fb_date->addOption($fb_date_custom_option);
530
531
532 $fb->addSubItem($fb_date);
533
535 $fb_cron->setInfo(
$lng->
txt(
"exc_global_feedback_file_cron_info"));
536 $fb->addSubItem($fb_cron);
537
538
539 if ($a_mode == "create") {
540 $form->addCommandButton(
"saveAssignment",
$lng->
txt(
"save"));
541 } else {
542 $form->addCommandButton(
"updateAssignment",
$lng->
txt(
"save"));
543 }
544 $form->addCommandButton(
"listAssignments",
$lng->
txt(
"cancel"));
545
546 return $form;
547 }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
getExerciseTotalMembers()
static getAdoptableTeamAssignments(int $a_exercise_id, int $a_exclude_ass_id=null, int $a_user_id=null)
const TEAMS_FORMED_BY_PARTICIPANTS
const FEEDBACK_DATE_CUSTOM
const FEEDBACK_DATE_DEADLINE
const FEEDBACK_DATE_SUBMISSION
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getRichTextEditor()
Returns the identifier for the Rich Text Editor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
This class represents a text property in a property form.