MDL-36357 cleanup - remove double semicolons

This commit is contained in:
Dan Poltawski 2012-11-15 09:51:26 +08:00
parent a3f3ea2684
commit 0e35ba6ffc
53 changed files with 66 additions and 66 deletions

View file

@ -51,7 +51,7 @@ abstract class xml_output {
public function __construct($usebuffer = true) { public function __construct($usebuffer = true) {
$this->inittime = microtime(true); $this->inittime = microtime(true);
$this->finishtime = $this->inittime;; $this->finishtime = $this->inittime;
$this->sentbytes = 0; $this->sentbytes = 0;
$this->usebuffer = $usebuffer; $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>\n";
echo "<td class=\"r$row c4\">\n"; echo "<td class=\"r$row c4\">\n";
echo $log->action .': '.$log->module; echo $log->action .': '.$log->module;
echo "</td>\n";; echo "</td>\n";
echo "<td class=\"r$row c5\">{$log->info}</td>\n"; echo "<td class=\"r$row c5\">{$log->info}</td>\n";
echo "</tr>\n"; echo "</tr>\n";
} }

View file

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

View file

@ -184,7 +184,7 @@ if (strlen($result) > 0) {
} }
if (!$course = $DB->get_record('course', array('id'=>$data->courseid))) { // Check that course exists 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; die;
} }

View file

