+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
* db/install.xml:
$data->tabhead[] = get_string('lastname');
$data->tabhead[] = get_string('firstname');
- $select = "courseid = {$course->id} AND attendanceid = {$attforblock->id} AND sessdate >= {$course->startdate}";
- if (isset($fromform->includenottaken)) {
- $select .= " AND sessdate <= {$fromform->sessionenddate}";
- } else {
- $select .= " AND lasttaken != 0";
+ $select = "courseid = {$course->id} AND attendanceid = {$attforblock->id} ";
+ if (!isset($fromform->includeallsessions)) {
+ $finalenddate = $fromform->sessionenddate + 86400; // take into account the whole day
+ $select .= "AND sessdate >= {$fromform->sessionstartdate} AND sessdate < {$finalenddate} ";
+ }
+ if (!isset($fromform->includenottaken)) {
+ $select .= " AND lasttaken != 0";
}
if ($sessions = get_records_select('attendance_sessions', $select, 'sessdate ASC')) {
// $durtime[] =& MoodleQuickForm::createElement('select', 'minutes', get_string('minute', 'form'), $minutes, false, 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('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->disabledIf('sessionenddate', 'includenottaken', 'notchecked');
+ $mform->disabledIf('sessionenddate', 'includeallsessions', 'checked');
$mform->addElement('select', 'format', get_string('format'),
array('excel' => get_string('downloadexcel','attforblock'),
$string['groupsession'] = 'Group';
$string['hiddensessions'] = 'Hidden sessions';
$string['identifyby'] = 'Identify student by';
+$string['includeall'] = 'Select all sessions';
$string['includenottaken'] = 'Include not taken sessions';
$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['showduration'] = 'Show duration';
$string['sortedgrid'] = 'Sorted grid';
$string['sortedlist'] = 'Sorted list';
+$string['startofperiod'] = 'Start of period';
$string['status'] = 'Status';
$string['statusdeleted'] = 'Status deleted';
$string['strftimedm'] = '%%d.%%m';
$string['downloadtext'] = 'Descargar en Formato de Texto';
$string['duration'] = 'Duración';
$string['editsession'] = 'Editar Sesión';
-$string['endofperiod'] = 'Fin del periodo';
+$string['endofperiod'] = 'Fecha final';
$string['endtime'] = 'Hora de finalización';
$string['errorgroupsnotselected'] = 'Elija uno o más grupos';
$string['errorinaddingsession'] = 'Error añadiendo Sesión';
$string['groupsession'] = 'Grupal';
$string['hiddensessions'] = 'Sesiones ocultas';
$string['identifyby'] = 'Identificar estudiantes por';
+$string['includeall'] = 'Seleccionar todas las sesiones';
$string['includenottaken'] = 'Incluir sesiones no registradas';
$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['showdefaults'] = 'Mostrar opciones por defecto';
$string['sortedgrid'] = 'Rejilla alfabética';
$string['sortedlist'] = 'Lista alfabética';
+$string['startofperiod'] = 'Fecha de comienzo';
$string['status'] = 'Estado';
$string['statusdeleted'] = 'Estado eliminado';
$string['strftimedm'] = '%%d.%%m';