mirror of
https://github.com/moodle/moodle.git
synced 2025-02-15 21:36:58 +01:00
Petr's review: Removing assignments by reference where not needed
This commit is contained in:
parent
06d73dd561
commit
9bb4a4a0d5
@ -58,7 +58,7 @@ class moodle_mod_workshop_allocation_manual_renderer extends moodle_renderer_bas
|
||||
* @param object message to display
|
||||
* @return string html code
|
||||
*/
|
||||
public function display_allocations(workshop $workshop, &$peers, $hlauthorid=null, $hlreviewerid=null, $msg=null) {
|
||||
public function display_allocations(workshop $workshop, $peers, $hlauthorid=null, $hlreviewerid=null, $msg=null) {
|
||||
|
||||
$wsoutput = $this->page->theme->get_renderer('mod_workshop', $this->page);
|
||||
if (empty($peers)) {
|
||||
@ -125,7 +125,7 @@ class moodle_mod_workshop_allocation_manual_renderer extends moodle_renderer_bas
|
||||
* @param array $peers objects with properties to display picture and fullname
|
||||
* @return string html code
|
||||
*/
|
||||
protected function reviewers_of_participant(object $user, workshop $workshop, &$peers) {
|
||||
protected function reviewers_of_participant(object $user, workshop $workshop, $peers) {
|
||||
$o = '';
|
||||
if (is_null($user->submissionid)) {
|
||||
$o .= $this->output->output_tag('span', array('class' => 'info'), get_string('nothingtoreview', 'workshop'));
|
||||
@ -171,7 +171,7 @@ class moodle_mod_workshop_allocation_manual_renderer extends moodle_renderer_bas
|
||||
* @param array $peers objects with properties to display picture and fullname
|
||||
* @return string html code
|
||||
*/
|
||||
protected function reviewees_of_participant(object $user, workshop $workshop, &$peers) {
|
||||
protected function reviewees_of_participant(object $user, workshop $workshop, $peers) {
|
||||
$o = '';
|
||||
if (is_null($user->submissionid)) {
|
||||
$o .= $this->output->container(get_string('withoutsubmission', 'workshop'), 'info');
|
||||
@ -215,7 +215,7 @@ class moodle_mod_workshop_allocation_manual_renderer extends moodle_renderer_bas
|
||||
* @param array $users array of users or array of groups of users
|
||||
* @return array of options to be passed to {@link html_select::make_ popup_form()}
|
||||
*/
|
||||
protected function users_to_menu_options(&$users, array $exclude) {
|
||||
protected function users_to_menu_options($users, array $exclude) {
|
||||
$options = array(); // to be returned
|
||||
foreach ($users as $user) {
|
||||
if (!isset($exclude[$user->id])) {
|
||||
|
@ -54,7 +54,7 @@ class testable_workshop_random_allocator extends workshop_random_allocator {
|
||||
return parent::get_element_with_lowest_workload($workload);
|
||||
}
|
||||
public function filter_current_assessments(&$newallocations, $assessments) {
|
||||
return parent::filter_current_assessments($newallocations, $assessments);
|
||||
return parent::filter_current_assessments(&$newallocations, $assessments);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,13 +62,13 @@ class workshop_assessment_form extends moodleform {
|
||||
|
||||
$buttonarray = array();
|
||||
if ($this->mode == 'preview') {
|
||||
$buttonarray[] = &$mform->createElement('submit', 'backtoeditform', get_string('backtoeditform', 'workshop'));
|
||||
$buttonarray[] = $mform->createElement('submit', 'backtoeditform', get_string('backtoeditform', 'workshop'));
|
||||
}
|
||||
if ($this->mode == 'assessment') {
|
||||
$buttonarray[] = &$mform->createElement('submit', 'saveandcontinue', get_string('saveandcontinue', 'workshop'));
|
||||
$buttonarray[] = &$mform->createElement('submit', 'saveandclose', get_string('saveandclose', 'workshop'));
|
||||
$buttonarray[] = $mform->createElement('submit', 'saveandcontinue', get_string('saveandcontinue', 'workshop'));
|
||||
$buttonarray[] = $mform->createElement('submit', 'saveandclose', get_string('saveandclose', 'workshop'));
|
||||
}
|
||||
$buttonarray[] = &$mform->createElement('cancel');
|
||||
$buttonarray[] = $mform->createElement('cancel');
|
||||
$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
|
||||
$mform->closeHeaderBefore('buttonar');
|
||||
}
|
||||
|
@ -70,10 +70,10 @@ class workshop_edit_strategy_form extends moodleform {
|
||||
//}
|
||||
|
||||
$buttonarray = array();
|
||||
$buttonarray[] = &$mform->createElement('submit', 'saveandcontinue', get_string('saveandcontinue', 'workshop'));
|
||||
$buttonarray[] = &$mform->createElement('submit', 'saveandpreview', get_string('saveandpreview', 'workshop'));
|
||||
$buttonarray[] = &$mform->createElement('submit', 'saveandclose', get_string('saveandclose', 'workshop'));
|
||||
$buttonarray[] = &$mform->createElement('cancel');
|
||||
$buttonarray[] = $mform->createElement('submit', 'saveandcontinue', get_string('saveandcontinue', 'workshop'));
|
||||
$buttonarray[] = $mform->createElement('submit', 'saveandpreview', get_string('saveandpreview', 'workshop'));
|
||||
$buttonarray[] = $mform->createElement('submit', 'saveandclose', get_string('saveandclose', 'workshop'));
|
||||
$buttonarray[] = $mform->createElement('cancel');
|
||||
$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
|
||||
$mform->closeHeaderBefore('buttonar');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user