function __construct($steam_object = FALSE) { self::$PATH = PATH_EXTENSIONS . "units_homework/"; self::$DISPLAY_NAME = gettext("Homework"); self::$DISPLAY_DESCRIPTION = gettext("This unit gives the students the chance to upload their homework and get feedback from the staff. The staff has to upload the task and enter an enddate and a maximum number of participants."); parent::__construct(PATH_EXTENSIONS . "units_homework.xml", $steam_object); $this->set_action_permissions(PERMISSION_ACTION_EDIT | PERMISSION_ACTION_DELETE); }
$content->setVariable("LABEL_SHORT_DSC", gettext("Description")); $content->setVariable("LABEL_DSC", gettext("Long description")); $content->setVariable("VALUE_DSC", gettext("Students can upload their solution and staffs can give their feedback and points")); $content->setVariable("LABEL_DSC_SHOW_UP", gettext("This description will show up on the units page.")); if (isset($unit)) { $backlink = $unit->get_url(); $content->setVariable("INFO_ICON", units_homework::get_big_icon()); if ($old_unit) { $content->setVariable('INFO_TEXT', gettext('This is an old unit that does not fully support the homework features.<br/><b>If you save any changes, it will be converted into a Homework.</b>')); $content->setVariable('LABEL_CREATE', gettext('Save changes and convert into homework')); } else { $content->setVariable("LABEL_CREATE", gettext("Save changes")); } } else { $backlink = $owner->get_url() . "units/new"; $content->setVariable("INFO_ICON", units_homework::get_big_icon()); $content->setVariable("INFO_TEXT", gettext("You are going to add a new unit.")); $content->setVariable("LABEL_CREATE", gettext("Create unit")); } $content->setVariable("UNIT", "units_homework"); $content->setVariable("BACKLINK", "<a href=\"{$backlink}\">" . gettext("back") . "</a>"); $content->setVariable("LABEL_BB_BOLD", gettext("B")); $content->setVariable("HINT_BB_BOLD", gettext("boldface")); $content->setVariable("LABEL_BB_ITALIC", gettext("I")); $content->setVariable("HINT_BB_ITALIC", gettext("italic")); $content->setVariable("LABEL_BB_UNDERLINE", gettext("U")); $content->setVariable("HINT_BB_UNDERLINE", gettext("underline")); $content->setVariable("LABEL_BB_STRIKETHROUGH", gettext("S")); $content->setVariable("HINT_BB_STRIKETHROUGH", gettext("strikethrough")); $content->setVariable("LABEL_BB_IMAGE", gettext("IMG")); $content->setVariable("HINT_BB_IMAGE", gettext("image"));