@ -203,7 +203,7 @@ foreach ($users as $userid=>&$user) {
$user['picture'] = $OUTPUT->render($user['picture']); $user['picture'] = $OUTPUT->render($user['picture']);
$user['role'] = $renderer->user_roles_and_actions($userid, $user['roles'], $manager->get_assignable_roles(), $canassign, $PAGE->url); $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['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_total_users($manager->get_total_users());
$table->set_users($users); $table->set_users($users);

View file

@ -315,7 +315,7 @@ class grade_edit_tree {
$endcell->colspan = (19 - $level); $endcell->colspan = (19 - $level);
$endcell->attributes['class'] = 'colspan ' . $levelclass; $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 } else { // Dealing with a grade item

View file

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

View file

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

View file

@ -1545,7 +1545,7 @@ abstract class enrol_plugin {
return NULL; 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'); events_get_handlers('reset');
} else { } else {
$errormessage = 'Unknown error';; $errormessage = 'Unknown error';
$result = events_dispatch($handler, $eventdata, $errormessage); $result = events_dispatch($handler, $eventdata, $errormessage);
if ($result === true) { if ($result === true) {
// everything is fine - event dispatched // everything is fine - event dispatched
@ -615,4 +615,4 @@ function events_pending_count($eventname) {
WHERE h.eventname = ?"; WHERE h.eventname = ?";
return $DB->count_records_sql($sql, array($eventname)); return $DB->count_records_sql($sql, array($eventname));
} }

View file

@ -1318,7 +1318,7 @@ function download_file_content($url, $headers=null, $postdata=null, $fullrespons
$response->error = 'Unknown cURL error'; $response->error = 'Unknown cURL error';
} else { } else {
$response = new stdClass();; $response = new stdClass();
$response->status = (string)$info['http_code']; $response->status = (string)$info['http_code'];
$response->headers = $received->headers; $response->headers = $received->headers;
$response->response_code = $received->headers[0]; $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['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['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['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); $reference['filename'] = is_null($params['filename']) ? null : clean_param($params['filename'], PARAM_FILE);
return base64_encode(serialize($reference)); return base64_encode(serialize($reference));
} }

View file

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

View file

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

View file

@ -2089,7 +2089,7 @@ class core_renderer extends renderer_base {
$attributes = array('src'=>$src, 'alt'=>$alt, 'title'=>$alt, 'class'=>$class, 'width'=>$size, 'height'=>$size); $attributes = array('src'=>$src, 'alt'=>$alt, 'title'=>$alt, 'class'=>$class, 'width'=>$size, 'height'=>$size);
// get the image html output fisrt // 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 // then wrap it in link if needed
if (!$userpicture->link) { if (!$userpicture->link) {

View file

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

View file

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

View file

@ -41,7 +41,7 @@ class conditionlib_testcase extends advanced_testcase {
$CFG->enableavailability = 1; $CFG->enableavailability = 1;
$CFG->enablecompletion = 1; $CFG->enablecompletion = 1;
$user = $this->getDataGenerator()->create_user();; $user = $this->getDataGenerator()->create_user();
$this->setUser($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(); $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 = $this->node->add('hiddendemo1', $this->inactiveurl, navigation_node::TYPE_CATEGORY, null, 'hiddendemo1', new pix_icon('i/course', ''));
$hiddendemo1->hidden = true; $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; $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'); require_once($fullblock.'/db/install.php');
// Set installation running flag, we need to recover after exception or error // Set installation running flag, we need to recover after exception or error
set_config('installrunning', 1, 'block_'.$blockname); set_config('installrunning', 1, 'block_'.$blockname);
$post_install_function = 'xmldb_block_'.$blockname.'_install';; $post_install_function = 'xmldb_block_'.$blockname.'_install';
$post_install_function(); $post_install_function();
unset_config('installrunning', 'block_'.$blockname); 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 * @return string The signature over that text
*/ */
function mnet_get_keypair() { function mnet_get_keypair() {
global $CFG, $DB;; global $CFG, $DB;
static $keypair = null; static $keypair = null;
if (!is_null($keypair)) return $keypair; if (!is_null($keypair)) return $keypair;
if ($result = get_config('mnet', 'openssl')) { 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) { public function get_analysed($item, $groupid = false, $courseid = false) {
$presentation = $item->presentation; $presentation = $item->presentation;
$analysed_val = new stdClass();; $analysed_val = new stdClass();
$analysed_val->data = null; $analysed_val->data = null;
$analysed_val->name = $item->name; $analysed_val->name = $item->name;
$values = feedback_get_group_values($item, $groupid, $courseid); $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); $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) { if ($cm->visible) {
$style = ''; $style = '';
@ -366,7 +366,7 @@ if ($course->id != SITEID) { // Only real courses have learning forums
$printsection = ''; $printsection = '';
} }
$forumname = format_string($forum->name,true);; $forumname = format_string($forum->name,true);
if ($cm->visible) { if ($cm->visible) {
$style = ''; $style = '';

View file

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

View file

@ -30,7 +30,7 @@ require_once($CFG->dirroot.'/mod/lesson/locallib.php');
$id = required_param('id', PARAM_INT); $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); $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', 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 $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); $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); $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', 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); $qtype = optional_param('qtype', 0, PARAM_INT);
$edit = optional_param('edit', false, PARAM_BOOL); $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); $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', 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 $id = required_param('id', PARAM_INT); // Course Module ID
$mode = optional_param('mode', 'display', PARAM_ALPHA); $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); $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', 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); $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); $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', 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); $mode = optional_param('mode', '', PARAM_ALPHA);
$link = optional_param('link', 0, PARAM_INT); $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); $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST)); $lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));
@ -224,4 +224,4 @@ switch ($mode) {
break; 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)); $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); $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', 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(); $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 $action = required_param('action', PARAM_ALPHA); // Action
$pageid = required_param('pageid', PARAM_INT); $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); $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST)); $lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));
@ -166,4 +166,4 @@ switch ($action) {
break; 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->libdir.'/gradelib.php');
require_once($CFG->dirroot.'/calendar/lib.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_pages", array("lessonid"=>$this->properties->id));
$DB->delete_records("lesson_answers", 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)); $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 $id = required_param('id', PARAM_INT); // Course Module ID
$printclose = optional_param('printclose', 0, PARAM_INT); $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); $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', 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 '</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 = new stdClass;
} }
$answer->timemodified = time();; $answer->timemodified = time();
if (isset($properties->jumpto[0])) { if (isset($properties->jumpto[0])) {
$answer->jumpto = $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); 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 = new stdClass;
} }
$answer->timemodified = time();; $answer->timemodified = time();
if (isset($properties->jumpto[0])) { if (isset($properties->jumpto[0])) {
$answer->jumpto = $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'); $lesson->add_message(get_string('addedendofcluster', 'lesson'), 'notifysuccess');
redirect($CFG->wwwroot.'/mod/lesson/edit.php?id='.$PAGE->cm->id); 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); $userpassword = optional_param('userpassword','',PARAM_RAW);
$backtocourse = optional_param('backtocourse', false, 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); $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST)); $lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));
@ -474,7 +474,7 @@ if ($pageid != LESSON_EOL) {
} else { } else {
if ($lesson->timed) { if ($lesson->timed) {
if ($outoftime == 'normal') { if ($outoftime == 'normal') {
$grade = new stdClass();; $grade = new stdClass();
$grade->lessonid = $lesson->id; $grade->lessonid = $lesson->id;
$grade->userid = $USER->id; $grade->userid = $USER->id;
$grade->grade = 0; $grade->grade = 0;

View file

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

View file

@ -367,7 +367,7 @@ function scorm_get_manifest($blocks, $scoes) {
} }
if ($sequencing['name']=='IMSSS:ROLLUPRULES') { if ($sequencing['name']=='IMSSS:ROLLUPRULES') {
if (isset($sequencing['attrs']['ROLLUPOBJECTIVESATISFIED'])) { 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'])) { if (isset($sequencing['attrs']['ROLLUPPROGRESSCOMPLETION'])) {
$scoes->elements[$manifest][$parent->organization][$parent->identifier]->rollupprogresscompletion = $sequencing['attrs']['ROLLUPPROGRESSCOMPLETION'] == 'true'?1:0; $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 ); $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::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}")); $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; $expout .= $dropdown;
$option++; $option++;
} }

View file

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

View file

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

View file

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

View file

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

View file

@ -127,7 +127,7 @@ foreach ($modinfo->sections as $sectionnum=>$section) {
$attributes['class'] = 'dimmed'; $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; $reportrow->cells[] = $activitycell;

View file

@ -563,7 +563,7 @@ function report_security_check_defaultuserrole($detailed=false) {
$result->info = null; $result->info = null;
$result->details = null; $result->details = null;
$result->status = 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))) { if (!$default_role = $DB->get_record('role', array('id'=>$CFG->defaultuserroleid))) {
$result->status = REPORT_SECURITY_WARNING; $result->status = REPORT_SECURITY_WARNING;
@ -621,7 +621,7 @@ function report_security_check_guestrole($detailed=false) {
$result->info = null; $result->info = null;
$result->details = null; $result->details = null;
$result->status = 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))) { if (!$guest_role = $DB->get_record('role', array('id'=>$CFG->guestroleid))) {
$result->status = REPORT_SECURITY_WARNING; $result->status = REPORT_SECURITY_WARNING;
@ -679,7 +679,7 @@ function report_security_check_frontpagerole($detailed=false) {
$result->info = null; $result->info = null;
$result->details = null; $result->details = null;
$result->status = 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))) { if (!$frontpage_role = $DB->get_record('role', array('id'=>$CFG->defaultfrontpageroleid))) {
$result->status = REPORT_SECURITY_INFO; $result->status = REPORT_SECURITY_INFO;

View file

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

View file

@ -1325,7 +1325,7 @@ abstract class repository {
$event['existingfile'] = new stdClass; $event['existingfile'] = new stdClass;
$event['existingfile']->filepath = $record->filepath; $event['existingfile']->filepath = $record->filepath;
$event['existingfile']->filename = $old_filename; $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; return $event;
} }
if ($file = $fs->create_file_from_pathname($record, $thefile)) { 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); $component = is_null($params['component']) ? NULL : clean_param($params['component'], PARAM_COMPONENT);
$filearea = is_null($params['filearea']) ? NULL : clean_param($params['filearea'], PARAM_AREA); $filearea = is_null($params['filearea']) ? NULL : clean_param($params['filearea'], PARAM_AREA);
$itemid = is_null($params['itemid']) ? NULL : clean_param($params['itemid'], PARAM_INT); $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); $filename = is_null($params['filename']) ? NULL : clean_param($params['filename'], PARAM_FILE);
$context = context::instance_by_id(clean_param($params['contextid'], PARAM_INT)); $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'] = new stdClass;
$event['existingfile']->filepath = $saveas_path; $event['existingfile']->filepath = $saveas_path;
$event['existingfile']->filename = $saveas_filename; $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 { } else {
$storedfile = $fs->create_file_from_reference($record, $repo_id, $reference); $storedfile = $fs->create_file_from_reference($record, $repo_id, $reference);

View file

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

View file

@ -288,7 +288,7 @@ if (!isset($hiddenfields['mycourses'])) {
$courselisting = ''; $courselisting = '';
foreach ($mycourses as $mycourse) { foreach ($mycourses as $mycourse) {
if ($mycourse->category) { if ($mycourse->category) {
$ccontext = context_course::instance($mycourse->id);; $ccontext = context_course::instance($mycourse->id);
$cfullname = format_string($mycourse->fullname, true, array('context' => $ccontext)); $cfullname = format_string($mycourse->fullname, true, array('context' => $ccontext));
if ($mycourse->id != $course->id){ if ($mycourse->id != $course->id){
$class = ''; $class = '';

View file

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