-<?php // $Id$
+<?php
/** This expects the output from a command like
* clamscan -r --infected --no-summary <files> 2>&1 | php -d error_log=/path/to/log thisfile.php
* also it's important that the output of clamscan prints the FULL PATH to each infected file, so use absolute paths for area to scan
return $file;
}
-?>
+
$THEME = $original_theme;
echo $OUTPUT->footer();
-?>
+
$table = new html_table();
$table->width = '*';
$table->align = array('left','left','left','left','left','left');
-
+
$select = html_select::make($reportoptions,'report',$report, false);
$select->nothingvalue = '';
$reporttypemenu = $OUTPUT->select($select);
-
+
$select = html_select::make($timeoptions,'time',$time, false);
$select->nothingvalue = '';
$timeoptionsmenu = $OUTPUT->select($select);
-
+
$table->data[] = array(get_string('statsreporttype'),$reporttypemenu,
get_string('statstimeperiod'),$timeoptionsmenu,
'<input type="text" name="numcourses" size="3" maxlength="2" value="'.$numcourses.'" />',
echo '<tr><th class="name" align="left" scope="col">' . get_string('capability','role') . '</th>';
$this->add_header_cells();
echo "</tr>\n</thead>\n<tbody>\n";
-
+
/// Loop over capabilities.
$contextlevel = 0;
$component = '';
echo '<tr class="rolecapheading header"><td colspan="' . (1 + $this->num_extra_columns()) . '" class="header"><strong>' .
get_component_string($capability->component, $capability->contextlevel) .
'</strong></td></tr>';
-
+
}
/** For subclasses to override, output header cells, after the initial capability one. */
$link = html_link::make($this->baseurl . $capability->name, $this->strexplanation);
$link->add_action(new popup_action('click', $link->url, 'hascapabilityexplanation', array('height' => 600, 'width' => 600)));
$link->title = get_string($tooltip, 'role', $a);
- echo $OUTPUT->link($link);
+ echo $OUTPUT->link($link);
echo '</td>';
}
/**
* Print a risk icon, as a link to the Risks page on Moodle Docs.
*
- * @param string $type the type of risk, will be one of the keys from the
+ * @param string $type the type of risk, will be one of the keys from the
* get_all_risks array. Must start with 'risk'.
*/
function get_risk_icon($type) {
global $OUTPUT;
if (!isset($this->riskicons[$type])) {
$iconurl = $OUTPUT->old_icon_url('i/' . str_replace('risk', 'risk_', $type));
-
+
$link = html_link::make($this->risksurl, '<img src="' . $iconurl . '" alt="' . get_string($type . 'short', 'admin') . '" />');
$link->add_action(new popup_action('click', $link->url, 'docspopup'));
$link->title = get_string($type, 'admin');
-
+
$this->riskicons[$type] = $OUTPUT->link($link);
}
return $this->riskicons[$type];
assign_capability($cap, CAP_ALLOW, $this->role->id, $this->context->id);
} else {
unassign_capability($cap, $this->role->id);
- }
+ }
}
}
protected function get_shortname_field($id) {
return '<input type="text" id="' . $id . '" name="' . $id . '" maxlength="254" value="' . s($this->role->shortname) . '" />';
}
-
+
protected function get_description_field($id) {
return print_textarea(true, 10, 50, 50, 10, 'description', $this->role->description, 0, true);
}
}
echo '<td class="' . $permname . '">' . $this->strperms[$permname] . '<span class="note">' .
$default . '</span></td>';
-
+
}
}
*
* In this case we replicate part of get_users_by_capability() get the users
* with moodle/course:view (or moodle/site:doanything). We can't use
- * get_users_by_capability() becuase
+ * get_users_by_capability() becuase
* 1) get_users_by_capability() does not deal with searching by name
* 2) exceptions array can be potentially large for large courses
*/
$fields = 'SELECT ' . $this->required_fields_sql('');
$countfields = 'SELECT COUNT(1)';
- $sql = " FROM {user}
+ $sql = " FROM {user}
WHERE $wherecondition
AND id NOT IN (
SELECT u.id
/**
* @return object a $table structure that can be passed to print_table, containing
- * one cell for each checkbox.
+ * one cell for each checkbox.
*/
public function get_table() {
$table = new html_table();
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->count = $DB->count_records('role_assignments', array('roleid'=>$roleid));
-
+
$formcontinue = html_form::make_button($baseurl, array('confirm' => 1, 'msg' => $msg), get_string('yes'));
$formcancel = html_form::make_button($baseurl, $optionsno, get_string('no'), 'get');
echo $OUTPUT->confirm(get_string('deleterolesure', 'role', $a), $formcontinue, $formcancel);
if (isset($undeletableroles[$role->id])) {
$row[3] .= get_spacer();
} else {
- $row[3] .= get_action_icon($baseurl . '?action=delete&roleid=' . $role->id,
+ $row[3] .= get_action_icon($baseurl . '?action=delete&roleid=' . $role->id,
'delete', $strdelete, get_string('deletexrole', 'role', $role->localname));
}
-/* This class filters the rows of a table like the one on the define or
+/* This class filters the rows of a table like the one on the define or
override roles pages. It adds a search box just above the table, and if
content is typed into that box, it hides any rows in the table where the
capability name does not contain that text. */
if (empty($title)) {
$title = "$SITE->shortname: $category->name";
}
-
+
$PAGE->navbar->add($strcategories, new moodle_url($CFG->wwwroot.'/course/index.php'), navigation_node::TYPE_SETTING);
$PAGE->navbar->add($category->name, new moodle_url($CFG->wwwroot.'/course/category.php', array('id'=>$category->id)), navigation_node::TYPE_SETTING);
$PAGE->set_title($title);
require_login($course);
$PAGE->navigation->add(get_string('roles'));
-
+
if (empty($title)) {
$title = get_string("editinga", "moodle", $fullmodulename);
}
-<?php // $Id$
+<?php
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
echo $OUTPUT->footer();
-?>
+
echo $OUTPUT->footer();
-?>
+
-<?php // $Id$
+<?php
// Automatic update of Timezones from a new source
echo $OUTPUT->footer();
-?>
+
return process_profile_image($originalfile, $destination);
}
-?>
+
-<?php // $Id$
+<?php
require_once $CFG->libdir.'/formslib.php';
class admin_uploadpicture_form extends moodleform {
$this->add_action_buttons(false, get_string('uploadpictures', 'admin'));
}
}
-?>
+
-<?php // $Id$
+<?php
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
echo $OUTPUT->footer();
-?>
+
require_capability('moodle/user:delete', get_context_instance(CONTEXT_SYSTEM));
$return = $CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk.php';
//If no users selected then return to user_bulk.php
-if (empty($SESSION->bulk_users)) {
+if (empty($SESSION->bulk_users)) {
redirect($return);
}
$users = $SESSION->bulk_users; //Get users to display
if(!empty($processed)) {
//Process data form here
$total = count($courses) * count($users);
-
+
for ( $i = 0; $i < $total; $i++ )
{
$param = "selected".$i;
redirect($return, get_string('changessaved'));
}
-//Form beginning
+//Form beginning
echo '<form id="multienrol" name="multienrol" method="post" action="user_bulk_enrol.php">';
echo '<input type="hidden" name="processed" value="yes" />';
$count = 0;
-foreach($users as $user)
+foreach($users as $user)
{
$temparray = array (
- '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.SITEID.'">'.$user->fullname.'</a>'
+ '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.SITEID.'">'.$user->fullname.'</a>'
);
$mycourses = get_my_courses($user->id);
foreach($courses as $acourse)
admin_externalpage_print_header();
echo $OUTPUT->heading(get_string('confirmation', 'admin'));
echo $OUTPUT->box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview');
-
+
$formcontinue = html_form::make_button('user_bulk_message.php', array('confirm' => 1, 'msg' => $msg), get_string('yes'));
$formcancel = html_form::make_button('user_bulk.php', $optionsno, get_string('no'), 'get');
echo $OUTPUT->confirm(get_string('confirmmessage', 'bulkusers', $usernames), $formcontinue, $formcancel);
global $DB;
//by default wherecondition retrieves all users except the deleted, not
//confirmed and guest
- list($wherecondition, $params) = $this->search_sql($search, 'u');
+ list($wherecondition, $params) = $this->search_sql($search, 'u');
$params[] = $this->serviceid;
$userstoremove = $alloweduserselector->get_selected_users();
if (!empty($userstoremove)) {
- foreach ($userstoremove as $removeuser) {
+ foreach ($userstoremove as $removeuser) {
$DB->delete_records('external_services_users', array('externalserviceid' => $id, 'userid' => $removeuser->id));
add_to_log(1, 'core', 'assign', $CFG->admin.'/webservice/service_users.php?id='.$id, 'remove', '', $removeuser->id);
}
</td>
<td id="buttonscell">
<div id="addcontrols">
- <input name="add" id="add" type="submit" value="<?php echo $THEME->larrow.' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
+ <input name="add" id="add" type="submit" value="<?php echo $THEME->larrow.' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" /><br />
</div>
<div id="removecontrols">
$allowedusers = $DB->get_records_sql($sql, array($id));
if (!empty($allowedusers)) {
echo $OUTPUT->box_start('generalbox', 'alloweduserlist');
-
+
echo "<label><strong>".get_string('serviceuserssettings', 'webservice').":</strong></label>";
echo "<br/><br/><span style=\"font-size:85%\">"; //reduce font of the user settings
foreach($allowedusers as $user) {
//TO IMPLEMENT : assign the required capability (if needed)
$contents .= "<div class=\"fitem\"><div class=\"fitemtitle\"><label>".get_string('addrequiredcapability','webservice')." </label></div><div class=\"felement fcheckbox\">";
$checkbox = new html_select_option();
- $checkbox->value = $user->id;
+ $checkbox->value = $user->id;
$checkbox->selected = false;
$checkbox->text = ' ';
$checkbox->label->text = ' ';
$contents .= $OUTPUT->checkbox($checkbox, 'addcap')."</div></div>";
$contents .= "</div>";
echo $OUTPUT->form($form, $contents);
-
+
echo print_collapsible_region_end(true);
* @return array an array with two elements: First, some additional progress output,
* for example a list (<ul>) of the things check each with an one work ok/not ok summary.
* Second, an array giving the details of any problems found. These arrays
- * for all tables will be aggregated, and then passed to
+ * for all tables will be aggregated, and then passed to
*/
abstract protected function check_table(xmldb_table $xmldb_table, array $metacolumns);
*/
abstract protected function display_results(array $problems_found);
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $r;
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $r;
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $r;
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $r;
}
}
-?>
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
return $result;
}
}
-?>
+
return $result;
}
}
-?>
+
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return true;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
return $result;
}
}
-?>
+
-<?php // $Id$
+<?php
///////////////////////////////////////////////////////////////////////////
// //
///print_object($XMLDB);
}
}
-
-?>