-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1604 from sistemasases/fix_2019_reports
Moved function fix from grade_categories to general use, applied fix …
- Loading branch information
Showing
5 changed files
with
63 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,6 +91,35 @@ function get_current_semester(){ | |
return $current_semester; | ||
} | ||
|
||
/** | ||
* Función que retorna la fecha de inicio del semestre actual | ||
* @see get_current_semester() | ||
* @return cadena de texto que representa la fecha de inicio del semestre actual | ||
*/ | ||
function get_current_semester_start(){ | ||
global $DB; | ||
$sql_query = "SELECT fecha_inicio AS fecha FROM {talentospilos_semestre} WHERE id = (SELECT MAX(id) FROM {talentospilos_semestre})"; | ||
$current_semester = $DB->get_record_sql($sql_query); | ||
return $current_semester; | ||
} | ||
|
||
/** | ||
* Función que retorna la fecha de inicio del semestre actual en el formato #AÑO#MES | ||
* @see get_current_semester_start() | ||
* @return cadena de texto que representa la fecha de inicio del semestre actual con formato procesado | ||
*/ | ||
function get_current_semester_processed(){ | ||
$sem = get_current_semester_start(); | ||
$semestre = $sem->fecha; | ||
|
||
$año = substr($semestre,0,4); | ||
$mes = substr($semestre,5,2); | ||
|
||
$semestre = $año.$mes; | ||
|
||
return $semestre; | ||
} | ||
|
||
/** | ||
* Function that returns the current semester. | ||
* @author Jeison Cardona Gómez <[email protected]>. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters