示例#1
0
 public function renderContent()
 {
     global $platformLanguage;
     $out = '';
     // Last user action
     $lastUserAction = isset($_SESSION['last_action']) && $_SESSION['last_action'] != '1970-01-01 00:00:00' ? $_SESSION['last_action'] : date('Y-m-d H:i:s');
     $userCommands = array();
     // User commands
     // 'Create Course Site' command. Only available for teacher.
     if (claro_is_allowed_to_create_course()) {
         $userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/create.php')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('courseadd') . '" alt="" /> ' . get_lang('Create a course site') . '</a>' . "\n";
     } elseif ($GLOBALS['currentUser']->isCourseCreator) {
         $userCommands[] = '<span class="userCommandsItemDisabled">' . '<img src="' . get_icon_url('courseadd') . '" alt="" /> ' . get_lang('Create a course site') . '</span>' . "\n";
     }
     if (get_conf('allowToSelfEnroll', true)) {
         $userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'auth/courses.php?cmd=rqReg&amp;categoryId=0')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('enroll') . '" alt="" /> ' . get_lang('Enrol on a new course') . '</a>' . "\n";
         $userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'auth/courses.php?cmd=rqUnreg')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('unenroll') . '" alt="" /> ' . get_lang('Remove course enrolment') . '</a>' . "\n";
     }
     $userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/platform_courses.php')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('course') . '" alt="" /> ' . get_lang('All platform courses') . '</a>' . "\n";
     $userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'notification_date.php')) . '" class="userCommandsItem">' . '<img class="iconDefinitionList" src="' . get_icon_url('hot') . '" alt="' . get_lang('New items') . '" />' . ' ' . get_lang('New items') . ' ' . get_lang('to another date') . (substr($lastUserAction, strlen($lastUserAction) - 8) == '00:00:00' ? ' [' . claro_html_localised_date(get_locale('dateFormatNumeric'), strtotime($lastUserAction)) . ']' : '') . '</a>' . "\n";
     $userCourseList = render_user_course_list();
     $userCourseListDesactivated = render_user_course_list_desactivated();
     $out .= '<div class="userCommands">' . '<h2>' . get_lang('Manage my courses') . '</h2>' . claro_html_list($userCommands) . '</div>' . '<div class="userCourseList">' . '<h2>' . get_lang('My course list') . '</h2>' . $userCourseList;
     if (!empty($userCourseListDesactivated)) {
         $out .= '<h4>' . get_lang('Deactivated course list') . '</h4>' . $userCourseListDesactivated;
     }
     $out .= '</div>';
     /*'</td>'
       . '</tr>'
       . '</tbody>'
       . '</table>'*/
     $this->content = $out;
     return $this->content;
 }
示例#2
0
 public function renderContent()
 {
     $personnalCourseList = get_user_course_list(claro_get_current_user_id());
     $announcementEventList = announcement_get_items_portlet($personnalCourseList);
     $output = '';
     if ($announcementEventList) {
         $output .= '<dl id="portletMyAnnouncements">';
         foreach ($announcementEventList as $announcementItem) {
             // Hide hidden and expired elements
             $isVisible = (bool) ($announcementItem['visibility'] == 'SHOW') ? 1 : 0;
             $isOffDeadline = (bool) (isset($announcementItem['visibleFrom']) && strtotime($announcementItem['visibleFrom']) > time() || isset($announcementItem['visibleUntil']) && time() >= strtotime($announcementItem['visibleUntil'])) ? 1 : 0;
             if ($isVisible && !$isOffDeadline) {
                 $output .= '<dt>' . "\n" . '<img class="iconDefinitionList" src="' . get_icon_url('announcement', 'CLANN') . '" alt="" />' . ' <a href="' . $announcementItem['url'] . '">' . $announcementItem['title'] . '</a>' . "\n" . '</dt>' . "\n";
                 foreach ($announcementItem['eventList'] as $announcementEvent) {
                     // Prepare the render
                     $displayChar = 250;
                     if (strlen($announcementEvent['content']) > $displayChar) {
                         $content = substr($announcementEvent['content'], 0, $displayChar) . '... <a href="' . claro_htmlspecialchars(Url::Contextualize($announcementEvent['url'])) . '">' . '<b>' . get_lang('Read more &raquo;') . '</b></a>';
                     } else {
                         $content = $announcementEvent['content'];
                     }
                     $output .= '<dd>' . '<a href="' . $announcementEvent['url'] . '">' . $announcementItem['courseOfficialCode'] . '</a> : ' . "\n" . (!empty($announcementEvent['title']) ? $announcementEvent['title'] : get_lang('No title')) . "\n" . ' - ' . $content . "\n" . '</dd>' . "\n";
                 }
             }
         }
         $output .= '</dl>';
     } else {
         $output .= "\n" . '<dl>' . "\n" . '<dt>' . "\n" . '<img class="iconDefinitionList" src="' . get_icon_url('announcement', 'CLANN') . '" alt="" />' . ' ' . get_lang('No announcement to display') . "\n" . '</dt>' . "\n" . '</dl>' . "\n";
     }
     return $output;
 }
示例#3
0
 public function renderTitle()
 {
     $output = '<img ' . 'src="' . get_icon_url('announcement', 'CLANN') . '" ' . 'alt="Announcement icon" /> ' . get_lang('Latest announcements');
     if (claro_is_allowed_to_edit()) {
         $output .= ' <span class="separator">|</span> <a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLANN') . '/announcements.php')) . '">' . '<img src="' . get_icon_url('settings') . '" alt="' . get_lang('Settings') . '" /> ' . get_lang('Manage') . '</a>';
     }
     return $output;
 }
示例#4
0
 public function renderTitle()
 {
     $output = '<img ' . 'src="' . get_icon_url('headline', 'CLTI') . '"' . 'alt="' . get_lang('Headline') . '" /> ' . get_lang('Headlines');
     if (claro_is_allowed_to_edit()) {
         $output .= ' <span class="separator">|</span> <a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLTI') . '/index.php')) . '">' . '<img src="' . get_icon_url('settings') . '" alt="' . get_lang('Settings') . '" /> ' . get_lang('Manage') . '</a>';
     }
     return $output;
 }
示例#5
0
 protected function renderFooter()
 {
     return get_lang('Messages posted') . ' : ' . $this->getUserTotalForumPost() . '<br />' . "\n" . get_lang('Topics started') . ' : ' . $this->getUserTotalForumTopics() . '<br />' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewsearch.php?searchUser='******'">' . get_lang('View all user\'s posts') . '</a>' . "\n";
 }
示例#6
0
 protected function renderContent()
 {
     if (isset($_REQUEST['exId']) && is_numeric($_REQUEST['exId'])) {
         $exId = (int) $_REQUEST['exId'];
     } else {
         $exId = null;
     }
     $exerciseResults = $this->prepareContent();
     $jsloader = JavascriptLoader::getInstance();
     $jsloader->load('jquery');
     $context = array('cidReq' => $this->courseId, 'cidReset' => true, 'userId' => $this->userId);
     $html = '<script language="javascript" type="text/javascript">' . "\n" . ' $(document).ready(function() {' . '  $(\'.exerciseDetails\').hide();' . '  $(\'.exerciseDetailsToggle\').click( function()' . '  {' . '   $(this).next(".exerciseDetails").toggle();' . '   return false;' . '  });' . ' });' . '</script>' . "\n\n";
     $html .= '<table class="claroTable emphaseLine" cellpadding="2" cellspacing="1" border="0" align="center" style="width: 99%;">' . "\n" . '<thead>' . "\n" . '<tr class="headerX">' . "\n" . '<th>' . get_lang('Exercises') . '</th>' . "\n" . '<th>' . get_lang('Worst score') . '</th>' . "\n" . '<th>' . get_lang('Best score') . '</th>' . "\n" . '<th>' . get_lang('Average score') . '</th>' . "\n" . '<th>' . get_lang('Average Time') . '</th>' . "\n" . '<th>' . get_lang('Attempts') . '</th>' . "\n" . '<th>' . get_lang('Last attempt') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n";
     if (!empty($exerciseResults) && is_array($exerciseResults)) {
         $html .= '<tbody>' . "\n";
         foreach ($exerciseResults as $result) {
             $html .= '<tr class="exerciseDetailsToggle">' . "\n" . '<td><a href="#">' . claro_htmlspecialchars($result['title']) . '</td>' . "\n" . '<td>' . (int) $result['minimum'] . '</td>' . "\n" . '<td>' . (int) $result['maximum'] . '</td>' . "\n" . '<td>' . round($result['average'] * 10) / 10 . '</td>' . "\n" . '<td>' . claro_html_duration(floor($result['avgTime'])) . '</td>' . "\n" . '<td>' . (int) $result['attempts'] . '</td>' . "\n" . '<td>' . claro_html_localised_date(get_locale('dateTimeFormatLong'), strtotime($result['lastAttempt'])) . "</td> \n";
             $html .= '</tr>' . "\n";
             // details
             $exerciseDetails = $this->getUserExerciceDetails($result['id']);
             if (is_array($exerciseDetails) && !empty($exerciseDetails)) {
                 $html .= '<tr class="exerciseDetails" >';
                 if (claro_is_course_manager()) {
                     $html .= '<td><a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLQWZ') . '/track_exercise_reset.php?cmd=resetAllAttemptsForUser&exId=' . $result['id'], $context)) . '">' . get_lang('delete all') . '</a></td>';
                 } else {
                     $html .= '<td>&nbsp;</td>' . "\n";
                 }
                 $html .= '<td colspan="6" class="noHover">' . "\n" . '<table class="claroTable emphaseLine" cellspacing="1" cellpadding="2" border="0" width="100%" style="width: 99%;">' . "\n" . '<thead>' . "\n";
                 $html .= '' . '<tr>' . "\n" . '<th><small>' . get_lang('Date') . '</small></th>' . "\n" . '<th><small>' . get_lang('Score') . '</small></th>' . "\n" . '<th><small>' . get_lang('Time') . '</small></th>' . "\n" . '<th><small>' . get_lang('Delete') . '</small></th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n";
                 foreach ($exerciseDetails as $details) {
                     $html .= '<tr>' . "\n" . '<td><small>' . "\n" . '<a href="' . get_module_url('CLQWZ') . '/track_exercise_details.php?trackedExId=' . $details['id'] . '">' . claro_html_localised_date(get_locale('dateTimeFormatLong'), strtotime($details['date'])) . '</a></small></td>' . "\n" . '<td><small>' . $details['result'] . '/' . $details['weighting'] . '</small></td>' . "\n" . '<td><small>' . claro_html_duration($details['time']) . '</small></td>' . "\n";
                     if (claro_is_course_manager()) {
                         $html .= '<td><small><a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLQWZ') . '/track_exercise_reset.php?cmd=resetAttemptForUser&trackId=' . $details['id'], $context)) . '">' . get_lang('delete') . '</a></small></td>' . "\n";
                     } else {
                         $html .= '<td><small>-</small></td>';
                     }
                     $html .= '</tr>' . "\n";
                 }
                 $html .= '</tbody>' . "\n" . '</table>' . "\n\n" . '</td>' . "\n" . '</tr>' . "\n";
             }
         }
         $html .= '</tbody>' . "\n";
     } else {
         $html .= '<tbody>' . "\n" . '<tr>' . "\n" . '<td colspan="7" align="center">' . get_lang('No result') . '</td>' . "\n" . '</tr>' . "\n" . '</tbody>' . "\n";
     }
     $html .= '</table>' . "\n\n";
     return $html;
 }
示例#7
0
} else {
    if (!is_null($categoryId)) {
        $pagerUrl = Url::Contextualize($_SERVER['PHP_SELF'] . '?filter=' . $filter);
    } else {
        ClaroBreadCrumbs::getInstance()->setCurrent(get_lang('Question pool'), Url::Contextualize($_SERVER['PHP_SELF']));
        $pagerUrl = Url::Contextualize($_SERVER['PHP_SELF']);
    }
}
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Exercises'), Url::Contextualize(get_module_url('CLQWZ') . '/exercise.php'));
$nameTools = get_lang('Question pool');
// Tool list
$toolList = array();
if (!is_null($exId)) {
    $toolList[] = array('img' => 'back', 'name' => get_lang('Go back to the exercise'), 'url' => claro_htmlspecialchars(Url::Contextualize('edit_exercise.php?exId=' . $exId)));
}
$toolList[] = array('img' => 'default_new', 'name' => get_lang('New question'), 'url' => claro_htmlspecialchars(Url::Contextualize('edit_question.php?cmd=rqEdit')));
$out = '';
$out .= claro_html_tool_title($nameTools, null, $toolList);
$out .= $dialogBox->render();
//-- filter listbox
$attr['onchange'] = 'filterForm.submit()';
$out .= "\n" . '<form method="get" name="filterForm" action="question_pool.php">' . "\n" . '<input type="hidden" name="exId" value="' . $exId . '" />' . "\n" . claro_form_relay_context() . "\n" . '<p align="right">' . "\n" . '<label for="filter">' . get_lang('Filter') . '&nbsp;:&nbsp;</label>' . "\n" . claro_html_form_select('filter', $filterList, $filter, $attr) . "\n" . '<noscript>' . "\n" . '<input type="submit" value="' . get_lang('Ok') . '" />' . "\n" . '</noscript>' . "\n" . '</p>' . "\n" . '</form>' . "\n\n";
//-- pager
$out .= $myPager->disp_pager_tool_bar($pagerUrl);
/*
 * enable multiple question selection
 */
