mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-11672, hide hidden assignment descriptions from calendar
This commit is contained in:
parent
5779b901e8
commit
dc6cb74efd
3 changed files with 52 additions and 1 deletions
|
@ -245,7 +245,7 @@ class assignment_base {
|
|||
}
|
||||
|
||||
$graded_date = $grade->dategraded;
|
||||
$graded_by = $grade->usermodified;
|
||||
$graded_by = $grade->usermodified;
|
||||
|
||||
/// We need the teacher info
|
||||
$teacher = get_record('user', 'id', $graded_by);
|
||||
|
@ -1729,6 +1729,22 @@ class assignment_base {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return true if is set description is hidden till available date
|
||||
*
|
||||
* This is needed by calendar so that hidden descriptions do not
|
||||
* come up in upcoming events.
|
||||
*
|
||||
* Check that description is hidden till available date
|
||||
* By default return false
|
||||
* Assignments types should implement this method if needed
|
||||
* @return boolen
|
||||
*/
|
||||
function description_is_hidden() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an outline of the user's interaction with the assignment
|
||||
*
|
||||
|
|
|
@ -204,6 +204,16 @@ class assignment_upload extends assignment_base {
|
|||
//no submission yet
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return true if var3 == hide description till available day
|
||||
*
|
||||
*@return boolean
|
||||
*/
|
||||
function description_is_hidden() {
|
||||
return ($this->assignment->var3 && (time() <= $this->assignment->timeavailable));
|
||||
}
|
||||
|
||||
function custom_feedbackform($submission, $return=false) {
|
||||
global $CFG;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue