Merge branch 'MDL-36357' of git://github.com/danpoltawski/moodle

Conflicts:
	user/view.php
This commit is contained in:
Sam Hemelryk 2013-01-09 09:34:22 +13:00
commit f44e7d0a77
52 changed files with 65 additions and 65 deletions

View File

@ -51,7 +51,7 @@ abstract class xml_output {
public function __construct($usebuffer = true) {
$this->inittime = microtime(true);
$this->finishtime = $this->inittime;;
$this->finishtime = $this->inittime;
$this->sentbytes = 0;
$this->usebuffer = $usebuffer;

View File

@ -527,7 +527,7 @@ function print_mnet_log($hostid, $course, $user=0, $date=0, $order="l.time ASC",
echo "</td>\n";
echo "<td class=\"r$row c4\">\n";
echo $log->action .': '.$log->module;
echo "</td>\n";;
echo "</td>\n";
echo "<td class=\"r$row c5\">{$log->info}</td>\n";
echo "</tr>\n";
}

View File

@ -72,7 +72,7 @@ if ($mform->is_cancelled()) {
$data->reset_start_date_old = $course->startdate;
$status = reset_course_userdata($data);
$data = array();;
$data = array();
foreach ($status as $item) {
$line = array();
$line[] = $item['component'];

View File

@ -185,7 +185,7 @@ if (strlen($result) > 0) {
}
if (!$course = $DB->get_record('course', array('id'=>$data->courseid))) { // Check that course exists
message_paypal_error_to_admin("Course $data->courseid doesn't exist", $data);;
message_paypal_error_to_admin("Course $data->courseid doesn't exist", $data);
die;
}

View File

@ -203,7 +203,7 @@ foreach ($users as $userid=>&$user) {
$user['picture'] = $OUTPUT->render($user['picture']);
$user['role'] = $renderer->user_roles_and_actions($userid, $user['roles'], $manager->get_assignable_roles(), $canassign, $PAGE->url);
$user['group'] = $renderer->user_groups_and_actions($userid, $user['groups'], $manager->get_all_groups(), has_capability('moodle/course:managegroups', $manager->get_context()), $PAGE->url);
$user['enrol'] = $renderer->user_enrolments_and_actions($user['enrolments']);;
$user['enrol'] = $renderer->user_enrolments_and_actions($user['enrolments']);
}
$table->set_total_users($manager->get_total_users());
$table->set_users($users);

View File

@ -309,7 +309,7 @@ class grade_edit_tree {
$endcell->colspan = (19 - $level);
$endcell->attributes['class'] = 'colspan ' . $levelclass;
$returnrows[] = new html_table_row(array($endcell));;
$returnrows[] = new html_table_row(array($endcell));
} else { // Dealing with a grade item

View File

@ -1213,7 +1213,7 @@ class ddl_testcase extends database_driver_testcase {
try {
$result = $DB->insert_record('test_table_cust0', $record, false);
} catch (dml_exception $e) {
$result = false;;
$result = false;
}
$this->resetDebugging();
$this->assertFalse($result);

View File

@ -120,7 +120,7 @@ abstract class xml_database_importer extends database_importer {
case 'record' :
$this->import_table_data($this->current_table, $this->current_row);
$this->current_row = null;;
$this->current_row = null;
break;
case 'field' :

View File

@ -1545,7 +1545,7 @@ abstract class enrol_plugin {
return NULL;
}
return new moodle_url("/enrol/$name/unenrolself.php", array('enrolid'=>$instance->id));;
return new moodle_url("/enrol/$name/unenrolself.php", array('enrolid'=>$instance->id));
}
/**

View File

@ -515,7 +515,7 @@ function events_trigger($eventname, $eventdata) {
events_get_handlers('reset');
} else {
$errormessage = 'Unknown error';;
$errormessage = 'Unknown error';
$result = events_dispatch($handler, $eventdata, $errormessage);
if ($result === true) {
// everything is fine - event dispatched
@ -615,4 +615,4 @@ function events_pending_count($eventname) {
WHERE h.eventname = ?";
return $DB->count_records_sql($sql, array($eventname));
}
}

View File

@ -1331,7 +1331,7 @@ function download_file_content($url, $headers=null, $postdata=null, $fullrespons
$response->error = 'Unknown cURL error';
} else {
$response = new stdClass();;
$response = new stdClass();
$response->status = (string)$info['http_code'];
$response->headers = $received->headers;
$response->response_code = $received->headers[0];

View File

@ -1674,7 +1674,7 @@ class file_storage {
$reference['component'] = is_null($params['component']) ? null : clean_param($params['component'], PARAM_COMPONENT);
$reference['itemid'] = is_null($params['itemid']) ? null : clean_param($params['itemid'], PARAM_INT);
$reference['filearea'] = is_null($params['filearea']) ? null : clean_param($params['filearea'], PARAM_AREA);
$reference['filepath'] = is_null($params['filepath']) ? null : clean_param($params['filepath'], PARAM_PATH);;
$reference['filepath'] = is_null($params['filepath']) ? null : clean_param($params['filepath'], PARAM_PATH);
$reference['filename'] = is_null($params['filename']) ? null : clean_param($params['filename'], PARAM_FILE);
return base64_encode(serialize($reference));
}

View File

@ -5881,7 +5881,7 @@ function get_file_browser() {
function get_file_packer($mimetype='application/zip') {
global $CFG;
static $fp = array();;
static $fp = array();
if (isset($fp[$mimetype])) {
return $fp[$mimetype];

View File

@ -65,7 +65,7 @@ class MoodleODSWorkbook {
*/
function &add_format($properties = array()) {
$format = new MoodleODSFormat($properties);
return $format;;
return $format;
}
/* Close the Moodle Workbook

View File

@ -2105,7 +2105,7 @@ class core_renderer extends renderer_base {
$attributes = array('src'=>$src, 'alt'=>$alt, 'title'=>$alt, 'class'=>$class, 'width'=>$size, 'height'=>$size);
// get the image html output fisrt
$output = html_writer::empty_tag('img', $attributes);;
$output = html_writer::empty_tag('img', $attributes);
// then wrap it in link if needed
if (!$userpicture->link) {

View File

@ -335,7 +335,7 @@ class portfolio_exporter {
$mform->display();
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
return false;;
return false;
}
} else {
$this->noexportconfig = true;

View File

@ -406,7 +406,7 @@ function stats_cron_daily($maxdays=1) {
SELECT 'enrolments', $nextmidnight, ".SITEID.", $defaultfproleid,
$totalactiveusers AS stat1, $dailyactiveusers AS stat2" .
$DB->sql_null_from_clause();;
$DB->sql_null_from_clause();
if ($logspresent && !stats_run_query($sql)) {
$failed = true;

View File

@ -41,7 +41,7 @@ class conditionlib_testcase extends advanced_testcase {
$CFG->enableavailability = 1;
$CFG->enablecompletion = 1;
$user = $this->getDataGenerator()->create_user();;
$user = $this->getDataGenerator()->create_user();
$this->setUser($user);
}

View File

@ -68,7 +68,7 @@ class navigation_node_testcase extends basic_testcase {
$demo5->add('activity1', null, navigation_node::TYPE_ACTIVITY, null, 'activity1')->make_active();
$hiddendemo1 = $this->node->add('hiddendemo1', $this->inactiveurl, navigation_node::TYPE_CATEGORY, null, 'hiddendemo1', new pix_icon('i/course', ''));
$hiddendemo1->hidden = true;
$hiddendemo1->add('hiddendemo2', $this->inactiveurl, navigation_node::TYPE_COURSE, null, 'hiddendemo2', new pix_icon('i/course', ''))->helpbutton = 'Here is a help button';;
$hiddendemo1->add('hiddendemo2', $this->inactiveurl, navigation_node::TYPE_COURSE, null, 'hiddendemo2', new pix_icon('i/course', ''))->helpbutton = 'Here is a help button';
$hiddendemo1->add('hiddendemo3', $this->inactiveurl, navigation_node::TYPE_COURSE,null, 'hiddendemo3', new pix_icon('i/course', ''))->display = false;
}

View File

@ -786,7 +786,7 @@ function upgrade_plugins_blocks($startcallback, $endcallback, $verbose) {
require_once($fullblock.'/db/install.php');
// Set installation running flag, we need to recover after exception or error
set_config('installrunning', 1, 'block_'.$blockname);
$post_install_function = 'xmldb_block_'.$blockname.'_install';;
$post_install_function = 'xmldb_block_'.$blockname.'_install';
$post_install_function();
unset_config('installrunning', 'block_'.$blockname);
}

View File

@ -310,7 +310,7 @@ function mnet_encrypt_message($message, $remote_certificate) {
* @return string The signature over that text
*/
function mnet_get_keypair() {
global $CFG, $DB;;
global $CFG, $DB;
static $keypair = null;
if (!is_null($keypair)) return $keypair;
if ($result = get_config('mnet', 'openssl')) {

View File

@ -106,7 +106,7 @@ class feedback_item_info extends feedback_item_base {
public function get_analysed($item, $groupid = false, $courseid = false) {
$presentation = $item->presentation;
$analysed_val = new stdClass();;
$analysed_val = new stdClass();
$analysed_val->data = null;
$analysed_val->name = $item->name;
$values = feedback_get_group_values($item, $groupid, $courseid);

View File

@ -228,7 +228,7 @@ if ($generalforums) {
}
$forum->intro = shorten_text(format_module_intro('forum', $forum, $cm->id), $CFG->forum_shortpost);
$forumname = format_string($forum->name, true);;
$forumname = format_string($forum->name, true);
if ($cm->visible) {
$style = '';
@ -366,7 +366,7 @@ if ($course->id != SITEID) { // Only real courses have learning forums
$printsection = '';
}
$forumname = format_string($forum->name,true);;
$forumname = format_string($forum->name,true);
if ($cm->visible) {
$style = '';

View File

@ -7192,7 +7192,7 @@ function forum_reset_userdata($data) {
if( $removeposts || !empty($data->reset_forum_ratings) ) {
$forumssql = "$allforumssql $typesql";
$forums = $forums = $DB->get_records_sql($forumssql, $params);
$rm = new rating_manager();;
$rm = new rating_manager();
$ratingdeloptions = new stdClass;
$ratingdeloptions->component = 'mod_forum';
$ratingdeloptions->ratingarea = 'post';

View File

@ -30,7 +30,7 @@ require_once($CFG->dirroot.'/mod/lesson/locallib.php');
$id = required_param('id', PARAM_INT);
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));
@ -214,4 +214,4 @@ if ($lesson->review && !$result->correctanswer && !$result->noanswer && !$result
echo $OUTPUT->single_button($url, get_string('continue', 'lesson'));
}
echo $lessonoutput->footer();
echo $lessonoutput->footer();

View File

@ -29,7 +29,7 @@ require_once($CFG->dirroot.'/mod/lesson/locallib.php');
$id = required_param('id', PARAM_INT);
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));

View File

@ -34,7 +34,7 @@ $id = required_param('id', PARAM_INT); // Course Module ID
$qtype = optional_param('qtype', 0, PARAM_INT);
$edit = optional_param('edit', false, PARAM_BOOL);
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));

View File

@ -32,7 +32,7 @@ require_once($CFG->libdir.'/eventslib.php');
$id = required_param('id', PARAM_INT); // Course Module ID
$mode = optional_param('mode', 'display', PARAM_ALPHA);
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));

View File

@ -31,7 +31,7 @@ require_once($CFG->dirroot.'/mod/lesson/locallib.php');
$id = required_param('id', PARAM_INT);
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));

View File

@ -32,7 +32,7 @@ $id = required_param('id', PARAM_INT); // Course Module ID
$mode = optional_param('mode', '', PARAM_ALPHA);
$link = optional_param('link', 0, PARAM_INT);
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));
@ -224,4 +224,4 @@ switch ($mode) {
break;
}
echo $lessonoutput->footer();
echo $lessonoutput->footer();

View File

@ -35,7 +35,7 @@ $pageid = optional_param('pageid', '', PARAM_INT); // Page ID
$PAGE->set_url('/mod/lesson/import.php', array('id'=>$id, 'pageid'=>$pageid));
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));
@ -106,4 +106,4 @@ if ($data = $mform->get_data()) {
$mform->display();
}
echo $OUTPUT->footer();
echo $OUTPUT->footer();