if (!is_null($exId)) {
    $out .= '<form method="post" name="QCMEncode" action="' . $_SERVER['PHP_SELF'] . '?cmd=recupMultipleQuestions">' . "\n";
    $out .= '<input type="hidden" name="exId" value="' . $exId . '" />' . "\n";
}
示例#8
0
文件: module.php 项目: rhertzog/lcs
}
// check in DB if user has already browsed this module
$sql = "SELECT `contentType`,\n                `total_time`,\n                `session_time`,\n                `scoreMax`,\n                `raw`,\n                `lesson_status`\n        FROM `" . $TABLEUSERMODULEPROGRESS . "` AS UMP,\n             `" . $TABLELEARNPATHMODULE . "` AS LPM,\n             `" . $TABLEMODULE . "` AS M\n        WHERE UMP.`user_id` = '" . (int) claro_get_current_user_id() . "'\n          AND UMP.`learnPath_module_id` = LPM.`learnPath_module_id`\n          AND LPM.`learnPath_id` = " . (int) $_SESSION['path_id'] . "\n          AND LPM.`module_id` = " . (int) $_SESSION['module_id'] . "\n          AND LPM.`module_id` = M.`module_id`\n             ";
$resultBrowsed = claro_sql_query_get_single_row($sql);
// redirect user to the path browser if needed
if (!$is_allowedToEdit && (!is_array($resultBrowsed) || !$resultBrowsed || count($resultBrowsed) <= 0) && $noModuleComment && $noModuleSpecificComment && !$noStartAsset) {
    header("Location: " . Url::Contextualize("./navigation/viewer.php"));
    exit;
}
// Back button
if (!empty($_SESSION['returnToTrackingUserId'])) {
    $pathBack = Url::Contextualize(get_path('clarolineRepositoryWeb') . 'tracking/lp_modules_details.php?' . 'uInfo=' . (int) $_SESSION['returnToTrackingUserId'] . '&path_id=' . (int) $_SESSION['path_id']);
} elseif ($is_allowedToEdit) {
    $pathBack = Url::Contextualize("./learningPathAdmin.php");
} else {
    $pathBack = Url::Contextualize("./learningPath.php");
}
// Command list
$cmdList = array();
$cmdList[] = array('img' => 'back', 'name' => get_lang('Back to module list'), 'url' => $pathBack);
// Display
$out = '';
if (!empty($dialogBox)) {
    $out .= $dialogBox->render();
}
$out .= claro_html_tool_title(get_lang('Module edition'), null, $cmdList);
//####################################################################################\\
//################################## MODULE NAME BOX #################################\\
//####################################################################################\\
$cmd = isset($_REQUEST['cmd']) ? $_REQUEST['cmd'] : '';
if ($cmd == "updateName") {
示例#9
0
        $icon = get_icon_url('tool');
    }
    $style = '';
    // patchy
    if (claro_is_platform_admin() || claro_is_course_manager()) {
        if (!$_groupProperties['tools'][$thisTool['label']]) {
            $style = 'invisible ';
        }
    }
    // see if tool name must be displayed 'as containing new items' (a red ball by default)  or not
    $classItem = '';
    if (in_array($thisTool['id'], $modified_tools)) {
        $classItem = " hot";
    }
    if (!empty($url)) {
        $toolLinkList[] = '<a class="' . trim($style . ' item' . $classItem) . '" href="' . claro_htmlspecialchars(Url::Contextualize($url)) . '">' . '<img src="' . $icon . '" alt="" />&nbsp;' . $toolName . '</a>' . "\n";
    } else {
        $toolLinkList[] = '<span ' . trim($style) . '>' . '<img src="' . $icon . '" alt="" />&nbsp;' . $toolName . '</span>' . "\n";
    }
}
/*****************
 * DISPLAY SECTION
 ******************/
Claroline::getDisplay()->body->appendContent(claro_html_tool_title(array('supraTitle' => get_lang("Groups"), 'mainTitle' => claro_get_current_group_data('name') . ' <img src="' . get_icon_url('group') . '" alt="" />')));
$groupSpaceTemplate = new CoreTemplate('group_space.tpl.php');
$groupSpaceTemplate->assign('dialogBox', $dialogBox);
$groupSpaceTemplate->assign('displayRegistrationLink', $is_allowedToSelfRegInGroup && !array_key_exists('registration', $_REQUEST));
$groupSpaceTemplate->assign('displayUnregistrationLink', $is_allowedToSelfUnregInGroup && !array_key_exists('unregistration', $_REQUEST));
$groupSpaceTemplate->assign('displayTutorRegistrationLink', $isTutorRegAllowed && !array_key_exists('tutorRegistration', $_REQUEST));
$groupSpaceTemplate->assign('displayTutorUnregistrationLink', $isTutorUnregAllowed && !array_key_exists('tutorUnregistration', $_REQUEST));
$groupSpaceTemplate->assign('toolLinkList', $toolLinkList);
示例#10
0
" />
                </a>
                <?php 
            } else {
                ?>
&nbsp;
                <?php 
            }
            ?>
            </td>
            <td align="center">
                <?php 
            if ($forumIterator < $thisCategory['forum_count']) {
                ?>
                <a href="<?php 
                echo get_lang(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exMvDownForum&amp;forumId=' . $thisForum['forum_id'])));
                ?>
">
                <img src="<?php 
                echo get_icon_url('move_down');
                ?>
" alt="<?php 
                echo get_lang('Move down');
                ?>
" />
                </a>
                <?php 
            } else {
                ?>
&nbsp;
                <?php 
示例#11
0
文件: wiki.php 项目: rhertzog/lcs
     } else {
         $classItem = "";
     }
     $out .= '<td style="text-align: left;">';
     // display direct link to main page
     $out .= '<a class="item' . $classItem . '" href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=show')) . '">' . '<img src="' . get_icon_url('wiki') . '" alt="' . get_lang("Wiki") . '" />&nbsp;' . $entry['title'] . '</a>' . '</td>' . "\n" . '<td style="text-align: center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=all')) . '">' . $wikiStore->getNumberOfPagesInWiki($entry['id']) . '</a>' . '</td>' . "\n" . '<td style="text-align: center;">';
     // display direct link to main page
     $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=recent')) . '">' . '<img src="' . get_icon_url('history') . '" alt="' . get_lang("Recent changes") . '" />' . '</a>' . '</td>' . "\n";
     // if admin, display edit and delete links
     if ($groupId && claro_is_group_member() || $is_allowedToAdmin) {
         // edit link
         $out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=rqEdit')) . '">' . '<img src="' . get_icon_url('settings') . '" alt="' . get_lang("Edit properties") . '" />' . '</a>' . '</td>' . "\n";
         // delete link
         $out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=rqDelete')) . '">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang("Delete") . '" />' . '</a>' . '</td>' . "\n";
         if (true === $is_allowedToAdmin) {
             $out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=exExport')) . '">' . '<img src="' . get_icon_url('export') . '" alt="' . get_lang("Export") . '" />' . '</a>' . '</td>' . "\n";
         }
     }
     $out .= '</tr>' . "\n";
     if (!empty($entry['description'])) {
         $out .= '<tr>' . "\n";
         if ($groupId && claro_is_group_member()) {
             $colspan = 5;
         } elseif ($is_allowedToAdmin) {
             $colspan = 6;
         } else {
             $colspan = 3;
         }
         $out .= '<td colspan="' . $colspan . '"><div class="comment">' . $entry['description'] . '</div></td>' . "\n" . '</tr>' . "\n";
     }
 }
示例#12
0
文件: viewer.php 项目: rhertzog/lcs
    ?>
" name="bottomFrame" />
    </frameset>
