diff --git a/main/forum/reply.php b/main/forum/reply.php index 40c0341ab5..473cfde914 100755 --- a/main/forum/reply.php +++ b/main/forum/reply.php @@ -67,7 +67,11 @@ if (!$_user['user_id'] AND $current_forum['allow_anonymous'] == 0) { } if ($current_forum['forum_of_group'] != 0) { - $show_forum = GroupManager::user_has_access(api_get_user_id(), $current_forum['forum_of_group'], GroupManager::GROUP_TOOL_FORUM); + $show_forum = GroupManager::user_has_access( + api_get_user_id(), + $current_forum['forum_of_group'], + GroupManager::GROUP_TOOL_FORUM + ); if (!$show_forum) { api_not_allowed(); } @@ -90,25 +94,52 @@ if (!empty($gradebook) && $gradebook == 'view') { if ($origin == 'group') { $_clean['toolgroup'] = (int)$_SESSION['toolgroup']; $group_properties = GroupManager :: get_group_properties($_clean['toolgroup']); - $interbreadcrumb[] = array('url' => '../group/group.php', 'name' => get_lang('Groups')); - $interbreadcrumb[] = array('url' => '../group/group_space.php?gidReq='.$_SESSION['toolgroup'], 'name' => get_lang('GroupSpace').' '.$group_properties['name']); - $interbreadcrumb[] = array('url' => 'viewforum.php?origin='.$origin.'&forum='.Security::remove_XSS($_GET['forum']), 'name' => $current_forum['forum_title']); - $interbreadcrumb[] = array('url' => 'viewthread.php?origin='.$origin.'&gradebook='.$gradebook.'&forum='.Security::remove_XSS($_GET['forum']).'&thread='.Security::remove_XSS($_GET['thread']), 'name' => $current_thread['thread_title']); - $interbreadcrumb[] = array('url' => 'javascript: void(0);', 'name' => get_lang('Reply')); + $interbreadcrumb[] = array( + 'url' => '../group/group.php?'.api_get_cidreq(), + 'name' => get_lang('Groups'), + ); + $interbreadcrumb[] = array( + 'url' => '../group/group_space.php?'.api_get_cidreq(), + 'name' => get_lang('GroupSpace').' '.$group_properties['name'], + ); + $interbreadcrumb[] = array( + 'url' => 'viewforum.php?origin='.$origin.'&forum='.intval($_GET['forum']).'&'.api_get_cidreq(), + 'name' => $current_forum['forum_title'], + ); + $interbreadcrumb[] = array( + 'url' => 'viewthread.php?origin='.$origin.'&gradebook='.$gradebook.'&forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread']).'&'.api_get_cidreq(), + 'name' => $current_thread['thread_title'], + ); + $interbreadcrumb[] = array( + 'url' => 'javascript: void(0);', + 'name' => get_lang('Reply'), + ); } else { - $interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook, 'name' => $nameTools); - $interbreadcrumb[] = array('url' => 'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'], 'name' => $current_forum_category['cat_title']); - $interbreadcrumb[] = array('url' => 'viewforum.php?origin='.$origin.'&forum='.Security::remove_XSS($_GET['forum']), 'name' => $current_forum['forum_title']); - $interbreadcrumb[] = array('url' => 'viewthread.php?origin='.$origin.'&gradebook='.$gradebook.'&forum='.Security::remove_XSS($_GET['forum']).'&thread='.Security::remove_XSS($_GET['thread']), 'name' => $current_thread['thread_title']); + $interbreadcrumb[] = array( + 'url' => 'index.php?gradebook='.$gradebook, + 'name' => $nameTools, + ); + $interbreadcrumb[] = array( + 'url' => 'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'].'&'.api_get_cidreq(), + 'name' => $current_forum_category['cat_title'], + ); + $interbreadcrumb[] = array( + 'url' => 'viewforum.php?origin='.$origin.'&forum='.intval($_GET['forum']).'&'.api_get_cidreq(), + 'name' => $current_forum['forum_title'], + ); + $interbreadcrumb[] = array( + 'url' => 'viewthread.php?origin='.$origin.'&gradebook='.$gradebook.'&forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread']).'&'.api_get_cidreq(), + 'name' => $current_thread['thread_title'], + ); $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Reply')); } /* Resource Linker */ -if (isset($_POST['add_resources']) AND $_POST['add_resources'] == get_lang('Resources')) { - $_SESSION['formelements'] = $_POST; - $_SESSION['origin'] = $_SERVER['REQUEST_URI']; - $_SESSION['breadcrumbs'] = $interbreadcrumb; +if (isset($_POST['add_resources']) && $_POST['add_resources'] == get_lang('Resources')) { + $_SESSION['formelements'] = $_POST; + $_SESSION['origin'] = $_SERVER['REQUEST_URI']; + $_SESSION['breadcrumbs'] = $interbreadcrumb; header('Location: ../resourcelinker/resourcelinker.php'); exit; } @@ -151,7 +182,9 @@ if ($origin != 'learnpath') { } /*New display forum div*/ echo '
'; -echo '

'.prepare4display($current_forum['forum_title']).'

'; +echo '

'. + prepare4display($current_forum['forum_title']).'

'; echo '

'.prepare4display($current_forum['forum_comment']).'

