Пример #1
0
$statusicon = '<img src="'.$CFG->wwwroot.'/mod/wiziq/pix/refresh.png" alt='.$refresh_txt.'/>';
$stausimage_first = '<a href="javascript:location.reload(true)"';
$stausimage_second = ' title="'.$refresh_txt.'">'.$statusicon.'</a>';
$stausimage = $stausimage_first.$stausimage_second;
$status = 'Status'." ".$stausimage;
$nameheding = get_string('nameheading', 'wiziq');
$deleteheading = get_string('deleteheading', 'wiziq');
$table->define_headers(array($nameheding, $status, $deleteheading));
$table->column_style_all('text-align', 'left');
$table->column_style('name', 'width', 'auto');
$table->column_style('status', 'text-align', 'center');
$table->column_style('delete', 'text-align', 'center');
$table->column_style('status', 'width', '180px');
$table->column_style('delete', 'width', '180px');
$table->define_baseurl($PAGE->url);
$table->is_downloadable(false);
$table->sortable(false);
$table->pageable(true);
echo $OUTPUT->header();
#--------------------------tabs for navigation-----------
$schedulenewwiziqclass = new moodle_url("$CFG->wwwroot/course/modedit.php",
        array('add' => 'wiziq', 'type' => '', 'course' => $course->id,
              'section' => '0', 'return' => '0'));
$navigationtabsmanage = new moodle_url("$CFG->wwwroot/mod/wiziq/index.php",
        array('id' =>  $course->id, 'sesskey' => sesskey()));
$navigationtabscontent = new moodle_url("$CFG->wwwroot/mod/wiziq/content.php",
        array('id' => $course->id, 'sesskey' => sesskey()));
$tabs =array();
$row = array();
$row[] = new tabobject('wiziq_sch_class', $schedulenewwiziqclass,
        get_string('schedule_class', 'wiziq'));
Пример #2
0
// ;)
if ($includeEvents == TxttoolsSentMessageDAO::$EVENT_QUERY_INCLUDE || $includeEvents == TxttoolsSentMessageDAO::$EVENT_QUERY_EXCLUSIVE) {
    array_push($tablecolumns, "generation");
    array_push($tableheaders, get_string('tableheadergeneration', 'block_moodletxt'));
}
$table->define_columns($tablecolumns);
$table->define_headers($tableheaders);
$table->sortable(true, 'time', SORT_DESC);
$table->no_sorting('message');
$table->collapsible(true);
$table->pageable(true);
$table->pagesize($MESSAGES_PER_PAGE, $sentMessagesDAO->countMessagesSent(0, $USER->id));
if ($download != '') {
    $table->is_downloading($download, get_string('exportsheetsent', 'block_moodletxt'), get_string('exporttitlesent', 'block_moodletxt'));
}
$table->is_downloadable(true);
$table->show_download_buttons_at(array(TABLE_P_BOTTOM));
$table->setup();
// BEGIN PAGE OUTPUT
if (!$table->is_downloading()) {
    // Drop in page header
    echo $output->header();
    echo $output->box($sentMessagesDAO->countMessagesSent() . get_string('sentnoticefrag1', 'block_moodletxt') . $sentMessagesDAO->countMessageRecipients() . get_string('sentnoticefrag2', 'block_moodletxt') . html_writer::empty_tag('br') . $sentMessagesDAO->countMessagesSent(0, $userToView) . get_string('sentnoticefrag3', 'block_moodletxt'));
    // Show select box allow user to show/hide event-generated messages
    $eventSelect = new single_select(new moodle_url('sent.php', array('course' => $courseId, 'instance' => $instanceId, 'user' => $userToView)), 'events', array(TxttoolsSentMessageDAO::$EVENT_QUERY_DISCARD => get_string('optioneventhide', 'block_moodletxt'), TxttoolsSentMessageDAO::$EVENT_QUERY_INCLUDE => get_string('optioneventshow', 'block_moodletxt'), TxttoolsSentMessageDAO::$EVENT_QUERY_EXCLUSIVE => get_string('optioneventonly', 'block_moodletxt')), $includeEvents, false);
    $eventSelect->set_label(get_string('labelshowmessagebygenerator', 'block_moodletxt'));
    echo $output->render($eventSelect);
    // Show user list if the user has permission to see other people's messages
    if ($canAdminUsers) {
        $optionSet = array(0 => get_string('optionallusers', 'block_moodletxt'));
        $userList = $userDAO->getAllUsers();