<?php 
} else {
    ?>
    <frameset cols="*" border="0">
        <frame src="<?php 
    echo claro_htmlspecialchars(Url::Contextualize('startModule.php'));
    ?>
" name="mainFrame" />
    </frameset>
<?php 
}
?>
    <noframes>
        <body>
            <?php 
echo get_lang('Your browser cannot see frames.');
?>
            <br />
            <a href="<?php 
echo claro_htmlspecialchars(Url::Contextualize('../module.php'));
?>
"><?php 
echo get_lang('Back');
?>
</a>
        </body>
    </noframes>
</html>
示例#13
0
文件: document.php 项目: rhertzog/lcs
             /* DELETE COMMAND */
             $out .= '<td>' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exRm&amp;file=' . $cmdFileName)) . '" ' . 'onclick="return CLDOC.confirmation(\'' . clean_str_for_javascript($dspFileName) . '\');">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang('Delete') . '" />' . '</a>' . '</td>' . "\n";
             /* MOVE COMMAND */
             $out .= '<td>' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=rqMv&amp;file=' . $cmdFileName)) . '">' . '<img src="' . get_icon_url('move') . '" alt="' . get_lang('Move') . '" />' . '</a>' . '</td>' . "\n" . '<td>';
             if ($groupContext) {
                 /* PUBLISH COMMAND */
                 if ($thisFile['type'] == A_FILE) {
                     $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLWRK') . '/work.php?' . 'submitGroupWorkUrl=' . urlencode($thisFile['path']))) . '">' . '<small>' . get_lang('Publish') . '</small>' . '</a>';
                 }
                 // else noop
             } elseif ($courseContext) {
                 /* VISIBILITY COMMAND */
                 if ($thisFile['visibility'] == "i") {
                     $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exChVis&amp;file=' . $cmdFileName . '&amp;vis=v')) . '">' . '<img src="' . get_icon_url('invisible') . '" alt="' . get_lang('Make visible') . '" />' . '</a>';
                 } else {
                     $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exChVis&amp;file=' . $cmdFileName . '&amp;vis=i')) . '">' . '<img src="' . get_icon_url('visible') . '" alt="' . get_lang('Make invisible') . '" />' . '</a>';
                 }
             }
             $out .= '</td>' . "\n";
         }
         // end if($is_allowedToEdit)
         $out .= '</tr>' . "\n";
         /* COMMENTS */
         if ($thisFile['comment'] != '') {
             $thisFile['comment'] = claro_htmlspecialchars($thisFile['comment']);
             $thisFile['comment'] = claro_parse_user_text($thisFile['comment']);
             $out .= '<tr align="left">' . "\n" . '<td colspan="' . $colspan . '">' . '<div class="comment">' . $thisFile['comment'] . '</div>' . '</td>' . "\n" . '</tr>' . "\n";
         }
     }
     // end each ($fileList)
 } else {
示例#14
0
?>
" method="post">
    <input type="hidden" name="claroFormId" value="<?php 
echo uniqid('');
?>
" />
    <input type="hidden" name="cmd" value="<?php 
echo $this->nextCommand;
?>
" />
    <input type="hidden" name="catId" value="<?php 
echo $this->catId;
?>
" />
    <label for="catName"><?php 
echo get_lang('Name');
?>
 : </label><br />
    <input type="text" name="catName" id="catName" value="<?php 
echo $this->catName;
?>
" /><br /><br />
    <input type="submit" value="<?php 
echo get_lang('Ok');
?>
" />&nbsp;
    <?php 
echo claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'])), get_lang('Cancel'));
?>
</form>
示例#15
0
文件: config.php 项目: rhertzog/lcs
$output .= '<table class="claroTable emphaseLine" ' . 'width="100%" border="0" cellspacing="2">' . "\n" . '<thead>' . "\n" . '<tr align="center" valign="top">' . "\n" . '<th>' . get_lang('Title') . '</th>' . "\n" . '<th>' . get_lang('Visibility') . '</th>' . "\n" . '<th colspan="2">' . get_lang('Order') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n";
if (is_array($portletList) && !empty($portletList)) {
    // only used to hide first up and last down commands
    $portletListSize = count($portletList);
    $i = 0;
    foreach ($portletList as $portlet) {
        $i++;
        $output .= "\n" . '<tr>' . "\n" . '<td>' . claro_htmlspecialchars(get_lang($portlet['name'])) . '</td>' . "\n";
        if ($portlet['visibility'] == 'visible') {
            $output .= "\n" . '<td align="center">' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exInvisible&amp;label=' . claro_htmlspecialchars($portlet['label']))) . '">' . claro_html_icon('visible') . '</a>' . "\n" . '</td>' . "\n";
        } else {
            $output .= "\n" . '<td align="center">' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exVisible&amp;label=' . claro_htmlspecialchars($portlet['label']))) . '">' . claro_html_icon('invisible') . '</a>' . "\n" . '</td>' . "\n";
        }
        if ($i > 1) {
            $output .= '<td align="center">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?label=' . claro_htmlspecialchars($portlet['label']) . '&amp;cmd=exUp')) . '">' . '<img src="' . get_icon_url('move_up') . '" alt="' . get_lang('Move up') . '" />' . '</a>' . '</td>' . "\n";
        } else {
            $output .= '<td>&nbsp;</td>' . "\n";
        }
        if ($i < $portletListSize) {
            $output .= '<td align="center">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?label=' . claro_htmlspecialchars($portlet['label']) . '&amp;cmd=exDown')) . '">' . '<img src="' . get_icon_url('move_down') . '" alt="' . get_lang('Move down') . '" />' . '</a>' . '</td>' . "\n";
        } else {
            $output .= '<td>&nbsp;</td>' . "\n";
        }
        $output .= '</tr>' . "\n";
    }
} else {
    $output .= '<tr><td colspan="4">' . get_lang('Empty') . '</tr></td>' . "\n";
}
$output .= "\n" . '</tbody>' . "\n" . '</table>' . "\n";
$claroline->display->body->appendContent($output);
echo $claroline->display->render();
示例#16
0
?>
        
        <?php 
if (claro_is_allowed_to_edit() && !empty($this->activablePortlets)) {
    ?>
        <ul class="commandList">
            <?php 
    foreach ($this->activablePortlets as $portlet) {
        ?>
            <li>
                <a style="background-image: url(<?php 
        echo get_icon_url('add');
        ?>
); background-repeat: no-repeat; background-position: left center; padding-left: 20px;"
                    href="<?php 
        echo claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?portletCmd=exAdd&portletLabel=' . $portlet['label'])) . '&courseId=' . ClaroCourse::getIdFromCode(claro_get_current_course_id());
        ?>
">
                    <?php 
        echo get_lang('Add a new portlet');
        ?>
: <?php 
        echo get_lang($portlet['name']);
        ?>
                </a>
            </li>
            <?php 
    }
    ?>
        </ul>
        <?php 