'; echo '
'; /* End new display forum */ @@ -159,7 +192,13 @@ echo ''; $my_action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : ''; $my_post = isset($_GET['post']) ? Security::remove_XSS($_GET['post']) : ''; $my_elements = isset($_SESSION['formelements']) ? $_SESSION['formelements'] : ''; -$values = show_add_post_form($current_forum, $forum_setting, $my_action, $my_post, $my_elements); +$values = show_add_post_form( + $current_forum, + $forum_setting, + $my_action, + $my_post, + $my_elements +); if (!empty($values) AND isset($_POST['SubmitPost'])) { $result = store_reply($current_forum, $values); //@todo split the show_add_post_form function diff --git a/main/img/icons/32/group_na.png b/main/img/icons/32/group_na.png new file mode 100644 index 0000000000..2ec1acdfb5 Binary files /dev/null and b/main/img/icons/32/group_na.png differ diff --git a/main/inc/ajax/model.ajax.php b/main/inc/ajax/model.ajax.php index bd9382033f..18df3893d5 100755 --- a/main/inc/ajax/model.ajax.php +++ b/main/inc/ajax/model.ajax.php @@ -186,6 +186,11 @@ if (!$sidx) { //@todo rework this switch ($action) { + case 'get_group_reporting': + $course_id = isset($_REQUEST['course_id']) ? $_REQUEST['course_id'] : null; + $group_id = isset($_REQUEST['gidReq']) ? $_REQUEST['gidReq'] : null; + $count = Tracking::get_group_reporting($course_id, $group_id, 'count'); + break; case 'get_user_course_report': case 'get_user_course_report_resumed': $userId = api_get_user_id(); @@ -563,6 +568,20 @@ $is_allowedToEdit = api_is_allowed_to_edit(null, true) || api_is_allowed_to_edit $columns = array(); switch ($action) { + case 'get_group_reporting': + $columns = array('name', 'time', 'progress', 'score', 'works', 'messages', 'actions'); + + $result = Tracking::get_group_reporting( + $course_id, + $group_id, + 'all', + $start, + $limit, + $sidx, + $sord, + $whereCondition + ); + break; case 'get_course_exercise_medias': $columns = array('question'); $result = Question::get_course_medias( @@ -1555,7 +1574,8 @@ $allowed_actions = array( //'get_course_exercise_medias', 'get_user_course_report', 'get_user_course_report_resumed', - 'get_exercise_grade' + 'get_exercise_grade', + 'get_group_reporting' ); //5. Creating an obj to return a json diff --git a/main/inc/lib/agenda.lib.php b/main/inc/lib/agenda.lib.php index 8c6cb58bdf..842e5d218c 100644 --- a/main/inc/lib/agenda.lib.php +++ b/main/inc/lib/agenda.lib.php @@ -2997,7 +2997,7 @@ class Agenda // if the student has specified a course we a add a link to that course if ($item['course'] <> "") { - $url = api_get_path(WEB_CODE_PATH)."calendar/agenda.php?cidReq=".urlencode($item['course'])."&day=$day&month=$month&year=$year#$day"; // RH //Patrick Cool: to highlight the relevant agenda item + $url = api_get_path(WEB_CODE_PATH)."calendar/agenda.php?cidReq=".urlencode($item['course'])."&day=$day&month=$month&year=$year#$day"; // RH //Patrick Cool: to highlight the relevant agenda item $course_link = "".$item['course'].""; } else { $course_link = ""; @@ -3008,7 +3008,7 @@ class Agenda // This is the array construction for the WEEK or MONTH view //Display events in agenda - $agendaitems[$day] .= "
$time_minute $course_link ".$item['title']."

"; + $agendaitems[$day] .= "
$time_minute $course_link ".$item['title']."

"; } else { // this is the array construction for the DAY view @@ -3018,7 +3018,7 @@ class Agenda } //Display events by list - $agendaitems[$halfhour] .= "
$time_minute $course_link ".$item['title']."
"; + $agendaitems[$halfhour] .= "
$time_minute $course_link ".$item['title']."
"; } } return $agendaitems; @@ -3057,8 +3057,8 @@ class Agenda $prev_year = ($month == 12 ? $year +1 : $year); if ($show_content) { - $back_url = Display::url($prev_icon, api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=".$next_month."&year=".$next_year); - $next_url = Display::url($next_icon, api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=".$prev_month."&year=".$prev_year); + $back_url = Display::url($prev_icon, api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=".$next_month."&year=".$next_year); + $next_url = Display::url($next_icon, api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=".$prev_month."&year=".$prev_year); } else { $back_url = Display::url($prev_icon, '', array('onclick'=>"load_calendar('".$user_id."','".$next_month."', '".$next_year."'); ")); $next_url = Display::url($next_icon, '', array('onclick'=>"load_calendar('".$user_id."','".$prev_month."', '".$prev_year."'); ")); @@ -3249,7 +3249,7 @@ class Agenda $agendaday = date("j",strtotime($item['start_date'])); $month = date("n",strtotime($item['start_date'])); $year = date("Y",strtotime($item['start_date'])); - $URL = api_get_path(WEB_PATH)."main/calendar/agenda.php?cidReq=".urlencode($course["code"])."&day=$agendaday&month=$month&year=$year#$agendaday"; + $URL = api_get_path(WEB_PATH)."main/calendar/agenda.php?cidReq=".urlencode($course["code"])."&day=$agendaday&month=$month&year=$year#$agendaday"; list($year,$month,$day,$hour,$min,$sec) = split('[-: ]',$item['start_date']); $start_date = $year.$month.$day.$hour.$min; list($year,$month,$day,$hour,$min,$sec) = split('[-: ]',$item['end_date']); diff --git a/main/inc/lib/blog.lib.php b/main/inc/lib/blog.lib.php index 2e79f39e9e..46bca8ad2a 100755 --- a/main/inc/lib/blog.lib.php +++ b/main/inc/lib/blog.lib.php @@ -757,7 +757,7 @@ class Blog if (Database::num_rows($result) > 0) { echo '