From 77617d650522b812b9f80207f8cebf2a0ce14aee Mon Sep 17 00:00:00 2001 From: Ricardo Rodriguez Date: Tue, 20 Jul 2010 17:56:44 -0500 Subject: [PATCH 1/3] Added new variable in the field of star_time and end_time to define interval 5 minutes --- main/exercice/exercise.class.php | 4 ++-- main/inc/lib/formvalidator/Element/datepicker.php | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php index d0f59c7550..6a02ab53e0 100755 --- a/main/exercice/exercise.class.php +++ b/main/exercice/exercise.class.php @@ -1009,8 +1009,8 @@ class Exercise //$form -> addElement('date', 'start_time', get_lang('ExeStartTime'), array('language'=>'es','format' => 'dMYHi')); //$form -> addElement('date', 'end_time', get_lang('ExeEndTime'), array('language'=>'es','format' => 'dMYHi')); - $form->addElement('datepicker', 'start_time', get_lang('ExeStartTime'), array('form_name'=>'exercise_admin')); - $form->addElement('datepicker', 'end_time', get_lang('ExeEndTime'), array('form_name'=>'exercise_admin')); + $form->addElement('datepicker', 'start_time', get_lang('ExeStartTime'), array('form_name'=>'exercise_admin'), 5); + $form->addElement('datepicker', 'end_time', get_lang('ExeEndTime'), array('form_name'=>'exercise_admin'), 5); //$form -> addElement('select', 'enabletimercontroltotalminutes',get_lang('ExerciseTimerControlMinutes'),$time_minutes_option); $form -> addElement('html',''); diff --git a/main/inc/lib/formvalidator/Element/datepicker.php b/main/inc/lib/formvalidator/Element/datepicker.php index 81c3b3851a..7c9769e6b4 100755 --- a/main/inc/lib/formvalidator/Element/datepicker.php +++ b/main/inc/lib/formvalidator/Element/datepicker.php @@ -9,7 +9,7 @@ class HTML_QuickForm_datepicker extends HTML_QuickForm_date /** * Constructor */ - function HTML_QuickForm_datepicker($elementName = null, $elementLabel = null, $attributes = null) + function HTML_QuickForm_datepicker($elementName = null, $elementLabel = null, $attributes = null, $optionIncrement = null) { $js_form_name = $attributes['form_name']; unset($attributes['form_name']); @@ -38,6 +38,10 @@ class HTML_QuickForm_datepicker extends HTML_QuickForm_date //$this->_options['addEmptyOption'] = true; //$this->_options['emptyOptionValue'] = 0; //$this->_options['emptyOptionText'] = ' -- '; + if (isset($optionIncrement)) { + $this->_options['optionIncrement']['i'] = intval($optionIncrement); + } + } /** * HTML code to display this datepicker From bd5b7ba925ae2c05851fa3cd43ebcdcebc3dc05b Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Wed, 21 Jul 2010 02:43:59 +0300 Subject: [PATCH 2/3] Platform admin: Minor visual improvements for style_preview.php page. --- main/admin/style_preview.php | 70 ++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/main/admin/style_preview.php b/main/admin/style_preview.php index 1252966f68..f641a5848c 100755 --- a/main/admin/style_preview.php +++ b/main/admin/style_preview.php @@ -1,8 +1,11 @@ '') { +if (isset($_GET['style']) && $_GET['style'] != '') { $style=Security::remove_XSS($_GET['style']); $all_styles = api_get_themes(); if (in_array($style, $all_styles[0])) { @@ -13,43 +16,45 @@ if (isset($_GET['style']) AND $_GET['style']<>'') { echo ''; } +$_setting['student_view_enabled'] = 'false'; // Hiding the link "Teacher/Student view", it is not needed to be shown here. +$week_days_short = api_get_week_days_short(); +$months_long = api_get_months_long(); + //Display::display_header($tool_name); require_once api_get_path(INCLUDE_PATH).'banner.inc.php'; ?> - - -
-

Tool title

+
+

-

This is the introduction text. +

-
Normal Message
-
Confirmation Message
-
Warning Message
-
Error Message
+
Normal Message
+
Confirmation Message
+
Warning Message
+
Error Message
- +
- - - + + + - - - - - - - + + + + + + + @@ -119,8 +124,8 @@ require_once api_get_path(INCLUDE_PATH).'banner.inc.php';
<< 2006>> 2010
MonTueWedThuFriSatSun
 
- - + + @@ -141,18 +146,21 @@ require_once api_get_path(INCLUDE_PATH).'banner.inc.php';
Firstname ↓ Lastname ↓
Julio
-
- +
- +
 ↓
Julio