示例#17
0
文件: rqmkhtml.php 项目: rhertzog/lcs
}
$nameTools = get_lang('Create/edit document');
$out = '';
$out .= claro_html_tool_title(array('mainTitle' => get_lang('Documents and Links'), 'subTitle' => get_lang('Create/edit document')));
/*========================================================================
CREATE DOCUMENT
========================================================================*/
if ($cmd == 'rqMkHtml') {
    $out .= '<form action="' . claro_htmlspecialchars(get_module_entry_url('CLDOC')) . '" method="post">' . "\n" . claro_form_relay_context() . "\n" . '<input type="hidden" name="cmd" value="exMkHtml" />' . "\n" . '<input type="hidden" name="cwd" value="' . claro_htmlspecialchars(strip_tags($cwd)) . '" />' . "\n" . '<p>' . "\n" . '<b>' . get_lang('Document name') . '&nbsp;: </b><br />' . "\n" . '<input type="text" name="fileName" size="80" />' . "\n" . '</p>' . "\n" . '<p>' . "\n" . '<b>' . get_lang('Document content') . '&nbsp;: </b>' . "\n";
    if (!empty($_REQUEST['htmlContent'])) {
        $content = $_REQUEST['htmlContent'];
    } else {
        $content = "";
    }
    $out .= claro_html_textarea_editor('htmlContent', $content);
    // the second argument _REQUEST['htmlContent'] for the case when we have to
    // get to the editor because of an error at creation
    // (eg forgot to give a file name)
    $out .= '</p>' . "\n" . '<p>' . "\n" . '<input type="submit" value="' . get_lang('Ok') . '" />&nbsp;' . claro_html_button(claro_htmlspecialchars(Url::Contextualize('./document.php?cmd=exChDir&amp;file=' . strip_tags($cwd))), get_lang('Cancel')) . '</p>' . "\n" . '</form>' . "\n";
} elseif ($cmd == "rqEditHtml" && !empty($file)) {
    if (is_parent_path($baseWorkDir, $file)) {
        $fileContent = implode("\n", file($baseWorkDir . $file));
    } else {
        claro_die('WRONG PATH');
    }
    $fileContent = get_html_body_content($fileContent);
    $out .= '<form action="' . claro_htmlspecialchars(get_module_entry_url('CLDOC')) . '" method="post">' . "\n" . claro_form_relay_context() . "\n" . '<input type="hidden" name="cmd" value="exEditHtml" />' . "\n" . '<input type="hidden" name="file" value="' . claro_htmlspecialchars(base64_encode($file)) . '" />' . "\n" . '<b>' . get_lang('Document name') . ' : </b><br />' . "\n" . $file . "\n" . '</p>' . "\n" . '<p>' . "\n" . '<b>' . get_lang('Document content') . ' : </b>' . "\n" . claro_html_textarea_editor('htmlContent', $fileContent) . "\n" . '</p>' . '<p>' . '<input type="submit" value="' . get_lang('Ok') . '" />&nbsp;' . "\n" . claro_html_button(claro_htmlspecialchars(Url::Contextualize('./document.php?cmd=rqEdit&file=' . base64_encode($file))), get_lang('Cancel')) . "\n" . '</p>' . "\n" . '</form>' . "\n";
}
$out .= '<br />' . "\n" . '<br />' . "\n";
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
示例#18
0
} else {
    foreach ($searchResultList as $thisPost) {
        // PREVENT USER TO CONSULT POST FROM A GROUP THEY ARE NOT ALLOWED
        if (!is_null($thisPost['group_id']) && $is_groupPrivate && !(in_array($thisPost['group_id'], $userGroupList) || in_array($thisPost['group_id'], $tutorGroupList) || claro_is_course_manager())) {
            continue;
        } else {
            // notify if is new message
            $post_time = datetime_to_timestamp($thisPost['post_time']);
            if ($post_time < $last_visit) {
                $class = ' class="item"';
            } else {
                $class = ' class="item hot"';
            }
            // get user picture
            $userData = user_get_properties($thisPost['poster_id']);
            $picturePath = user_get_picture_path($userData);
            if ($picturePath && file_exists($picturePath)) {
                $pictureUrl = user_get_picture_url($userData);
            } else {
                $pictureUrl = null;
            }
            $out .= '<div id="post' . $thisPost['post_id'] . '" class="threadPost">' . '<div class="threadPostInfo">' . (!is_null($pictureUrl) ? '<div class="threadPosterPicture"><img src="' . $pictureUrl . '" alt=" " /></div>' : '') . "\n" . '<b>' . $thisPost['firstname'] . ' ' . $thisPost['lastname'] . '</b> ' . '<br />' . '<small>' . claro_html_localised_date(get_locale('dateTimeFormatLong'), $post_time) . '</small>' . "\n";
            $out .= '  </div>' . "\n" . '<div class="threadPostContent">' . "\n" . '<img src="' . get_icon_url('topic') . '" alt="" />' . '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?topic=' . $thisPost['topic_id'])) . '">' . claro_htmlspecialchars($thisPost['topic_title']) . '</a>' . "\n" . '<span class="threadPostIcon ' . $class . '"><img src="' . get_icon_url('post') . '" alt="" /></span><br />' . "\n" . claro_parse_user_text($thisPost['post_text']) . "\n";
            $out .= '</div>' . "\n" . '<div class="spacer"></div>' . "\n\n" . '</div>' . "\n";
        }
        // end else if ( ! is_null($thisPost['group_id'])
    }
}
// end for each
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
示例#19
0
文件: item.tpl.php 项目: rhertzog/lcs
" title="<?php 
        echo get_lang('Move this item up');
        ?>
">
            <img src="<?php 
        echo get_icon_url('move_up');
        ?>
" alt="<?php 
        echo get_lang('Move up');
        ?>
" />
        </a>
        
        <a
            href="<?php 
        echo claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exMvDown&amp;id=' . $this->intro->getId()));
        ?>
"
            title="<?php 
        echo get_lang('Move this item down');
        ?>
">
            <img src="<?php 
        echo get_icon_url('move_down');
        ?>
" alt="<?php 
        echo get_lang('Move down');
        ?>
" />
        </a>
    </div>
示例#20
0
                <label for="email"><?php 
echo get_lang('Email');
?>
</label>&nbsp;:
            </dt>
            <dd class="moreOptions">
                <input type="text" size="40" id="email" name="email" value="" />
            </dd>
            <dt>
                &nbsp;
            </dt>
            <dd>
                <input type="submit" name="applySearch" id="applySearch" value="<?php 
echo get_lang("Search");
?>
" />
                &nbsp;
                <a href="<?php 
echo claro_htmlspecialchars(Url::Contextualize(get_module_url('CLUSR')));
?>
">
                <input type="button" value="<?php 
echo get_lang('Cancel');
?>
" />
                </a>
            </dd>
        </dl>
    </fieldset>
