-
Notifications
You must be signed in to change notification settings - Fork 0
/
rubricMaker.php
127 lines (100 loc) · 3.39 KB
/
rubricMaker.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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php
include('config.php');
include_once('checkLogin.php');
include_once(CLASSES_DIR . 'PermissionsManager.php');
include_once(CLASSES_DIR . 'ContextSelector.php');
?>
<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>RubricMaker</title>
<link rel="stylesheet" type="text/css" href="./css/rubrickmaker.css"></link>
<?php
if( ! $loggedIn ):
?>
</head>
<body>
<p>You must be logged in to build a rubric. . . </p>
</body>
</html>
<?php exit; endif;
?>
<script type="text/javascript">
<?php
/*
$contextsInitObj = new StdClass();
// $contextsInitObj->defaultValue = 'http://code.rubrick-jetpack.org/vocab/Context1';
$contextsInitObj->allowedValues = array();
$contextsInitObj->valueToLabelMap = new StdClass();
$pm = new PermissionsManager();
$pm->doQueries();
$pm->perms;
$cSelector = new ContextSelector(array('by'=>'byURI'));
foreach($pm->perms as $contextURI=>$perms) {
if(in_array('addRubric', $perms)) {
$cSelector->uri = $contextURI;
$cSelector->setQuery();
$cSelector->doQuery();
$cSelector->processResultSet();
$contextsInitObj->allowedValues[] = $contextURI;
$contextsInitObj->valueToLabelMap->$contextURI = $cSelector->preJSONObj->name;
}
}
echo "contextsInit=" . json_encode($contextsInitObj). " ; ";
echo "initArray = []; ";
//build the available contexts data here.
*/
?>
/*
$(document).ready(function(){
init();
});
*/
</script>
</head>
<body >
<h2>Build your rubric below</h2>
<div id="rubric-meta">
<div id="rubric-name-container">
<h3>Rubric Name</h3>
</div>
<div id="rubric-description-container">
<h3>Description</h3>
</div>
<div id="rubric-tags-container">
<h3>Tags</h3>
</div>
<div id="rubric-public-container">
<h3>Public</h3>
</div>
<div id="rubric-contexts-container">
<h3>Connect to DropBoxes</h3>
<a id="showContextCreate">Create New Dropbox</a>
</div>
<div id="createContextContainer" style="display: none;">
<p>Dropbox Name: <input id="newContextName" type="text" ></input></p>
<p>Dropbox Description: </p>
<textarea id="newContextDesc" type="text" ></textarea>
<button id="createContextDone">Done</button>
</div>
</div>
<div style="clear:both"></div>
<h2>Add lines to your rubric</h2>
<p>(Lower scores to the left; higher scores to the right)</p>
<table id="rubrickTable">
<thead>
<tr>
<th>About this line</th>
<th colspan="5">Rubric Values</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="rubrickBody" valign="top"> </tbody>
</table>
<button id="addRubrickLine">Add Line</button>
<button id="submitButton">Submit</button>
<input type="hidden" id="input-hiddenJSON"/>
<div id="debug">
</div>
</body>
</html>