forked from hit-moodle/moodle-assignment-type_github
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
39 lines (33 loc) · 1.68 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
define('ASSIGNMENT_GITHUB_ROOT', dirname(__FILE__).'/');
define('ASSIGNMENT_GITHUB_MODULES', dirname(__FILE__).'/modules/');
define('ASSIGNMENT_GITHUB_LIB', dirname(__FILE__).'/lib/Github/');
require_once(ASSIGNMENT_GITHUB_LIB.'Autoloader.php');
require_once(ASSIGNMENT_GITHUB_MODULES.'git.php');
require_once(ASSIGNMENT_GITHUB_MODULES.'git_command.php');
require_once(ASSIGNMENT_GITHUB_MODULES.'git_analyzer.php');
require_once(ASSIGNMENT_GITHUB_MODULES.'git_logger.php');
Github_Autoloader::register();
// plugin config
global $ASSIGNMENT_GITHUB;
$ASSIGNMENT_GITHUB = new stdClass();
$ASSIGNMENT_GITHUB->command = 'git'; // path of git on the server
$ASSIGNMENT_GITHUB->workspace = $CFG->dataroot . '/github'; // default path where the plugin place the repositories
$ASSIGNMENT_GITHUB->branch = 'master'; // the branch which the plugin analyze by default
$ASSIGNMENT_GITHUB->server = array(
'github' => array('name' => 'GitHub',
'domain' => 'github.com',
'service' => 'service_github_api',
'account' => '',
'client_id' => '',
'secret' => ''),
//'bitbucket' => array('name' => 'BitBucket', 'domain' => 'bitbucket.org', 'service' => 'service_bitbucket_api'),
//'googlecode' => array('name' => 'Google Code', 'domain' => 'code.google.com', 'service' => 'service_googlecode_api'),
//'sourceforge' => array('name' => 'SourceForge', 'domain' => 'sourceforge.net', 'service' => 'service_sourceforge_api'),
);
$ASSIGNMENT_GITHUB->code = array(
1 => 'github',
//2 => 'bitbucket',
//3 => 'googlecode',
//4 => 'sourceforge',
);