</form>
示例#21
0
/**
* display a page of thumbnails
*
 * @copyright   (c) 2001-2011, Universite catholique de Louvain (UCL)
* @param imageList (array) list containing all image file names
* @param fileList (array) file properties
* @param page (int) current page number
* @param thumbnailWidth (int) width of thumbnails
* @param colWidth (int) width of columns
* @param numberOfCols (int) number of columns
* @param numberOfRows (int) number of rows
* @global curDirPath
*/
function display_thumbnails($imageList, $fileList, $page, $thumbnailWidth, $colWidth, $numberOfCols, $numberOfRows)
{
    global $curDirPath;
    global $searchCmdUrl;
    // get index of first thumbnail on the page
    $displayed = get_offset($page);
    $html = '';
    // loop on rows
    for ($rows = 0; $rows < $numberOfRows; $rows++) {
        $html .= "<tr>\n";
        // loop on columns
        for ($cols = 0; $cols < $numberOfCols; $cols++) {
            // get index of image
            $num = $imageList[$displayed];
            // get file name
            $fileName = $fileList[$num]['path'];
            // visibility style
            if ($fileList[$num]['visibility'] == 'i') {
                $style = "style=\"font-style: italic; color: silver;\"";
            } else {
                $style = '';
            }
            // display thumbnail
            /*echo "<td style=\"text-align: center;\" style=\"width:"
              . $colWidth . "%;\">\n"
              ;*/
            // omit colwidth since already in th
            $html .= "<td style=\"text-align: center;\">\n";
            $html .= "<a href=\"" . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . "?docView=image&file=" . download_url_encode($fileName) . "&cwd=" . $curDirPath . $searchCmdUrl)) . "\">";
            // display image description using title attribute
            $title = "";
            if ($fileList[$num]['comment']) {
                $text = $fileList[$num]['comment'];
                $text = cutstring($text, 40, false, 5, "...");
                $title = "title=\"" . $text . "\"";
            }
            $html .= create_thumbnail($fileName, $thumbnailWidth, $title);
            // unset title for the next pass in the loop
            unset($title);
            $html .= "</a>\n";
            // display image name
            $imgName = strlen(basename($fileList[$num]['path'])) > 25 ? substr(basename($fileList[$num]['path']), 0, 25) . "..." : basename($fileList[$num]['path']);
            $html .= "<p " . $style . ">" . $imgName . "</p>";
            $html .= "</td>\n";
            // update image number
            $displayed++;
            // finished ?
            if ($displayed >= count($imageList)) {
                $html .= "</tr>\n";
                return $html;
            }
        }
        // end loop on columns
        $html .= "</tr>\n";
    }
    // end loop on rows
    return $html;
}
示例#22
0
文件: index.php 项目: rhertzog/lcs
if (claro_is_allowed_to_edit()) {
    if ($thisCourse->status == 'pending') {
        $dialogBox->warning(get_lang('This course is deactivated: you can reactive it from your course list'));
    } elseif ($thisCourse->status == 'date') {
        if (!empty($thisCourse->publicationDate) && $thisCourse->publicationDate > claro_mktime()) {
            $dialogBox->warning(get_lang('This course will be enabled on the %date', array('%date' => claro_date('d/m/Y', $thisCourse->publicationDate))));
        }
        if (!empty($thisCourse->expirationDate) && $thisCourse->expirationDate > claro_mktime()) {
            $dialogBox->warning(get_lang('This course will be disable on the %date', array('%date' => claro_date('d/m/Y', $thisCourse->expirationDate))));
        }
    }
    if ($thisCourse->userLimit > 0) {
        $dialogBox->warning(get_lang('This course is limited to %userLimit users', array('%userLimit' => $thisCourse->userLimit)));
    }
    if ($thisCourse->registration == 'validation') {
        $courseUserList = new Claro_CourseUserList(claro_get_current_course_id());
        if ($courseUserList->has_registrationPending()) {
            $usersPanelUrl = claro_htmlspecialchars(Url::Contextualize($toolRepository . 'user/user.php'));
            $dialogBox->warning(get_lang('You have to validate users to give them access to this course through the <a href="%url">course user list</a>', array('%url' => $usersPanelUrl)));
        }
    }
}
// Get the portlets buttons
$activablePortlets = claro_is_course_manager() ? CourseHomePagePortlet::getActivablePortlets() : array();
// Display
$template = new CoreTemplate('course_index.tpl.php');
$template->assign('dialogBox', $dialogBox);
$template->assign('activablePortlets', $activablePortlets);
$template->assign('portletIterator', $portletiterator);
$claroline->display->body->setContent($template->render());
echo $claroline->display->render();
示例#23
0
" />
                        </a>
                    <?php 
            } else {
                ?>
                        &nbsp;
                    <?php 
            }
            ?>
                    </td>
                    <td align="center">
                    <?php 
            if ($questionIterator < count($this->questionList)) {
                ?>
                        <a href="<?php 
                echo claro_htmlspecialchars(Url::Contextualize('edit_exercise.php?exId=' . $this->exId . '&amp;cmd=mvDown&amp;quId=' . $question['id']));
                ?>
">
                            <img src="<?php 
                echo get_icon_url('move_down');
                ?>
" alt="<?php 
                echo get_lang('Move down');
                ?>
" />
                        </a>
                    <?php 
            } else {
                ?>
                        &nbsp;
                    <?php 
示例#24
0
} else {
    $titleParts = $nameTools;
}
Claroline::getDisplay()->body->appendContent(claro_html_tool_title($titleParts, null, $cmdList));
Claroline::getDisplay()->body->appendContent($dialogBox->render());
/**
 * FORM TO FILL OR MODIFY AN ANNOUNCEMENT
 */
if ($displayForm) {
    // DISPLAY ADD ANNOUNCEMENT COMMAND
    // Ressource linker
    if ($_REQUEST['cmd'] == 'rqEdit') {
        ResourceLinker::setCurrentLocator(ResourceLinker::$Navigator->getCurrentLocator(array('id' => (int) $_REQUEST['id'])));
    }
    $template = new ModuleTemplate($tlabelReq, 'form.tpl.php');
    $template->assign('formAction', Url::Contextualize($_SERVER['PHP_SELF']));
    $template->assign('relayContext', claro_form_relay_context());
    $template->assign('cmd', $formCmd);
    $template->assign('announcement', $announcement);
    Claroline::getDisplay()->body->appendContent($template->render());
}
/**
 * ANNOUNCEMENTS LIST
 */
