mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Merge branch 'MDL-33547' of git://github.com/netspotau/moodle-mod_assign
This commit is contained in:
commit
de6a0dfd3d
@ -39,12 +39,6 @@ define('ASSIGN_FILTER_SUBMITTED', 'submitted');
|
||||
define('ASSIGN_FILTER_SINGLE_USER', 'singleuser');
|
||||
define('ASSIGN_FILTER_REQUIRE_GRADING', 'require_grading');
|
||||
|
||||
/**
|
||||
* File areas for assignment portfolio if enabled
|
||||
*/
|
||||
define('ASSIGN_FILEAREA_PORTFOLIO_FILES', 'portfolio_files');
|
||||
|
||||
|
||||
/** Include accesslib.php */
|
||||
require_once($CFG->libdir.'/accesslib.php');
|
||||
/** Include formslib.php */
|
||||
@ -53,8 +47,6 @@ require_once($CFG->libdir.'/formslib.php');
|
||||
require_once($CFG->dirroot . '/repository/lib.php');
|
||||
/** Include local mod_form.php */
|
||||
require_once($CFG->dirroot.'/mod/assign/mod_form.php');
|
||||
/** Include portfoliolib.php */
|
||||
require_once($CFG->libdir . '/portfoliolib.php');
|
||||
/** gradelib.php */
|
||||
require_once($CFG->libdir.'/gradelib.php');
|
||||
/** grading lib.php */
|
||||
@ -2275,8 +2267,6 @@ class assign {
|
||||
$submissionid = $submission->id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$fs = get_file_storage();
|
||||
$browser = get_file_browser();
|
||||
$files = $fs->get_area_files($this->get_context()->id, $component, $area , $submissionid , "timemodified", false);
|
||||
|
@ -69,6 +69,7 @@ class assign_portfolio_caller extends portfolio_module_caller_base {
|
||||
'cmid' => true,
|
||||
'sid' => false,
|
||||
'area' => false,
|
||||
'component' => false,
|
||||
'fileid' => false,
|
||||
'plugin' => false,
|
||||
'editor' => false,
|
||||
@ -105,11 +106,10 @@ class assign_portfolio_caller extends portfolio_module_caller_base {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// export either an area of files or a single file (see function for more detail)
|
||||
// the first arg is an id or null. If it is an id, the rest of the args are ignored
|
||||
// if it is null, the rest of the args are used to load a list of files from get_areafiles
|
||||
$this->set_file_and_format_data($this->fileid, $context->id, 'mod_assign', $this->area, $this->sid, 'timemodified', false);
|
||||
$this->set_file_and_format_data($this->fileid, $context->id, $this->component, $this->area, $this->sid, 'timemodified', false);
|
||||
|
||||
}
|
||||
|
||||
|
@ -473,7 +473,7 @@ class assign_files implements renderable {
|
||||
require_once($CFG->libdir . '/portfoliolib.php');
|
||||
if (count($files) >= 1 && has_capability('mod/assign:exportownsubmission', $this->context)) {
|
||||
$button = new portfolio_add_button();
|
||||
$button->set_callback_options('assign_portfolio_caller', array('cmid' => $this->cm->id, 'sid'=>$sid, 'area'=>$filearea), '/mod/assign/portfolio_callback.php');
|
||||
$button->set_callback_options('assign_portfolio_caller', array('cmid' => $this->cm->id, 'sid'=>$sid, 'area'=>$filearea, 'component'=>$component), '/mod/assign/portfolio_callback.php');
|
||||
$button->reset_formats();
|
||||
$this->portfolioform = $button->to_html(PORTFOLIO_ADD_TEXT_LINK);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user