View File

@ -36,7 +36,7 @@ $id = required_param('id', PARAM_INT); // Course Module ID
$action = required_param('action', PARAM_ALPHA); // Action
$pageid = required_param('pageid', PARAM_INT);
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));
@ -166,4 +166,4 @@ switch ($action) {
break;
}
echo $lessonoutput->footer();
echo $lessonoutput->footer();

View File

@ -948,7 +948,7 @@ class lesson extends lesson_base {
require_once($CFG->libdir.'/gradelib.php');
require_once($CFG->dirroot.'/calendar/lib.php');
$DB->delete_records("lesson", array("id"=>$this->properties->id));;
$DB->delete_records("lesson", array("id"=>$this->properties->id));
$DB->delete_records("lesson_pages", array("lessonid"=>$this->properties->id));
$DB->delete_records("lesson_answers", array("lessonid"=>$this->properties->id));
$DB->delete_records("lesson_attempts", array("lessonid"=>$this->properties->id));

View File

@ -33,7 +33,7 @@ require_once($CFG->dirroot.'/mod/lesson/locallib.php');
$id = required_param('id', PARAM_INT); // Course Module ID
$printclose = optional_param('printclose', 0, PARAM_INT);
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));
@ -109,4 +109,4 @@ if ($lesson->mediaclose) {
echo '</div>';
}
echo $lessonoutput->footer();
echo $lessonoutput->footer();

