Пример #1
0
 $content->setVariable("GROUP_MEMBERS", $result[$tnr[$tutorial->get_id()]["membercount"]]);
 $result[$tnr[$tutorial->get_id()]["is_member"]] || $lms_tutorial->is_admin($current_user) ? $content->setVariable("COMMUNICATION", "<td align=\"center\"><a href=\"" . PATH_URL . "messages_write.php?group=" . $tutorial->get_id() . "\">" . gettext("Send Message") . "</a></td>") : $content->setVariable("COMMUNICATION", "<td align=\"center\">" . gettext("not allowed") . "</td>");
 $content->setVariable("LABEL_MESSAGE", gettext("Message"));
 $content->setVariable("LABEL_SEND", gettext("Send"));
 $content->setVariable("LABEL_TUTOR", gettext("Tutor"));
 $content->setVariable("LABEL_ACTION", gettext("Sign in/Resign"));
 $content->setVariable("LABEL_MAX_LEARNERS", gettext("# max. lns"));
 $content->setVariable("GROUP_MEM_TITLE", gettext("Number of participants"));
 $content->setVariable("VALUE_MAX_TITLE", gettext("Maximum number of participants"));
 $content->setVariable("VALUE_TUTOR", $tutorial->get_attribute("TUTORIAL_TUTOR"));
 if ($result[$tnr[$tutorial->get_id()]["attributes"]]["TUTORIAL_MAX_LEARNERS"] != "" && $result[$tnr[$tutorial->get_id()]["attributes"]]["TUTORIAL_MAX_LEARNERS"] != 0) {
     $content->setVariable("VALUE_MAX_LEARNERS", $result[$tnr[$tutorial->get_id()]["attributes"]]["TUTORIAL_MAX_LEARNERS"]);
 } else {
     $content->setVariable("VALUE_MAX_LEARNERS", gettext("unlimited"));
 }
 if ($lms_tutorial->is_staff($current_user)) {
     $content->setVariable("TUTORIAL_ACTION", gettext("You are staff member"));
 } else {
     if ($result[$tnr[$tutorial->get_id()]["is_member"]]) {
         $content->setVariable("TUTORIAL_ACTION", "<input type=\"submit\" value=\"" . gettext("Resign") . "\" name=\"resign[" . $tutorial->get_id() . "]" . "\" >");
     } else {
         $max = $result[$tnr[$tutorial->get_id()]["attributes"]]["TUTORIAL_MAX_LEARNERS"];
         if ($max != "" && (int) $max > 0 && (int) $max <= (int) $result[$tnr[$tutorial->get_id()]["membercount"]]) {
             $content->setVariable("TUTORIAL_ACTION", gettext("Tutorial is full"));
         } else {
             if ($tutorial->requested_membership($current_user)) {
                 $content->setVariable("TUTORIAL_ACTION", gettext("Membership requested"));
             } else {
                 if ($lms_tutorial->is_private()) {
                     $content->setVariable("TUTORIAL_ACTION", gettext("Private tutorial!"));
                 } else {