$sql_result = MySpace::get_connections_to_course($user_id, $course_code);
        }
        $foo_print = grapher($sql_result, $start_date, $end_date, $type);
        echo $foo_print;
        break;
    case 'access_detail_by_date':
        $db = array('is_empty' => true);
        $start_date = isset($_REQUEST['startDate']) ? $_REQUEST['startDate'] : "";
        $end_date = isset($_REQUEST['endDate']) ? $_REQUEST['endDate'] : "";
        $user_id = isset($_REQUEST['student']) ? $_REQUEST['student'] : "";
        $course_code = isset($_REQUEST['course']) ? $_REQUEST['course'] : "";
        $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : "";
        $sql_result = get_connections_to_course_by_date($user_id, $course_code, $start_date, $end_date);
        if (is_array($sql_result) && count($sql_result) > 0) {
            $db['is_empty'] = false;
            $db['result'] = convert_to_string($sql_result);
            $rst = get_stats($user_id, $course_code, $start_date, $end_date);
            $foo_stats = '<strong>' . get_lang('Total') . ': </strong>' . $rst['total'] . '<br />';
            $foo_stats .= '<strong>' . get_lang('Average') . ': </strong>' . $rst['avg'] . '<br />';
            $foo_stats .= '<strong>' . get_lang('Quantity') . ' : </strong>' . $rst['times'] . '<br />';
            $db['stats'] = $foo_stats;
            $db['graph_result'] = grapher($sql_result, $start_date, $end_date, $type);
        } else {
            $db['result'] = Display::return_message(get_lang('NoDataAvailable'), 'warning');
            $db['graph_result'] = Display::return_message(get_lang('NoDataAvailable'), 'warning');
            $db['stats'] = Display::return_message(get_lang('NoDataAvailable'), 'warning');
        }
        header('Cache-Control: no-cache');
        echo json_encode($db);
        break;
}
Exemple #2
0
</script>';
$htmlHeadXtra[] = '
  <script>
  $(function() {
    $( ".datepicker" ).datepicker();
  });
  </script>

	';
//Changes END
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AccessDetails'));
Display::display_header('');
$main_user_info = api_get_user_info($user_id);
$result_to_print = '';
$sql_result = MySpace::get_connections_to_course($user_id, $course_code);
$result_to_print = convert_to_string($sql_result);
echo Display::page_header(get_lang('DetailsStudentInCourse'));
echo Display::page_subheader(get_lang('User') . ': ' . api_get_person_name($main_user_info['firstName'], $main_user_info['lastName']) . ' - ' . get_lang('Course') . ': ' . $course_code);
?>


    <div>
    <table width="300">
    	<FORM name="formulario" action="javascript:path()">
       		<tr height="2%">
                <!-- td height="2%" align = "right"><span class="Filtro">De:</span></td>
            	<td height="2%" align="center"><INPUT hidden TYPE="text" NAME="date1" class = "datepicker" id="fecha_1" /><br /></td -->
            	<td height="2%" align="center"><INPUT hidden TYPE="hidden" NAME="date1" class = "datepicker" id="fecha_1" /><br /></td>
				</tr>
            <tr height="2%">
            	<!-- td height="2%" align = "right"><span class="Filtro">Hasta:</span></td>
 public static function looper($all, $which)
 {
     $overridden_icon = '<i class="fa fa-exchange"></i>';
     $controller_path = ci()->page->data('controller_path');
     $inp = $all[$which];
     if (count($inp) > 0) {
         echo '<table class="table table-condensed" style="margin:0">';
         foreach ($inp as $name => $value) {
             $show_as = 0;
             /* text area default */
             $overridden = '&nbsp;';
             $link = '&nbsp;';
             switch ($which) {
                 case 'db':
                     if ($all['db'][$name] != $all['env'][$name] && isset($all['env'][$name])) {
                         $overridden = $overridden_icon;
                     }
                     if ($all['db'][$name] != $all['file'][$name] && isset($all['db'][$name])) {
                         $overridden = $overridden_icon;
                     }
                     break;
                 case 'env':
                     if ($all['env'][$name] != $all['file'][$name] && isset($all['file'][$name])) {
                         $overridden = $overridden_icon;
                     }
                     break;
                 case 'file':
                     if ($all['file'][$name] != $all['env'][$name] && isset($all['env'][$name])) {
                         $overridden = $overridden_icon;
                     }
                     break;
             }
             $group = ci()->uri->segment(5);
             switch (gettype($value)) {
                 case 'string':
                 case 'integer':
                 case 'null':
                 case 'float':
                     break;
                 case 'boolean':
                     $show_as = 1;
                     /* true / false radio's */
                     break;
             }
             if (!ci()->o_setting_model->compound_key_exists($name, $group) && $which == 'merged') {
                 $hash = bin2hex($name . chr(0) . convert_to_string($value) . chr(0) . $group . chr(0) . $show_as);
                 $link = '<a class="js-add-link" href="' . $controller_path . '/add/' . $hash . '"><i class="fa fa-plus-square"></i></a>';
             }
             echo '<tr>';
             echo '<td width="47%">' . $name . '&nbsp;</td>';
             echo '<td style="width:47%;">' . theme::format_value($value) . '</td>';
             echo '<td style="width:3%; text-align:center">' . $link . '</td>';
             echo '<td style="width:3%; text-align:center">' . $overridden . '</td>';
             echo '</tr>';
         }
         echo '</table>';
     }
 }
Exemple #4
0
?>
				<div>
					<?php 
if (!empty($meta['showtimes'][0])) {
    $showtimes = $meta['showtimes'][0];
    $showtimes = htmlspecialchars_decode($showtimes);
    echo $showtimes;
}
?>
					<span class="movie_small_details">
					<?php 
if (!empty($meta['runtime_minutes'][0])) {
    echo '<strong>Runtime: </strong>' . $meta['runtime_minutes'][0] . ' min<br>';
}
if (count($meta['advisories']) > 0) {
    echo '<strong>Advisories: </strong>' . convert_to_string($meta['advisories'], ', ');
}
?>
					</span>
				</div>
					<?php 
if (!empty($meta['notes'][0])) {
    $notes = $meta['notes'][0];
    $notes = htmlspecialchars_decode($notes);
    echo '<div class="movie_notes">' . $notes . '</div>';
}
?>
			</div>
			<br>
			<?php 
if (!empty($meta['starring'][0])) {
 /**
  * @dataProvider stringTestData
  */
 public function testConvertToString($value, $expected)
 {
     $this->assertSame($expected, convert_to_string($value));
 }