Esempio n. 1
0
        print_error('cannotaccessgroup', 'grades');
    }
}
echo "<html><body><p><a href=\"../../report/user/index.php?id={$id}\">The Course User Report</a></p><ul>\n";
$fileloc1 = "SampleRoster.xml";
$fileloc2 = "http://bobcat:8080/wu/samples/SampleRoster.xml";
$username = "";
$password = "";
//sample (test) values
$secid = "en442-01";
$secid2 = "en442-02";
$student1 = 21;
$readFile = new sl_roster($DB, $fileloc2, 502, $username, $password);
$assignmentIdMap1 = $readFile->getAssignmentMap($secid);
$assignmentIdMap2 = $readFile->getAssignmentMap($secid2);
print_tablez("Sections from Schoolloop", $readFile->getSectionNames());
print_tablez("Assignments for {$secid}", $assignmentIdMap1);
print_tablez("Assignments for {$secid2}", $assignmentIdMap2);
$studentList = $readFile->getStudentsOfPeriod($secid);
print_tabley("Section {$secid} - Students from Schoolloop", $studentList, array('firstName', 'lastName', 'moodleId', 'studentId', 'systemID'));
$studentList2 = $readFile->getStudentsOfPeriod($secid2);
print_tabley("Section {$secid2} - Students from Schoolloop", $studentList2, array('firstName', 'lastName', 'moodleId', 'studentId', 'systemID'));
$cMods = $readFile->lookUpCourseModules($id, $assignmentIdMap1);
print_tabley("Modules for course {$id} (system id from {$secid})", $cMods, array('id', 'module', 'name', 'systemID'));
$gMods = $readFile->lookUpCourseGradeItems($id, $assignmentIdMap1);
print_tabley("Grade Items course {$id} (system id from {$secid})", $gMods, array('id', 'module', 'name', 'systemID'));
$grade = $DB->get_records('grade_items', array('courseid' => $id));
print_tablex("Grades Items for Course {$id}", $grade, array('courseid', 'itemname', 'iteminstance', 'itemmodule'));
echo '<hr/>';
echo '<pre>';
//print_r($grade4student);
Esempio n. 2
0
    print_error('nocourseid');
}
require_login($course);
$context = get_context_instance(CONTEXT_COURSE, $id);
require_capability('moodle/grade:export', $context);
require_capability('gradeexport/sl:view', $context);
if (groups_get_course_groupmode($COURSE) == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', $context)) {
    if (!groups_is_member($groupid, $USER->id)) {
        print_error('cannotaccessgroup', 'grades');
    }
}
$courseName = $course->fullname;
$courseName_xx = htmlspecialchars($courseName);
$readFile = new sl_roster($DB, $url, $teacherid, $username, $password);
$studentList = $readFile->getAllStudentsOnRoster();
$sectionList = $readFile->getSectionNames();
echo <<<PAGE_HEAD
<html><body>

<p></p><ul>
<h3>School Loop Synchronization - Students</h3>

<p>Below are the students that are listed by Schoolloop</p>

<table>
    <col width="150">
    <col width="300">
    <col width="300">
   <tr valign="top"><td>Moodle Course:</td>
       <td colspan="2">{$courseName_xx}</td></tr>
   <tr valign="top"><td>Action:</td>
Esempio n. 3
0
<table>
<table>
    <col width="150">
    <col width="600">
<form action="{$nextPage}" method="get">
   <tr valign="top"><td>Moodle Course:</td>
       <td colspan="2">{$courseName_xx}</td></tr>
   <tr valign="top"><td>Teacher Id:</td>
       <td colspan="2">{$teacherid_xx}</td></tr>
   <tr valign="top"><td>Action:</td>
       <td colspan="2">{$action}</td></tr>
   <tr valign="top"><td>Schoolloop Section</td>
       <td>
PAGE_HEAD;
$sections = $readFile->getSectionNames();
foreach ($sections as $key => $val) {
    echo "<input type=\"radio\" name=\"section\" value=\"{$key}\"> {$val}  -  {$key} <br/>\n";
}
echo <<<PAGE_FOOT
       </td></tr>
   <tr valign="top"><td></td>
       <td><input type="submit" name="action" value="Go to {$action}"></td>
       <td></td></tr>
</form>
<form action="index.php" method="get">
<input type="hidden" name="id" value="{$id}">
   <tr valign="top"><td></td>
       <td><input type="submit" name="noaction" value="Start Over"></td>
       <td></td></tr>
</form>