if ($displayList) {
    // Get notification date
    if (claro_is_user_authenticated()) {
        $date = $claro_notifier->get_notification_date(claro_get_current_user_id());
    }
    $preparedAnnList = array();
    $lastPostDate = '';
示例#25
0
                $cmdList[] = array('name' => get_lang('Full review'), 'url' => claro_htmlspecialchars(Url::Contextualize($viewallUrl)));
            }
        }
    }
    $out .= $postLister->disp_pager_tool_bar($pagerUrl);
    try {
        $display = new ModuleTemplate('CLFRM', 'forum_viewtopic.tpl.php');
        $display->assign('forum_id', $forumId);
        $display->assign('topic_id', $topicId);
        $display->assign('topic_subject', $topicSettingList['topic_title']);
        $display->assign('postList', $postList);
        $display->assign('is_allowedToEdit', $is_allowedToEdit);
        $display->assign('anonymity', $anonymityStatus);
        $display->assign('claro_notifier', $claro_notifier);
        $display->assign('is_post_allowed', $is_postAllowed);
        $out .= $display->render();
    } catch (Exception $ex) {
        $dialogBox->error($ex);
    }
    if ($is_postAllowed) {
        $replyUrl = Url::Contextualize($_SERVER['PHP_SELF'] . '?topic=' . $topicId . '&amp;cmd=rqPost' . '&amp;mode=reply');
        $toolBar[] = claro_html_cmd_link(claro_htmlspecialchars($replyUrl), '<img src="' . get_icon_url('reply') . '" alt="" />' . ' ' . get_lang('Reply'));
        $out .= '<p>' . claro_html_menu_horizontal($toolBar) . '</p>';
    }
    $out .= $postLister->disp_pager_tool_bar($pagerUrl);
}
// Page title
$out = claro_html_tool_title($nameTools, $is_allowedToEdit ? get_help_page_url('blockForumsHelp', 'CLFRM') : false, $cmdList) . $out;
ClaroBreadCrumbs::getInstance()->setCurrent(get_lang('Forums'), 'index.php');
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
示例#26
0
文件: html.lib.php 项目: rhertzog/lcs
/**
 * Create a navigation tab bar
 *
 * @param array $section_list associative array of tabs tab id => tab label
 * @param string $section_selected_id selected tab id
 * @param array $url_params associative array of additionnal parameters
 *      name => value
 * @param string $section_request_var_name name of the HTTP GET variable
 *      to store the current tab id
 * @param string $baseUrl base url of the navigation tab bar
 * @return string html navigation tab bar
 */
function claro_html_tab_bar($section_list, $section_selected_id = null, $url_params = array(), $section_request_var_name = 'section', $baseUrl = null)
{
    $menu = '';
    if (!empty($section_list)) {
        $baseUrl = empty($baseUrl) ? $_SERVER['PHP_SELF'] : $baseUrl;
        $baseUrl .= false !== strpos($baseUrl, '?') ? '&amp;' : '?';
        $extra_url_params = '';
        if (!empty($url_params)) {
            foreach ($url_params as $name => $value) {
                $extra_url_params .= '&amp;' . claro_htmlspecialchars($name) . '=' . claro_htmlspecialchars($value);
            }
        }
        $menu = '<div>' . "\n";
        $menu .= '<ul id="navlist">' . "\n";
        foreach ($section_list as $section_id => $section_label) {
            if (empty($section_selected_id)) {
                $section_selected_id = $section_id;
            }
            $menu .= '<li>' . '<a ' . ($section_id == $section_selected_id ? 'class="current"' : '') . ' href="' . claro_htmlspecialchars(Url::Contextualize($baseUrl . claro_htmlspecialchars($section_request_var_name) . '=' . claro_htmlspecialchars($section_id) . $extra_url_params)) . '" ' . 'id="' . claro_htmlspecialchars($section_id) . '">' . get_lang($section_label) . '</a>' . '</li>' . "\n";
        }
        $menu .= '</ul>' . "\n";
        $menu .= '</div>' . "\n";
    }
    return $menu;
}
示例#27
0
    $out .= '</fieldset>' . '<br />' . "\n";
}
if ($is_allowedToEditAll) {
    // Submission download requested
    if ($cmd == 'rqDownload' && (claro_is_platform_admin() || get_conf('allow_download_all_submissions'))) {
        require_once $includePath . '/lib/form.lib.php';
        $downloadForm = '<strong>' . get_lang('Download') . '</strong>' . "\n" . '<form action="' . get_module_url('CLWRK') . '/export.php?assigId=' . $req['assignmentId'] . '" method="POST">' . "\n" . claro_form_relay_context() . '<input type="hidden" name="cmd" value="exDownload" />' . "\n" . '<input type="radio" name="downloadMode" id="downloadMode_from" value="from" checked /><label for="downloadMode_from">' . get_lang('Submissions posted or modified after date :') . '</label><br />' . "\n" . claro_html_date_form('day', 'month', 'year', time(), 'long') . ' ' . claro_html_time_form('hour', 'minute', time() - fmod(time(), 86400) - 3600) . '<small>' . get_lang('(d/m/y hh:mm)') . '</small>' . '<br /><br />' . "\n" . '<input type="radio" name="downloadMode" id="downloadMode_all" value="all" /><label for="downloadMode_all">' . get_lang('All submissions') . '</label><br /><br />' . "\n" . '<input type="checkbox" name="downloadOnlyCurrentMembers" id="downloadOnlyCurrentMembers_id" value="yes" checked="checked" /><label for="downloadOnlyCurrentMembers_id">' . get_lang('Download only submissions from current course members') . '</label><br /><br />' . "\n" . '<input type="checkbox" name="downloadScore" id="downloadScore_id" value="yes" checked="checked" /><label for="downloadScore_id">' . get_lang('Download score') . '</label><br /><br />' . "\n" . '<input type="submit" value="' . get_lang('OK') . '" />&nbsp;' . "\n" . claro_html_button('work_list.php?assigId=' . $req['assignmentId'], get_lang('Cancel')) . '</form>' . "\n";
        $dialogBox->form($downloadForm);
    }
}
// Render dialog box
$out .= $dialogBox->render();
/**
 * Submitter (User or group) listing
 */
$headerUrl = $workPager->get_sort_url_list(Url::Contextualize($_SERVER['PHP_SELF'] . '?assigId=' . $req['assignmentId']));
$out .= $workPager->disp_pager_tool_bar(Url::Contextualize($_SERVER['PHP_SELF'] . "?assigId=" . $req['assignmentId'])) . '<table class="claroTable emphaseLine" width="100%">' . "\n" . '<thead>' . "\n" . '<tr class="headerX">' . "\n" . '<th>' . '<a href="' . $headerUrl['name'] . '">' . get_lang('Author(s)') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['last_edit_date'] . '">' . get_lang('Last submission') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['submissionCount'] . '">' . get_lang('Submissions') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['feedbackCount'] . '">' . get_lang('Feedbacks') . '</a>' . '</th>' . "\n";
if ($is_allowedToEditAll) {
    $out .= '<th>' . '<a href="' . $headerUrl['maxScore'] . '">' . get_lang('Best score') . '</a>' . '</th>' . "\n";
}
$out .= '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>';
foreach ($workList as $thisWrk) {
    $out .= '<tr align="center">' . "\n" . '<td align="left">' . $thisWrk['name'] . '</td>' . "\n" . '<td>' . (!empty($thisWrk['title']) ? $thisWrk['title'] . '<small> ( ' . $thisWrk['last_edit_date'] . ' )</small>' : '&nbsp;') . '</td>' . "\n" . '<td>' . $thisWrk['submissionCount'] . '</td>' . "\n" . '<td>' . $thisWrk['feedbackCount'] . '</td>' . "\n";
    if ($is_allowedToEditAll) {
        $out .= '<td>' . (!is_null($thisWrk['maxScore']) && $thisWrk['maxScore'] > -1 ? $thisWrk['maxScore'] : get_lang('No score')) . '</td>' . "\n";
    }
    $out .= '</tr>' . "\n\n";
}
$out .= '</tbody>' . "\n" . '</table>' . "\n\n" . $workPager->disp_pager_tool_bar(Url::Contextualize($_SERVER['PHP_SELF'] . "?assigId=" . $req['assignmentId']));
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
示例#28
0
        ?>