View File

@ -122,7 +122,7 @@ class lesson_page_type_endofbranch extends lesson_page {
$answer = new stdClass;
}
$answer->timemodified = time();;
$answer->timemodified = time();
if (isset($properties->jumpto[0])) {
$answer->jumpto = $properties->jumpto[0];
}
@ -230,4 +230,4 @@ class lesson_add_page_form_endofbranch extends lesson_add_page_form_base {
redirect($CFG->wwwroot."/mod/lesson/edit.php?id=".$PAGE->cm->id);
}
}
}

View File

@ -91,7 +91,7 @@ class lesson_page_type_endofcluster extends lesson_page {
$answer = new stdClass;
}
$answer->timemodified = time();;
$answer->timemodified = time();
if (isset($properties->jumpto[0])) {
$answer->jumpto = $properties->jumpto[0];
}
@ -198,4 +198,4 @@ class lesson_add_page_form_endofcluster extends lesson_add_page_form_base {
$lesson->add_message(get_string('addedendofcluster', 'lesson'), 'notifysuccess');
redirect($CFG->wwwroot.'/mod/lesson/edit.php?id='.$PAGE->cm->id);
}
}
}

View File

@ -35,7 +35,7 @@ $edit = optional_param('edit', -1, PARAM_BOOL);
$userpassword = optional_param('userpassword','',PARAM_RAW);
$backtocourse = optional_param('backtocourse', false, PARAM_RAW);
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));
@ -475,7 +475,7 @@ if ($pageid != LESSON_EOL) {
} else {
if ($lesson->timed) {
if ($outoftime == 'normal') {
$grade = new stdClass();;
$grade = new stdClass();
$grade->lessonid = $lesson->id;
$grade->userid = $USER->id;
$grade->grade = 0;

View File

@ -1317,7 +1317,7 @@ function quiz_print_status_bar($quiz) {
if (empty($dates)) {
$dates[] = get_string('alwaysavailable', 'quiz');
}
$tooltip = implode(', ', $dates);;
$tooltip = implode(', ', $dates);
// Brief summary on the page.
if ($timenow < $quiz->timeopen) {

View File

@ -367,7 +367,7 @@ function scorm_get_manifest($blocks, $scoes) {
}
if ($sequencing['name']=='IMSSS:ROLLUPRULES') {
if (isset($sequencing['attrs']['ROLLUPOBJECTIVESATISFIED'])) {
$scoes->elements[$manifest][$parent->organization][$parent->identifier]->rollupobjectivesatisfied = $sequencing['attrs']['ROLLUPOBJECTIVESATISFIED'] == 'true'?1:0;;
$scoes->elements[$manifest][$parent->organization][$parent->identifier]->rollupobjectivesatisfied = $sequencing['attrs']['ROLLUPOBJECTIVESATISFIED'] == 'true'?1:0;
}
if (isset($sequencing['attrs']['ROLLUPPROGRESSCOMPLETION'])) {
$scoes->elements[$manifest][$parent->organization][$parent->identifier]->rollupprogresscompletion = $sequencing['attrs']['ROLLUPPROGRESSCOMPLETION'] == 'true'?1:0;

View File

@ -132,7 +132,7 @@ class qformat_xhtml extends qformat_default {
$quest_text = $this->repchar( $subquestion->questiontext );
$dropdown = html_writer::label(get_string('answer', 'qtype_match', $option+1), 'quest_'.$id.'_'.$option, false, array('class' => 'accesshide'));
$dropdown .= html_writer::select($selectoptions, "quest_{$id}_{$option}", '', false, array('id' => "quest_{$id}_{$option}"));
$expout .= html_writer::tag('li', $quest_text);;
$expout .= html_writer::tag('li', $quest_text);
$expout .= $dropdown;
$option++;
}

View File

@ -1150,7 +1150,7 @@ class qtype_calculated extends question_type {
}
$qtext = $qtext.$str;
}
$answer->answer = $qtext.$qtextremaining;;
$answer->answer = $qtext.$qtextremaining;
$comment->stranswers[$key]= $answer->answer;
}

View File

@ -342,7 +342,7 @@ class question_type {
if (empty($form->questiontext['text'])) {
$question->questiontext = '';
} else {
$question->questiontext = trim($form->questiontext['text']);;
$question->questiontext = trim($form->questiontext['text']);
}
$question->questiontextformat = !empty($form->questiontext['format']) ?
$form->questiontext['format'] : 0;

View File

@ -180,7 +180,7 @@ class rating implements renderable {
$ratingoptions->scaleid = $this->scaleid;
$ratingoptions->userid = $this->userid;
$rm = new rating_manager();;
$rm = new rating_manager();
$items = $rm->get_ratings($ratingoptions);
$firstitem = $items[0]->rating;

View File

@ -82,7 +82,7 @@ function report_log_can_access_user_report($user, $course) {
$today = true;
}
if (has_capability('report/log:viewtoday', $coursecontext)) {
$all = true;;
$all = true;
}
if ($today and $all) {

View File

@ -127,7 +127,7 @@ foreach ($modinfo->sections as $sectionnum=>$section) {
$attributes['class'] = 'dimmed';
}
$activitycell->text = $activityicon . html_writer::link("$CFG->wwwroot/mod/$cm->modname/view.php?id=$cm->id", format_string($cm->name), $attributes);;
$activitycell->text = $activityicon . html_writer::link("$CFG->wwwroot/mod/$cm->modname/view.php?id=$cm->id", format_string($cm->name), $attributes);
$reportrow->cells[] = $activitycell;

View File

@ -563,7 +563,7 @@ function report_security_check_defaultuserrole($detailed=false) {
$result->info = null;
$result->details = null;
$result->status = null;
$result->link = "<a href=\"$CFG->wwwroot/$CFG->admin/settings.php?section=userpolicies\">".get_string('userpolicies', 'admin').'</a>';;
$result->link = "<a href=\"$CFG->wwwroot/$CFG->admin/settings.php?section=userpolicies\">".get_string('userpolicies', 'admin').'</a>';
if (!$default_role = $DB->get_record('role', array('id'=>$CFG->defaultuserroleid))) {
$result->status = REPORT_SECURITY_WARNING;
@ -621,7 +621,7 @@ function report_security_check_guestrole($detailed=false) {
$result->info = null;
$result->details = null;
$result->status = null;
$result->link = "<a href=\"$CFG->wwwroot/$CFG->admin/settings.php?section=userpolicies\">".get_string('userpolicies', 'admin').'</a>';;
$result->link = "<a href=\"$CFG->wwwroot/$CFG->admin/settings.php?section=userpolicies\">".get_string('userpolicies', 'admin').'</a>';
if (!$guest_role = $DB->get_record('role', array('id'=>$CFG->guestroleid))) {
$result->status = REPORT_SECURITY_WARNING;
@ -679,7 +679,7 @@ function report_security_check_frontpagerole($detailed=false) {
$result->info = null;
$result->details = null;
$result->status = null;
$result->link = "<a href=\"$CFG->wwwroot/$CFG->admin/settings.php?section=frontpagesettings\">".get_string('frontpagesettings','admin').'</a>';;
$result->link = "<a href=\"$CFG->wwwroot/$CFG->admin/settings.php?section=frontpagesettings\">".get_string('frontpagesettings','admin').'</a>';
if (!$frontpage_role = $DB->get_record('role', array('id'=>$CFG->defaultfrontpageroleid))) {
$result->status = REPORT_SECURITY_INFO;

View File

@ -65,7 +65,7 @@ class repository_coursefiles extends repository {
if (!empty($encodedpath)) {
$params = unserialize(base64_decode($encodedpath));
if (is_array($params)) {
$filepath = is_null($params['filepath']) ? NULL : clean_param($params['filepath'], PARAM_PATH);;
$filepath = is_null($params['filepath']) ? NULL : clean_param($params['filepath'], PARAM_PATH);
$filename = is_null($params['filename']) ? NULL : clean_param($params['filename'], PARAM_FILE);
$context = context::instance_by_id(clean_param($params['contextid'], PARAM_INT));
}
@ -155,7 +155,7 @@ class repository_coursefiles extends repository {
$contextid = clean_param($params['contextid'], PARAM_INT);
$fileitemid = clean_param($params['itemid'], PARAM_INT);
$filename = clean_param($params['filename'], PARAM_FILE);
$filepath = clean_param($params['filepath'], PARAM_PATH);;
$filepath = clean_param($params['filepath'], PARAM_PATH);
$filearea = clean_param($params['filearea'], PARAM_AREA);
$component = clean_param($params['component'], PARAM_COMPONENT);
$context = context::instance_by_id($contextid);

View File

@ -1325,7 +1325,7 @@ abstract class repository {
$event['existingfile'] = new stdClass;
$event['existingfile']->filepath = $record->filepath;
$event['existingfile']->filename = $old_filename;
$event['existingfile']->url = moodle_url::make_draftfile_url($draftitemid, $record->filepath, $old_filename)->out();;
$event['existingfile']->url = moodle_url::make_draftfile_url($draftitemid, $record->filepath, $old_filename)->out();
return $event;
}
if ($file = $fs->create_file_from_pathname($record, $thefile)) {

View File

@ -61,7 +61,7 @@ class repository_local extends repository {
$component = is_null($params['component']) ? NULL : clean_param($params['component'], PARAM_COMPONENT);
$filearea = is_null($params['filearea']) ? NULL : clean_param($params['filearea'], PARAM_AREA);
$itemid = is_null($params['itemid']) ? NULL : clean_param($params['itemid'], PARAM_INT);
$filepath = is_null($params['filepath']) ? NULL : clean_param($params['filepath'], PARAM_PATH);;
$filepath = is_null($params['filepath']) ? NULL : clean_param($params['filepath'], PARAM_PATH);
$filename = is_null($params['filename']) ? NULL : clean_param($params['filename'], PARAM_FILE);
$context = context::instance_by_id(clean_param($params['contextid'], PARAM_INT));
}

View File

@ -267,7 +267,7 @@ switch ($action) {
$event['existingfile'] = new stdClass;
$event['existingfile']->filepath = $saveas_path;
$event['existingfile']->filename = $saveas_filename;
$event['existingfile']->url = moodle_url::make_draftfile_url($itemid, $saveas_path, $saveas_filename)->out();;
$event['existingfile']->url = moodle_url::make_draftfile_url($itemid, $saveas_path, $saveas_filename)->out();
} else {
$storedfile = $fs->create_file_from_reference($record, $repo_id, $reference);

View File

@ -63,7 +63,7 @@ class repository_user extends repository {
if (!empty($encodedpath)) {
$params = unserialize(base64_decode($encodedpath));
if (is_array($params)) {
$filepath = clean_param($params['filepath'], PARAM_PATH);;
$filepath = clean_param($params['filepath'], PARAM_PATH);
$filename = clean_param($params['filename'], PARAM_FILE);
}
} else {

View File

@ -131,7 +131,7 @@ foreach ($files as $file) {
$file_record->filepath = $filepath;
$file_record->itemid = 0;
$file_record->license = $CFG->sitedefaultlicense;
$file_record->author = fullname($authenticationinfo['user']);;
$file_record->author = fullname($authenticationinfo['user']);
$file_record->source = '';
//Check if the file already exist