Example #1
0
 }
 $content->setVariable("LABEL_GROUPS", gettext("Tutorials for the course") . " " . h($course->get_attribute("OBJ_DESC")) . " (" . str_replace(array("%a", "%z", "%s"), array($start + 1, $end, $no_tutorials), gettext("%a-%z out of %s")) . ")");
 $content->setVariable("LABEL_NAME_DESCRIPTION", gettext("Tutorial No, description, long description"));
 $content->setVariable("LABEL_MEMBERS", gettext("# lns"));
 $content->setVariable("LABEL_COMMUNICATION", gettext("Communication"));
 for ($i = $start; $i < $end; $i++) {
     $tutorial = $tutorials[$i];
     $lms_tutorial = new koala_group_tutorial($tutorial);
     $password_protected = $result[$tnr[$tutorial->get_id()]["has_password"]];
     if ($password_protected) {
         $participant_mgmnt = gettext("password protected tutorial");
     } else {
         if ($lms_tutorial->is_moderated() && !$password_protected) {
             $participant_mgmnt = gettext("moderated tutorial");
         } else {
             if ($lms_tutorial->is_private() && !$password_protected) {
                 $participant_mgmnt = gettext("private tutorial");
             } else {
                 $participant_mgmnt = gettext("public tutorial");
             }
         }
     }
     $content->setCurrentBlock("BLOCK_GROUP");
     if ($tutorial->get_workroom()->check_access_read($current_user)) {
         $content->setVariable("GROUPLINK", "<td><a href=\"" . $backlink . $tutorial->get_id() . "\"><b>" . $lms_tutorial->get_display_name() . "</b></a>" . " (" . $participant_mgmnt . ")" . "<br>" . h($result[$tnr[$tutorial->get_id()]["attributes"]]["OBJ_DESC"]) . "<br><small>" . h($result[$tnr[$tutorial->get_id()]["attributes"]]["TUTORIAL_LONG_DESC"]) . "</small></td>");
     } else {
         $content->setVariable("GROUPLINK", "<td><b>" . $lms_tutorial->get_display_name() . "</b>" . " (" . $participant_mgmnt . ")" . "<br>" . h($result[$tnr[$tutorial->get_id()]["attributes"]]["OBJ_DESC"]) . "<br><small>" . h($result[$tnr[$tutorial->get_id()]["attributes"]]["TUTORIAL_LONG_DESC"]) . "</small></td>");
     }
     $content->setVariable("MEMBER_LINK", $backlink . "tutorials/" . $tutorial->get_id() . "/members/");
     $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>");