Browse Source

Added "Start of period" into export tab

MOODLE_23_STABLE
Luis Ramon Lopez 14 years ago
parent
commit
faacb6c7fb
  1. 7
      CHANGES
  2. 10
      export.php
  3. 7
      export_form.php
  4. 2
      lang/en_utf8/attforblock.php
  5. 4
      lang/es_utf8/attforblock.php

7
CHANGES

@ -1,3 +1,10 @@
2011-01-16 lrlopez
* export.php: export_form.php:
* lang/: en_utf8/attforblock.php: es_utf8/attforblock.php:
Added "Start of period" into export tab and two new strings for
the new fields on the form.
2011-01-15 lrlopez 2011-01-15 lrlopez
* db/install.xml: * db/install.xml:

10
export.php

@ -56,10 +56,12 @@
$data->tabhead[] = get_string('lastname'); $data->tabhead[] = get_string('lastname');
$data->tabhead[] = get_string('firstname'); $data->tabhead[] = get_string('firstname');
$select = "courseid = {$course->id} AND attendanceid = {$attforblock->id} AND sessdate >= {$course->startdate}"; $select = "courseid = {$course->id} AND attendanceid = {$attforblock->id} ";
if (isset($fromform->includenottaken)) { if (!isset($fromform->includeallsessions)) {
$select .= " AND sessdate <= {$fromform->sessionenddate}"; $finalenddate = $fromform->sessionenddate + 86400; // take into account the whole day
} else { $select .= "AND sessdate >= {$fromform->sessionstartdate} AND sessdate < {$finalenddate} ";
}
if (!isset($fromform->includenottaken)) {
$select .= " AND lasttaken != 0"; $select .= " AND lasttaken != 0";
} }

7
export_form.php