" 
                        class="item">
                        
                        <?php 
        echo claro_htmlspecialchars($thisGroupMember['lastName'] . ' ' . $thisGroupMember['firstName']);
        ?>
                    </a>
        
                    <?php 
        if (current_user_is_allowed_to_send_message_to_user($thisGroupMember['id'])) {
            ?>

                    - <a 
                        href="<?php 
            echo claro_htmlspecialchars(Url::Contextualize('../messaging/sendmessage.php?cmd=rqMessageToUser&amp;userId=' . (int) $thisGroupMember['id']));
            ?>
">
                        <?php 
            echo get_lang('Send a message');
            ?>
                    </a>
                    
                    <?php 
        }
        ?>
        
                    <br />
                    
                    <?php 
    }
示例#29
0
文件: profile.php 项目: rhertzog/lcs
$cmdList = array();
switch ($display) {
    case DISP_PROFILE_FORM:
        // Display user tracking link
        $profileText = claro_text_zone::get_content('textzone_edit_profile_form');
        if (get_conf('is_trackingEnabled')) {
            // Display user tracking link
            $cmdList[] = array('img' => 'statistics', 'name' => get_lang('View my statistics'), 'url' => claro_htmlspecialchars(Url::Contextualize(get_conf('urlAppend') . '/claroline/tracking/userReport.php?userId=' . claro_get_current_user_id())));
        }
        // Display request course creator status
        if (!claro_is_allowed_to_create_course() && get_conf('can_request_course_creator_status')) {
            $cmdList[] = array('name' => get_lang('Request course creation status'), 'url' => claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=reqCCstatus')));
        }
        // Display user revoquation
        if (get_conf('can_request_revoquation')) {
            $cmdList[] = array('img' => 'delete', 'name' => get_lang('Delete my account'), 'url' => claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=reqRevoquation')));
        }
        if (claro_is_platform_admin()) {
            $dialogBox->info(get_lang('As a platform administrator, you can edit any field you want, even if this field isn\'t editable for other users.<br />You can check the list of editable fields in your platform\'s configuration.'));
        }
        break;
}
// Display
$out = '';
$out .= claro_html_tool_title($nameTools, null, $cmdList) . $dialogBox->render();
switch ($display) {
    case DISP_PROFILE_FORM:
        // Display form profile
        if (trim($profileText) != '') {
            $out .= '<div class="info profileEdit">' . $profileText . '</div>';
        }
示例#30
0
 /**
  * display the form to edit answers
  *
  * @param $exId exercise id, required to get stay in the exercise context if required after posting the form
  * @param $askDuplicate display or not the form elements allowing to choose if the question must be duplicated or modified in all exercises
  * @author Sebastien Piraux <*****@*****.**>
  * @return string html code for display of answer edition form
  */
 public function getFormHtml($exId = null, $askDuplicate)
 {
     $html = '<form method="post" action="./edit_answers.php?exId=' . $exId . '&amp;quId=' . $this->questionId . '">' . "\n" . '<input type="hidden" name="cmd" value="exEdit" />' . "\n" . '<input type="hidden" name="step" value="' . $this->step . '" />' . "\n" . claro_form_relay_context() . "\n";
     if ($this->step > 1) {
         $html .= '<input type="hidden" name="answer" value="' . claro_htmlspecialchars($this->answerText) . '" />' . "\n" . '<input type="hidden" name="type" value="' . claro_htmlspecialchars($this->type) . '" />' . "\n" . '<input type="hidden" name="wrongAnswerList" value="' . claro_htmlspecialchars(implode("\n", $this->wrongAnswerList)) . '" />' . "\n\n";
         if (!empty($exId) && $askDuplicate) {
             if (isset($_REQUEST['duplicate'])) {
                 $html .= '<input type="hidden" name="duplicate" value="' . claro_htmlspecialchars($_REQUEST['duplicate']) . '" />' . "\n";
             }
         }
         $html .= '<p>' . get_lang('Please give a weighting to each blank') . '&nbsp;:</p>' . "\n" . '<table border="0" cellpadding="5" width="500">' . "\n";
         $i = 0;
         foreach ($this->answerList as $correctAnswer) {
             $value = isset($this->gradeList[$i]) ? $this->gradeList[$i] : '0';
             $html .= '<tr>' . "\n" . '<td width="50%">' . $correctAnswer . '</td>' . "\n" . '<td width="50%">' . '<input type="text" name="grade[' . $i . ']" size="5" value="' . $value . '" />' . '</td>' . "\n" . '</tr>' . "\n\n";
             $i++;
         }
         $html .= '</table>' . "\n\n" . '<input type="submit" name="cmdBack" value="&lt; ' . get_lang('Back') . '" />&nbsp;&nbsp;' . '<input type="submit" name="cmdOk" value="' . get_lang('Ok') . '" />&nbsp;&nbsp;' . claro_html_button('./edit_question.php?exId=' . $exId . '&amp;quId=' . $this->questionId, get_lang("Cancel"));
     } else {
         // populate fields of other steps
         $i = 0;
         foreach ($this->gradeList as $grade) {
             $html .= '<input type="hidden" name="grade[' . $i . ']" value="' . $grade . '" />' . "\n";
             $i++;
         }
         if (!empty($exId) && $askDuplicate) {
             $html .= '<p>' . html_ask_duplicate() . '</p>' . "\n";
         }
         // answer
         $text = $this->addslashesEncodedBrackets($this->answerText);
         $text = $this->answerDecode($text);
         $html .= '<p>' . get_lang('Please type your text below, use brackets %mask to define one or more blanks', array('%mask' => '&#91;...&#93;')) . ' :</p>' . "\n" . claro_html_textarea_editor('answer', $text) . "\n" . '<p>' . get_lang('Fill type') . '&nbsp;:</p>' . "\n" . '<p>' . "\n" . '<input type="radio" name="type" id="textFill" value="' . TEXTFIELD_FILL . '"' . ($this->type == TEXTFIELD_FILL ? 'checked="checked"' : '') . ' /><label for="textFill">' . get_lang('Fill text field') . '</label><br />' . "\n" . '<input type="radio" name="type" id="listboxFill" value="' . LISTBOX_FILL . '"' . ($this->type == LISTBOX_FILL ? 'checked="checked"' : '') . ' /><label for="listboxFill">' . get_lang('Select in drop down list') . '</label><br />' . "\n" . '</p>' . "\n" . '<p>' . get_lang('Add wrong answers for drop down lists <small>(Optionnal. One wrong answer by line.)</small>') . '</p>' . '<textarea name="wrongAnswerList" cols="30" rows="5">' . claro_htmlspecialchars($this->answerDecode(implode("\n", $this->wrongAnswerList))) . '</textarea>' . "\n" . '<p>' . "\n" . '<input type="submit" name="cmdNext" value="' . get_lang('Next') . ' &gt;" />&nbsp;&nbsp;' . claro_html_button(Url::Contextualize('./edit_question.php?exId=' . $exId . '&amp;quId=' . $this->questionId), get_lang("Cancel")) . '</p>' . "\n";
     }
     $html .= '</form>';
     return $html;
 }