-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
85 lines (70 loc) · 2.61 KB
/
index.html
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Moodle Quicklinks</title>
<meta name="description" content="Moodle Configuration" />
<meta name="author" content="Open Source Learning" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<link rel="stylesheet" target="_blank" href="https://unpkg.com/sakura.css/css/sakura.css" type="text/css" />
<h1>Moodle Quicklinks</h1>
<p>Enter your links:</p>
<input id="testSite" type="text" placeholder="Test Site" />
<input id="testSiteName" type="text" placeholder="Enter name for link" />
<div>
<input id="liveSite" type="text" placeholder="Live Site" />
<input id="liveSiteName" type="text" placeholder="Enter name for link" />
</div>
<button id="submit">Apply links</button>
<hr />
<p>Select where you will be configring:</p>
<select id="siteSelector">
<option value="https://odi-test.opensourcelearning.co.uk">Test Site</option>
<option value="https://moodle.learndata.info">Live Site</option>
</select>
<hr />
<h4>Course Configuration</h4>
<p>Enter the course code and click "Update URLs" to modify the links:</p>
<input id="userInput" type="text" placeholder="Enter code here" />
<button id="URL">Update URLs</button>
<ul class="link-list" id="courseConfig">
<li>
<a target="_blank" href="/backup/backup.php?id=[coursecode]">Backup</a>
</li>
<li>
<a target="_blank" href="/report/progress/index.php?course=[coursecode]">Test for completion</a>
</li>
<li>
<a target="_blank" href="/course/completion.php?id=[coursecode]">Set completion criteria</a>
</li>
</ul>
<button class="addLinkButton" data-section="courseConfig">+ Add Useful Link</button>
<div id="courseConfigInputs" class="newLinkInputs" style="display: none;">
</div>
<hr />
<h4>Global Configuration</h4>
<ul class="link-list" id="globalConfig">
<li>
<a target="_blank" href="/course/management.php">View all courses</a>
</li>
<li>
<a target="_blank" href="/admin/roles/define.php?action=add">Create a custom role</a>
</li>
<li>
<a target="_blank" href="/user/editadvanced.php?id=-1">Create a new user</a>
</li>
</ul>
<button class="addLinkButton" data-section="globalConfig">+ Add Useful Link</button>
<div id="globalConfigInputs" class="newLinkInputs" style="display: none;">
</div>
<div>
<hr>
<div id="newLinkInputs" style="display: none;">
</div>
</div>
<button id="clearStorage">Clear Local Storage</button>
<script src="index.js"></script>
</body>