Merge branch 'MDL-30843_b' of git://github.com/rwijaya/moodle

This commit is contained in:
Sam Hemelryk 2012-04-10 12:34:37 +12:00
commit 5bfeb5ffd3
108 changed files with 390 additions and 216 deletions

View file

@ -46,7 +46,8 @@ require_capability('moodle/notes:manage', $context);
if (empty($CFG->enablenotes)) {
print_error('notesdisabled', 'notes');
}
$testusers = $users;
$users = '';
if (!empty($users) && confirm_sesskey()) {
if (count($users) != count($contents) || count($users) != count($states)) {
print_error('invalidformdata', '', $CFG->wwwroot.'/user/index.php?id='.$id);
@ -79,7 +80,7 @@ $PAGE->set_title("$course->shortname: ".get_string('extendenrol'));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
$users = $testusers;
// this will contain all available the based On select options, but we'll disable some on them on a per user basis
echo $OUTPUT->heading($straddnote);
@ -104,12 +105,12 @@ if (empty($users) and $post = data_submitted()) {
}
}
}
foreach ($users as $k => $v) {
if(!$user = $DB->get_record('user', array('id'=>$v))) {
continue;
}
$checkbox = html_writer::select($state_names, 'states[' . $k . ']', empty($states[$k]) ? NOTES_STATE_PUBLIC : $states[$k], false);
$checkbox = html_writer::label('menustates[' . $k . ']', 'menustates', false, array('class' => 'accesshide'));
$checkbox .= html_writer::select($state_names, 'states[' . $k . ']', empty($states[$k]) ? NOTES_STATE_PUBLIC : $states[$k], false);
$table->data[] = array(
'<input type="hidden" name="userid['.$k.']" value="'.$v.'" />'. fullname($user, true),
'<textarea name="contents['. $k . ']" rows="2" cols="40">' . strip_tags(@$contents[$k]) . '</textarea>',

View file

@ -119,6 +119,7 @@ echo '<br /><textarea name="content" rows="5" cols="50">' . strip_tags(@$content
echo '<p>';
echo get_string('publishstate', 'notes');
echo $OUTPUT->help_icon('publishstate', 'notes');
echo html_writer::label(get_string('state'), 'menustate', false, array('class' => 'accesshide'));
echo html_writer::select($state_names, 'state', empty($state) ? NOTES_STATE_PUBLIC : $state, false);
echo '</p>';

View file

@ -813,7 +813,8 @@
if (has_capability('moodle/site:viewparticipants', $context) && $totalcount > ($perpage*3)) {
echo '<form action="index.php" class="searchform"><div><input type="hidden" name="id" value="'.$course->id.'" />'.get_string('search').':&nbsp;'."\n";
echo '<input type="text" name="search" value="'.s($search).'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></div></form>'."\n";
echo '<label class="accesshide" for="search">' . get_string('search', 'search') . '</label>';
echo '<input type="text" id="search" name="search" value="'.s($search).'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></div></form>'."\n";
}
$perpageurl = clone($baseurl);

View file

@ -14,7 +14,7 @@
</tr>
<tr valign="top">
<td align="right"><b><?php print_string("formattexttype"); ?>:</b></td>
<td align="right"><label for="menuformat"><b><?php print_string("formattexttype"); ?>:</b></label></td>
<td>
<?php
if ($usehtmleditor) { /// Trying this out for a while