FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
py4e/tools/python-data/grade-detail.php at master · GHubPythonProjects/py4e · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
GHubPythonProjects
/
py4e
Public
forked from
csev/py4e
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
py4e
/
tools
/
python-data
/
grade-detail.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
49 lines (40 loc) · 1.01 KB
Breadcrumbs
py4e
/
tools
/
python-data
/
grade-detail.php
Copy path
File metadata and controls
49 lines (40 loc) · 1.01 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<?php
require_once
"
../config.php
"
;
\
Tsugi
\
Core
\
LTIX
::
getConnection
();
use
\
Tsugi
\
Grades
\
GradeUtil
;
use
\
Tsugi
\
Util
\
U
;
session_start
();
// Get the user's grade data also checks session
$
row
= GradeUtil::
gradeLoad
(
$
_REQUEST
[
'
user_id
'
]);
$
menu
=
new
\
Tsugi
\
UI
\
MenuSet
();
$
menu
->
addLeft
(
__
(
'
Back to all grades
'
),
'
index.php
'
);
// View
$
OUTPUT
->
header
();
$
OUTPUT
->
bodyStart
();
$
OUTPUT
->
topNav
(
$
menu
);
$
OUTPUT
->
flashMessages
();
// Show the basic info for this user
GradeUtil::
gradeShowInfo
(
$
row
,
false
);
// Unique detail
if
( U::
isEmpty
(
$
row
[
'
json
'
])) {
echo
(
"
<p>No submission</p>
\n"
);
$
OUTPUT
->
footer
();
return
;
}
echo
(
"
<p>Submission:</p>
\n"
);
$
json
=
json_decode
(
$
row
[
'
json
'
]);
if
(
is_object
(
$
json
) ) {
echo
(
"
<pre>
\n"
);
if
(
isset
(
$
json
->
code
)) {
echo
(
htmlentities
(
$
json
->
code
));
echo
(
"\n"
);
unset(
$
json
->
code
);
}
if
(
count
(
get_object_vars
(
$
json
)) >
0
) {
echo
(
"\n
Json:
\n"
);
var_dump
(
$
json
);
echo
(
"\n"
);
}
echo
(
"
</pre>
\n"
);
}
$
OUTPUT
->
footer
();
Back
|
FazBrowse Home
|
New Git URL