Пример #1
0
		} else {
			$feed = $_POST['feed'];
			$message = 'feed updated';
		}

		update_feed($feed, $module, array_keys($_POST['cat']));

		header('Location: ' . implode('/', array(WWW_ROOT, 'module', $module, feed_id_encode($feed))));
		message($message);

		return;
	}
	$feed = !empty($request_parts[2]) ? feed_id_decode($request_parts[2]) : NULL;
	$args = array(
		'module' => $module, 
		'filters' => get_filters($module),
		'feed' => $feed,
		'feed_cats' => get_feed_cats($feed)
	);

	if ($feed) {
		$args['title'] = module_name($module) . ' ' . feed_id_encode($feed);
		$args['feed_items'] = get_feed_items($module, $feed);
		template('module', $args);
	} else {
		$args['title'] = module_name($module);
		template('module', $args);
	}
}

http_response_code(404);
Пример #2
0
    
    <div class="container-fluid">
			<?php 
if (is_login()) {
    ?>
      <div class="nav-collapse collapse">
          <ul class="nav">
              <li <?php 
    echo $current == 'beranda' ? 'class="active"' : '';
    ?>
>
                  <a class="brand visible-desktop" href="<?php 
    echo active_module_url();
    ?>
"><?php 
    echo module_name();
    ?>
</a>
              </li>

          <!-- PPAT -->
              <li class="dropdown <?php 
    echo $current == 'sspd' ? 'active' : '';
    ?>
">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">SSPD<strong class="caret"></strong></a>
                  <ul class="dropdown-menu">
                      <li><a href="<?php 
    echo active_module_url('sspd');
    ?>
">Registrasi SSPD</a></li>
function user_inprogress_courses_report($userid)
{
    global $CFG, $DB;
    $count_course = 0;
    $courses = $DB->get_records_sql('select
    c.id,c.category,c.fullname,cc.timeenrolled from
    	{course} c inner join {course_completions} cc on c.id = cc.course where
    	cc.timecompleted is NULL and cc.timeenrolled > 0 and cc.userid = ' . $userid);
    $table = new html_table();
    $table->head = array(get_string('s_no', 'block_course_status_tracker'), get_string('module', 'block_course_status_tracker'), get_string('course_name', 'block_course_status_tracker'), get_string('timeenrolled', 'block_course_status_tracker'));
    $table->size = array('20%', '35%', '50%');
    $table->width = "80%";
    $table->align = array('center', 'left', 'left');
    $table->data = array();
    $i = 0;
    if ($courses) {
        foreach ($courses as $course) {
            $row = array();
            $row[] = ++$i;
            $row[] = module_name($course->category);
            $row[] = "<a href=" . $CFG->wwwroot . "/course/view.php?id=" . $course->id . ">" . $course->fullname . "</a>";
            $row[] = date(DATE_RFC1123, $course->timeenrolled);
            $table->data[] = $row;
        }
    }
    return $table;
}
Пример #4
0
$modules = get_modules();

random_emoji();

?>

<table>
<tr>
	<th>module</th>
	<th>items</th>
</tr>
<? foreach ($modules as $item) : ?>
<tr>
	<td>
		<strong>
			<a href="<?php 
echo module_link($item['module']);
?>
"><?php 
echo module_name($item['module']);
?>
		</strong>
	</td>
	<td><?php 
echo $item['count'];
?>
</td>
</tr>
<? endforeach; ?>
</table>
/**
 * This function return list of courses in which user enrolled.
 *
 * @see module_name()
 * @enrol_get_users_courses
 * @param int    $userid Moodle userid
 * @return  Return table in which user can see the enrolled courses list.
 */
function user_enrolled_courses_report($userid)
{
    global $CFG;
    $count_course = 0;
    $courses = enrol_get_users_courses($userid, false, 'id, shortname, showgrades');
    if ($courses) {
        $table = new html_table();
        $table->head = array(get_string('s_no', 'block_course_status_tracker'), get_string('module', 'block_course_status_tracker'), get_string('course_name', 'block_course_status_tracker'));
        $table->size = array('15%', '35%', '50%');
        $table->align = array('center', 'left', 'left');
        $table->width = '80%';
        $table->data = array();
        $i = 0;
        foreach ($courses as $course) {
            $row = array();
            $row[] = ++$i;
            $row[] = module_name($course->category);
            $row[] = "<a href=" . $CFG->wwwroot . "/course/view.php?id=" . $course->id . ">" . course_name($course->id) . "</a>";
            $table->data[] = $row;
        }
    }
    return $table;
}