@ -59,9 +59,14 @@ class mod_attforblock_export_form extends moodleform {
// $durtime[] =& MoodleQuickForm::createElement('select', 'minutes', get_string('minute', 'form'), $minutes, false, true); // $durtime[] =& MoodleQuickForm::createElement('select', 'minutes', get_string('minute', 'form'), $minutes, false, true);
// $mform->addGroup($durtime, 'durtime', get_string('duration','attforblock'), array(' '), true); // $mform->addGroup($durtime, 'durtime', get_string('duration','attforblock'), array(' '), true);
$mform->addElement('checkbox', 'includeallsessions', get_string('includeall','attforblock'), get_string('yes'));
$mform->setDefault('includeallsessions', true);
$mform->addElement('checkbox', 'includenottaken', get_string('includenottaken','attforblock'), get_string('yes')); $mform->addElement('checkbox', 'includenottaken', get_string('includenottaken','attforblock'), get_string('yes'));
$mform->addElement('date_selector', 'sessionstartdate', get_string('startofperiod','attforblock'));
$mform->setDefault('sessionstartdate', $course->startdate);
$mform->disabledIf('sessionstartdate', 'includeallsessions', 'checked');
$mform->addElement('date_selector', 'sessionenddate', get_string('endofperiod','attforblock')); $mform->addElement('date_selector', 'sessionenddate', get_string('endofperiod','attforblock'));
$mform->disabledIf('sessionenddate', 'includenottaken', 'notchecked'); $mform->disabledIf('sessionenddate', 'includeallsessions', 'checked');
$mform->addElement('select', 'format', get_string('format'), $mform->addElement('select', 'format', get_string('format'),
array('excel' => get_string('downloadexcel','attforblock'), array('excel' => get_string('downloadexcel','attforblock'),

2
lang/en_utf8/attforblock.php

@ -73,6 +73,7 @@ $string['gridcolumns'] = 'Grid columns';
$string['groupsession'] = 'Group'; $string['groupsession'] = 'Group';
$string['hiddensessions'] = 'Hidden sessions'; $string['hiddensessions'] = 'Hidden sessions';
$string['identifyby'] = 'Identify student by'; $string['identifyby'] = 'Identify student by';
$string['includeall'] = 'Select all sessions';
$string['includenottaken'] = 'Include not taken sessions'; $string['includenottaken'] = 'Include not taken sessions';
$string['indetail'] = 'In detail...'; $string['indetail'] = 'In detail...';
$string['moduledescription'] = 'You can add only one module Attendance per course.<br />Removal of this module will not entail removal of the data!'; $string['moduledescription'] = 'You can add only one module Attendance per course.<br />Removal of this module will not entail removal of the data!';
@ -121,6 +122,7 @@ $string['showdefaults'] = 'Show defaults';
$string['showduration'] = 'Show duration'; $string['showduration'] = 'Show duration';
$string['sortedgrid'] = 'Sorted grid'; $string['sortedgrid'] = 'Sorted grid';
$string['sortedlist'] = 'Sorted list'; $string['sortedlist'] = 'Sorted list';
$string['startofperiod'] = 'Start of period';
$string['status'] = 'Status'; $string['status'] = 'Status';
$string['statusdeleted'] = 'Status deleted'; $string['statusdeleted'] = 'Status deleted';
$string['strftimedm'] = '%%d.%%m'; $string['strftimedm'] = '%%d.%%m';

4
lang/es_utf8/attforblock.php

@ -64,7 +64,7 @@ $string['downloadooo'] = 'Descargar en Formato OpenOffice';
$string['downloadtext'] = 'Descargar en Formato de Texto'; $string['downloadtext'] = 'Descargar en Formato de Texto';
$string['duration'] = 'Duración'; $string['duration'] = 'Duración';
$string['editsession'] = 'Editar Sesión'; $string['editsession'] = 'Editar Sesión';
$string['endofperiod'] = 'Fin del periodo'; $string['endofperiod'] = 'Fecha final';
$string['endtime'] = 'Hora de finalización'; $string['endtime'] = 'Hora de finalización';
$string['errorgroupsnotselected'] = 'Elija uno o más grupos'; $string['errorgroupsnotselected'] = 'Elija uno o más grupos';
$string['errorinaddingsession'] = 'Error añadiendo Sesión'; $string['errorinaddingsession'] = 'Error añadiendo Sesión';
@ -73,6 +73,7 @@ $string['gridcolumns'] = 'Columnas de la rejilla';
$string['groupsession'] = 'Grupal'; $string['groupsession'] = 'Grupal';
$string['hiddensessions'] = 'Sesiones ocultas'; $string['hiddensessions'] = 'Sesiones ocultas';
$string['identifyby'] = 'Identificar estudiantes por'; $string['identifyby'] = 'Identificar estudiantes por';
$string['includeall'] = 'Seleccionar todas las sesiones';
$string['includenottaken'] = 'Incluir sesiones no registradas'; $string['includenottaken'] = 'Incluir sesiones no registradas';
$string['indetail'] = 'En detalle...'; $string['indetail'] = 'En detalle...';
$string['moduledescription'] = 'Sólo se puede agregar una actividad \"Asistencia\" por curso.<br>Si se elimina esta actividad, los datos de la base de datos no se verán afectados, así que reaparecerán en caso de volver a agregar nuevamente la actividad.'; $string['moduledescription'] = 'Sólo se puede agregar una actividad \"Asistencia\" por curso.<br>Si se elimina esta actividad, los datos de la base de datos no se verán afectados, así que reaparecerán en caso de volver a agregar nuevamente la actividad.';
@ -121,6 +122,7 @@ $string['showduration'] = 'Mostrar duración';
$string['showdefaults'] = 'Mostrar opciones por defecto'; $string['showdefaults'] = 'Mostrar opciones por defecto';
$string['sortedgrid'] = 'Rejilla alfabética'; $string['sortedgrid'] = 'Rejilla alfabética';
$string['sortedlist'] = 'Lista alfabética'; $string['sortedlist'] = 'Lista alfabética';
$string['startofperiod'] = 'Fecha de comienzo';
$string['status'] = 'Estado'; $string['status'] = 'Estado';
$string['statusdeleted'] = 'Estado eliminado'; $string['statusdeleted'] = 'Estado eliminado';
$string['strftimedm'] = '%%d.%%m'; $string['strftimedm'] = '%%d.%%m';

Loading…
Cancel
Save