~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to admin/roles/allowoverride.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * and be in the roles_allow_override table.
7
7
 */
8
8
    require_once('../../config.php');
9
 
/// check capabilities here
10
 
 
11
9
    require_once($CFG->libdir.'/adminlib.php');
12
 
    $adminroot = admin_get_root();
13
 
    admin_externalpage_setup('defineroles', $adminroot);
14
 
 
15
 
 
16
 
    $sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
 
10
 
 
11
    admin_externalpage_setup('defineroles', '', array(), $CFG->wwwroot . '/' . $CFG->admin . '/roles/allowoverride.php');
 
12
 
 
13
    $sitecontext = get_context_instance(CONTEXT_SYSTEM);
17
14
    require_capability('moodle/role:manage', $sitecontext);
18
15
 
19
16
/// form processiong here
45
42
                }
46
43
            }
47
44
        }
 
45
        // updated allowoverride sitewide...
 
46
        mark_context_dirty($sitecontext->path);
48
47
    }
49
48
/// displaying form here
50
49
 
51
 
    admin_externalpage_print_header($adminroot);
 
50
    admin_externalpage_print_header();
52
51
 
53
52
    $currenttab='allowoverride';
54
53
    require_once('managetabs.php');
74
73
        $table->data[] = array_merge(array(format_string($role->name)), $beta);
75
74
    }
76
75
 
77
 
    print_simple_box(get_string('configallowoverride', 'admin'), 'center');
 
76
    print_simple_box(get_string('configallowoverride2', 'admin'), 'center');
78
77
 
79
78
    echo '<form action="allowoverride.php" method="post">';
80
79
    print_table($table);
82
81
    echo '<input type="hidden" name="dummy" value="1" />'; // this is needed otherwise we do not know a form has been submitted
83
82
    echo '</div></form>';
84
83
 
85
 
    admin_externalpage_print_footer($adminroot);
 
84
    admin_externalpage_print_footer();
86
85
 
87
86
// returns array
88
87
function get_box_list($roleid, $arraylist){