rrodriguez 15 years ago
parent
commit
88b6776f69
3 changed files with 29 additions and 19 deletions
  1. 6 3
      main/exercice/exercice_submit.php
  2. 16 9
      main/work/work.lib.php
  3. 7 7
      main/work/work.php

+ 6 - 3
main/exercice/exercice_submit.php

@@ -196,7 +196,8 @@ $total_minutes = $exercise_row["expired_time"];
 $total_seconds = $total_minutes*60;
 $current_timestamp = time();
 
-if ($exercise_row['expired_time'] != 0) {
+//Disable for learning path
+if ($exercise_row['expired_time'] != 0 && $origin != 'learnpath') {
     if (!isset($_SESSION['expired_time'])) {
         //In case that the current session php is broken
         //Timer - Get expired_time for a student
@@ -265,7 +266,9 @@ if ($exercise_row['expired_time'] != 0) {
  * The time control feature is enable here - this feature is enable for a jquery plugin called epiclock
  * for more details of how it works see this link : http://eric.garside.name/docs.html?p=epiclock
  */
-if ($exercise_row['expired_time'] != 0) { //Sends the exercice form when the expired time is finished 
+
+//Disable for learning path
+if ($exercise_row['expired_time'] != 0 && $origin != 'learnpath') { //Sends the exercice form when the expired time is finished 
     $htmlHeadXtra[] = "<script type=\"text/javascript\">
     $(document).ready(function(){    
        $('#text-content').epiclock({
@@ -1026,7 +1029,7 @@ if (api_is_course_admin() && $origin != 'learnpath') {
     echo '</div>';
 }
 //Timer control
-if ($exercise_row['expired_time'] != 0) { 
+if ($exercise_row['expired_time'] != 0 && $origin != 'learnpath') { 
   echo '<div align="left" id="wrapper-clock"><div id="square" class="rounded"><div id="text-content" align="center" class="count_down"></div></div></div>';
 }
 $exerciseTitle = api_parse_tex($exerciseTitle);

+ 16 - 9
main/work/work.lib.php

@@ -27,8 +27,8 @@ function display_action_links($cur_dir_path, $always_show_tool_options, $always_
 	$origin = isset($_GET['origin'])?Security::remove_XSS($_GET['origin']):'';
 	$curdirpath = isset($_GET['curdirpath'])?Security::remove_XSS($_GET['curdirpath']):empty($curdirpath);
 	
-
-	$origin = api_get_tools_lists($origin);
+	///why is that here?
+	//$origin = api_get_tools_lists($origin);
 	echo '<div class="actions">';
 	
 	if (strlen($cur_dir_path) > 0 && $cur_dir_path != '/') {
@@ -1495,28 +1495,35 @@ function get_list_users_without_publication($task_id) {
 /**
 * Display list of users who have not given the task
 *
-* @param int
+* @param int task id
 * @return array
 * @author cvargas carlos.vargas@beeznest.com cfasanando, christian.fasanado@beeznest.com
+* @author Julio Montoya <gugli100@gmail.com> Fixes
 */
 function display_list_users_without_publication($task_id) {
 	global $origin;
 	$table_header[] = array(get_lang('FirstName'),true);
-	$table_header[] = array(get_lang('LastName'),false);
-	$table_header[] = array(get_lang('Email'),false);
+	$table_header[] = array(get_lang('LastName'),true);
+	$table_header[] = array(get_lang('Email'),true);
 	// table_data
 	$table_data = get_list_users_without_publication($task_id);
 	
 	$sorting_options=array();
 	$sorting_options['column']=1;
 	$paging_options=array();
-	if (isset($_GET['curdirpath'])) {
-		$my_params = array ('curdirpath' => Security::remove_XSS($_GET['curdirpath']));
+	$my_params = array();
+	
+	if (isset($_GET['curdirpath'])) {		
+		$my_params['curdirpath'] = Security::remove_XSS($_GET['curdirpath']);		
 	}
 	if (isset($_GET['edit_dir'])) {
-		$my_params = array ('edit_dir' => Security::remove_XSS($_GET['edit_dir']));
+		$my_params['edit_dir'] = Security::remove_XSS($_GET['edit_dir']);
 	}
-	$my_params['origin'] = $origin;
+	if (isset($_GET['list'])) {
+		$my_params['list'] = Security::remove_XSS($_GET['list']);
+	}
+	$my_params['origin'] = $origin;	
+	
 	//$column_show
 	$column_show[]=1;
 	$column_show[]=1;

+ 7 - 7
main/work/work.php

@@ -1451,9 +1451,9 @@ function draw_date_picker($prefix,$default='') {
 
 		$new_folder_text .= '<div class="row">
 								<div class="label">
-								<a href="javascript: void(0);" onclick="javascript: return plus();"><span id="plus">'.Display::return_icon('div_show.gif',get_lang('AdvancedParameters'),array('style'=>'vertical-align:center')).' '.get_lang('AdvancedParameters').'</span></a><br />
+								
 								</div>
-								<div class="formw">
+								<div class="formw"><a href="javascript: void(0);" onclick="javascript: return plus();"><span id="plus">'.Display::return_icon('div_show.gif',get_lang('AdvancedParameters'),array('style'=>'vertical-align:center')).' '.get_lang('AdvancedParameters').'</span></a><br />
 									'.$addtext.'
 								</div>
 							</div>';
@@ -1541,14 +1541,14 @@ if (!$display_upload_form && !$display_tool_options) {
 		}
 	}
 	
+	if(!empty($publication['description'])){
+			echo '<div class="actions">';
+			echo '<br /><b>'.get_lang('Description').':</b>&nbsp;&nbsp;'.$publication['description'].'<br /><br />';
+			echo '</div>';
+	}
 	if ($display_list_users_without_publication) {
 		display_list_users_without_publication($publication['id']);
 	} else {	
-		if(!empty($publication['description'])){
-				echo '<div class="actions">';
-				echo '<br /><b>'.get_lang('Description').':</b>&nbsp;&nbsp;'.$publication['description'].'<br /><br />';
-				echo '</div>';
-		}
 		display_student_publications_list($base_work_dir . '/' . $my_cur_dir_path, 'work/' . $my_cur_dir_path, $currentCourseRepositoryWeb, $link_target_parameter, $dateFormatLong, $origin,$add_query);
 	}
 }