diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php index 1134af505f..05253b2f91 100644 --- a/main/exercice/exercise.class.php +++ b/main/exercice/exercise.class.php @@ -25,7 +25,7 @@ * Exercise class: This class allows to instantiate an object of type Exercise * @package dokeos.exercise * @author Olivier Brouckaert -* @version $Id: exercise.class.php 20795 2009-05-18 18:05:02Z iflorespaz $ +* @version $Id: exercise.class.php 20975 2009-05-25 18:09:56Z cvargas1 $ */ @@ -1035,9 +1035,9 @@ class Exercise if(($this -> start_time!='0000-00-00 00:00:00')||($this -> end_time!='0000-00-00 00:00:00')) $defaults['enabletimelimit'] = 1; - + $defaults['start_time'] = ($this->start_time!='0000-00-00 00:00:00')? $this -> start_time : date('Y-m-d 12:00:00'); - $defaults['end_time'] = ($this->end_time!='0000-00-00 00:00:00')?$this -> end_time : date('Y-m-d 12:00:00'); + $defaults['end_time'] = ($this->end_time!='0000-00-00 00:00:00')?$this -> end_time : date('Y-m-d 12:00:00',time()+84600); } else { $defaults['exerciseType'] = 2; @@ -1048,7 +1048,7 @@ class Exercise $defaults['results_disabled'] = 0; $defaults['start_time'] = date('Y-m-d 12:00:00'); - $defaults['end_time'] = date('Y-m-d 12:00:00'); + $defaults['end_time'] = date('Y-m-d 12:00:00',time()+84600); } } else { $defaults['exerciseTitle'] = $this -> selectTitle(); diff --git a/main/work/work.lib.php b/main/work/work.lib.php index a28825c0ea..96a7cea689 100644 --- a/main/work/work.lib.php +++ b/main/work/work.lib.php @@ -1,4 +1,4 @@ -, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Roan Embrechts, code refactoring and virtual course support * @author Frederic Vauthier, directories management -* @version $Id: work.lib.php 20716 2009-05-16 07:28:22Z ivantcholakov $ +* @version $Id: work.lib.php 20975 2009-05-25 18:09:56Z cvargas1 $ */ /** * Displays action links (for admins, authorized groups members and authorized students) @@ -608,13 +608,15 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou } else { $add_to_name = ''; } - $show_as_icon = get_work_id($mydir); //true or false - if ($show_as_icon) { - $row[] = ''.get_lang('Save').''.$dir.''.$add_to_name.'
'.$cant_files.' '.$text_file.$dirtext; - } else { - $row[] = ''.$dir.''.$add_to_name.'
'.$cant_files.' '.$text_file.$dirtext; - } + if ($cant_files>0) { + $zip=''.get_lang('Save').''; + } + if ($show_as_icon) { + $row[] = $zip.''.$dir.''.$add_to_name.'
'.$cant_files.' '.$text_file.$dirtext; + } else { + $row[] = ''.$dir.''.$add_to_name.'
'.$cant_files.' '.$text_file.$dirtext; + } } if ($count_files!=0) { diff --git a/main/work/work.php b/main/work/work.php index 1f0b64b912..05665c270b 100644 --- a/main/work/work.php +++ b/main/work/work.php @@ -1,4 +1,4 @@ -, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Roan Embrechts, code refactoring and virtual course support * @author Frederic Vauthier, directories management -* @version $Id: work.php 20798 2009-05-18 18:13:25Z cvargas1 $ +* @version $Id: work.php 20975 2009-05-25 18:09:56Z cvargas1 $ * * @todo refactor more code into functions, use quickforms, coding standards, ... */ @@ -1185,14 +1185,22 @@ if ($is_course_member) { $form->addElement('hidden', 'accepted', 1); $form->addElement('hidden', 'sec_token', $stok); + if (isset($_GET['edit'])) { + $text=get_lang('UpdateWork'); + $class='save'; + } else { + $text=get_lang('SendWork'); + $class='upload'; + } + // fix the Ok button when we see the tool in the learn path if ($origin== 'learnpath') { $form->addElement('html', '
'); - $form->addElement('style_submit_button','submitWork', get_lang('SendFile'),array('class="upload"','value="submitWork"')); + $form->addElement('style_submit_button','submitWork', $text, array('class="'.$class.'"','value="submitWork"')); $form->addElement('html', '
'); } else { //$form->addElement('submit','submitWork', get_lang('SendFile')); - $form->addElement('style_submit_button', 'submitWork', get_lang('SendFile'),array('class="upload"','value="submitWork"')); + $form->addElement('style_submit_button', 'submitWork', $text, array('class="'.$class.'"','value="submitWork"')); } if (!empty($_POST['submitWork']) || $edit) {