$tool_content .= "</div></td>\n"; $tool_content .= "<td><div align='center'>$size</div></td><td><div align='center'>$date</div></td></tr>"; } $tool_content .= "\n <tr class='nobrd' style='height:10px;'>"; $tool_content .= "\n <td colspan='2'></td>"; $tool_content .= "\n <td colspan='3' class='right'></td>"; $tool_content .= "\n </tr>"; $tool_content .= "\n <tr class='nobrd'>"; $tool_content .= "\n <td colspan='2'></td>"; $tool_content .= "\n <td colspan='3' class='right'>".form_buttons(array( array( 'text' => $langSave, 'value'=> $langImport ), array( 'href' => "index.php?course=$course_code", ) ))."</td>"; $tool_content .= "\n </tr>"; } $tool_content .= "\n </tbody>"; $tool_content .= "\n </table>"; $tool_content .= "\n</form>"; $tool_content .= "\n</div>"; $tool_content .= "\n</div>"; $tool_content .= " <div class='row'>
</label> </div> </div> </div> <div class='row'> <div class='infotext col-sm-offset-2 col-sm-10 margin-bottom-fat'>$langNotRequired $langMaxFileSize " . ini_get('upload_max_filesize') . "</div> </div>"; $tool_content .= " <div class='form-group'> <div class='col-xs-offset-2 col-xs-10'>". form_buttons(array( array( 'text' => $langUpload ), array( 'href' => "index.php?course=$course_code", ) )) ." </div> </div> </form> </div></div></div>"; } else { $tool_content .= "<div class='alert alert-warning'>$langNotAllowed</div>"; } draw($tool_content, $menuTypeID, null, $head_content);
<div class='col-xs-10 col-xs-offset-2'> <div class='checkbox'> <label> <input type='checkbox' name='mailing' value='1' checked /> $langMailToUsers </label> </div> </div> </div> <div class='form-group'> <div class='col-sm-offset-2 col-sm-10'>". form_buttons(array( array( 'text' => $langSend, 'name' => 'submit', 'value' => $langSend ), array( 'href' => "$_SERVER[SCRIPT_NAME]".(($course_id != 0)? "?course=$course_code" : "") ) )) ." </div> </div> </fieldset> </form></div>"; if ($course_id != 0 || ($type == 'cm' && $course_id == 0)){ load_js('select2'); $head_content .= "<script type='text/javascript'> $(document).ready(function () { $('#select-recipients').select2();
if (!$scale_used) { $tool_content .= " <div class='col-xs-offset-2 col-sm-10'> <a class='btn btn-xs btn-success margin-top-thin' id='addScale'>$langAdd</a> </div>"; } $tool_content .= " </div>"; if (!$scale_used) { $tool_content .= " <div class='form-group'> <div class='col-sm-offset-2 col-sm-10'>". form_buttons(array( array( 'text' => $langSave, 'name' => 'submitScale' ), array( 'href' => "$_SERVER[SCRIPT_NAME]?course=$course_code", ) )) ."</div> </div>"; } $tool_content .= " </fieldset> </form> </div> </div> </div>"; } else {
<label for='fileUpload' class='col-sm-2 control-label'>$langZipFile:</label> <div class='col-sm-10'> <input type='file' name='file' id='fileUpload'> $langOptional </div> </div> <div class='row'> <div class='infotext-sm col-sm-offset-2 col-sm-10 margin-bottom-fat'>$langMaxFileSize " . ini_get('upload_max_filesize') . "</div> </div> <div class='form-group'> <div class='col-sm-10 col-sm-offset-2 '>". form_buttons(array( array( 'text' => $langUpload, 'name' => 'submit', 'value' => (isset($_GET['newPoll']) ? $langCreate : $langModify) ), array( 'href' => "index.php?course=$course_code", ) )) ." </div> </div> </form> </div>"; } elseif (isset($_GET['down'])) { move_order('ebook', 'id', intval($_GET['down']), 'order', 'down', "course_id = $course_id"); } elseif (isset($_GET['up'])) { move_order('ebook', 'id', intval($_GET['up']), 'order', 'up', "course_id = $course_id"); } elseif (isset($_GET['vis'])) { Database::get()->query("UPDATE ebook SET visible = NOT visible
<div class='form-group'><label for='Email' class='col-sm-offset-2 col-sm-12 control-panel'>$langAnnouncementActivePeriod:</label></div> <div class='form-group'> <label for='From' class='col-sm-2 control-label'>$langFrom:</label> <div class='col-sm-10'><input class='form-control' type='text' name='startdate' id='startdate' value='$showFrom'></div> </div> <div class='form-group'> <label for='From' class='col-sm-2 control-label'>$langUntil:</label> <div class='col-sm-10'><input class='form-control' type='text' name='enddate' id='enddate' value='$showUntil'></div> </div> <div class='form-group'> <div class='col-sm-offset-2 col-sm-10'>".form_buttons(array( array( 'text' => $langSubmit, 'name' => 'submitAnnouncement', 'value'=> $langAdd ), array( 'href' => "$_SERVER[SCRIPT_NAME]?course=$course_code", ) ))."</div> <input type='hidden' name='id' value='$AnnouncementToModify'> </div> </fieldset> </form> </div>"; } } // end: teacher only if ($uid and $status != USER_GUEST and !get_user_email_notification($uid, $course_id)) { $tool_content .= "<div class='alert alert-warning'>$langNoUserEmailNotification (<a href='{$urlServer}main/profile/emailunsubscribe.php?cid=$course_id'>$langModify</a>)</div>";
</div> </div> <div class='form-group'> <label for='file_title' class='col-sm-2 control-label'>$langContent:</label> <div class='col-sm-10'>" . rich_text_editor('file_content', 20, 40, $fileContent) . "</div> </div> <div class='form-group'> <div class='col-xs-offset-2 col-xs-10'>". form_buttons(array( array( 'text' => $langSave, 'value'=> $langSubmit ), array( 'href' => $backUrl, ) )) ."</div> </div> </form></div>"; } else { $tool_content .= "<div class='alert alert-danger'>$langNotAllowed</div>"; } draw($tool_content, $menuTypeID, null, $head_content); function getHtmlBody($path) {
<span class='help-block'>".Session::getError('name')."</span> </div> </div> <div class='form-group'> <label for='description' class='col-sm-2 control-label'>$langDescription: </label> <div class='col-sm-10'> " . rich_text_editor('description', 4, 60, $description) . " </div> </div> <div class='form-group'> <div class='col-sm-10 col-sm-offset-2'>". form_buttons(array( array( 'text' => $langSave, 'value'=> $submit_value, 'name' => 'submit_category' ), array( 'href' => $cat_url ) ))."</div> </div> ". generate_csrf_token_form_field() ." </form> </div>"; } } if (!isset($_GET['edit']) && !isset($_GET['add'])) { $q = Database::get()->queryArray("SELECT id, name, description FROM glossary_category WHERE course_id = ?d ORDER BY name", $course_id);
<label> <input type='checkbox' name='mailing' value='1' checked> " . q($langMailToUsers) . " </label> </div> </div> </div> <div class='form-group'> <div class='col-sm-10 col-sm-offset-2'>". form_buttons(array( array( 'text' => $langSend, 'name' => 'submit', 'value' => $langAddModify ), array( 'href' => "javascript:void(0)", 'id' => "cancelReply" ) )) ." </div> </div> </fieldset>"; $out .= " <div class='pull-right'>$langMaxFileSize " . ini_get('upload_max_filesize') . "</div> </form></div>"; $out .= "<script type='text/javascript' src='{$urlAppend}js/select2-3.5.1/select2.min.js'></script>\n
<div class='form-group'> <label class='col-sm-3 control-label'>$langNodeOrderPriority</label> <div class='col-sm-9'> <input class='form-control' type='text' name='order_priority' value='" . q($mynode->order_priority) . "'><span class='help-block'><small>$langNodeOrderPriority2</small></span> </div> </div> <input type='hidden' name='id' value='$id' /> <input type='hidden' name='oldparentid' value='" . $formOPid . "'/> <input type='hidden' name='lft' value='" . q($mynode->lft) . "'/> <input type='hidden' name='rgt' value='" . q($mynode->rgt) . "'/> <div class='form-group'> <div class='col-sm-9 col-sm-offset-3'>".form_buttons(array( array( 'text' => $langSave, 'name' => 'edit', 'value'=> $langAcceptChanges ), array( 'href' => "$_SERVER[SCRIPT_NAME]" ) ))." </div> </div> </fieldset> </form> </div>"; } } draw($tool_content, 3, null, $head_content);
foreach ($resultcategories as $myrow) { $tool_content .= "<option value='$myrow->id'"; if (isset($category) and $category == $myrow->id) { $tool_content .= " selected='selected'"; } $tool_content .= '>' . q($myrow->name) . "</option>"; } $tool_content .= "</select></div> </div> <div class='form-group'> <div class='col-sm-offset-2 col-sm-10'>". form_buttons(array( array( 'text' => $langSave, 'name' => 'edit_submit', 'value' => $langEditChange ), array( 'href' => "$_SERVER[SCRIPT_NAME]?course=$course_code" ) )) ." <input type='hidden' name='id' value='$id'> <input type='hidden' name='table' value='$table_edit'> </div> </div> </fieldset> </form> </div></div></div>"; } } // end of admin check
</div> <div class='form-group$questionScaleErrorClass$questionScaleShowHide'> <label for='questionScale' class='col-sm-2 control-label'>$langMax $langScale (1-..):</label> <div class='col-sm-10 col-md-3'> <input type='text' class='form-control' name='questionScale' id='questionScale' value='".q($questionScale)."'> <span class='help-block'>$questionScaleError</span> </div> </div>"; } $tool_content .= " <div class='col-md-10 col-md-offset-2'>". form_buttons(array( array( 'text' => $langSave, 'name' => 'submitQuestion', 'value' => (isset($_GET['newQuestion']) ? $langCreate : $langModify) ), array( 'href' => "admin.php?course=$course_code&pid=$pid".(isset($_GET['modifyQuestion']) ? "&editQuestion=".$_GET['modifyQuestion'] : "") ) )) ."</div> </fieldset> </form></div>"; //Modify Answers } elseif (isset($_GET['modifyAnswers'])) { $head_content .= " <script> $(function() { $(poll_init); });
</div>"; } else { $dialogBox .= "<input type='hidden' size='80' name='file_title' value='$oldTitle'> <input type='hidden' size='80' name='file_category' value='$oldCategory'> <input type='hidden' size='80' name='file_subject' value='$oldSubject'> <input type='hidden' size='80' name='file_description' value='$oldDescription'> <input type='hidden' size='80' name='file_author' value='$oldAuthor'> <input type='hidden' size='80' name='file_copyrighted' value='$oldCopyrighted'> <input type='hidden' size='80' name='file_language' value='$oldLanguage'>"; } $dialogBox .= "<div class='form-group'> <div class='col-sm-offset-2 col-sm-10'>".form_buttons(array( array( 'text' => $langSave, 'value'=> $langOkComment ), array( 'href' => $backUrl, ) ))."</div> </div>"; if ($is_file) { // if we are editing files file info $dialogBox .= "<div class='form-group'> <div class='col-sm-offset-2 col-sm-10'> <span class='help-block'>$langNotRequired</span> </div> </div>"; } $dialogBox .= "<input type='hidden' size='80' name='file_creator' value='$oldCreator'> <input type='hidden' size='80' name='file_date' value='$oldDate'> </fieldset>
$tool_content .= "<div class='form-group'>"; $tool_content .= "<label class='col-sm-3 control-label'>$langActivate:</label> <div class='col-sm-9 radio'><label><input type='radio' id='enabled_false' name='enabled' checked='false' value='false'>$langNo</label></div> <div class='col-sm-offset-3 col-sm-9 radio'><label><input type='radio' id='enabled_true' name='enabled' checked='true' value='true'>$langYes</label></div> </div>"; $tool_content .= "<div class='form-group'>"; $tool_content .= "<label class='col-sm-3 control-label'>$langBBBServerOrder:</label> <div class='col-sm-9'><input class='form-control' type='text' name='weight'></div>"; $tool_content .= "</div>"; $tool_content .= "<div class='form-group'><div class='col-sm-offset-3 col-sm-9'>"; $tool_content .= form_buttons(array( array( 'text' => $langSave, 'name' => 'submit' ), array( 'href' => 'bbbmoduleconf.php' ) )); $tool_content .= "</div></div></fieldset></form></div>"; $tool_content .='<script language="javaScript" type="text/javascript"> //<![CDATA[ var chkValidator = new Validator("serverForm"); chkValidator.addValidation("hostname_form","req","' . $langBBBServerAlertHostname . '"); chkValidator.addValidation("ip_form","req","' . $langBBBServerAlertIP . '"); chkValidator.addValidation("ip_form","regexp=^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$","' . $langBBBServerAlertIP . '"); chkValidator.addValidation("key_form","req","' . $langBBBServerAlertKey . '"); chkValidator.addValidation("api_url_form","req","' . $langBBBServerAlertAPIUrl . '"); chkValidator.addValidation("max_rooms_form","req","' . $langBBBServerAlertMaxRooms . '");
function show_submission_form($id, $user_group_info, $on_behalf_of=false, $submissions_exist=false) { global $tool_content, $m, $langWorkFile, $langSendFile, $langSave, $langSubmit, $uid, $langNotice3, $gid, $urlAppend, $langGroupSpaceLink, $langOnBehalfOf, $course_code, $course_id, $langBack, $is_editor, $langCancel, $langWorkOnlineText, $langGradeScalesSelect; $assignment = Database::get()->querySingle("SELECT * FROM assignment WHERE id = ?d", $id); $group_select_hidden_input = $group_select_form = ''; $is_group_assignment = is_group_assignment($id); if ($is_group_assignment) { if (!$on_behalf_of) { if (count($user_group_info) == 1) { $gids = array_keys($user_group_info); $group_link = $urlAppend . '/modules/group/document.php?gid=' . $gids[0]; $group_select_hidden_input = "<input type='hidden' name='group_id' value='$gids[0]' />"; } elseif ($user_group_info) { $group_select_form = " <div class='form-group'> <label for='group_id' class='col-sm-2 control-label'>$langGroupSpaceLink:</label> <div class='col-sm-10'> " . selection($user_group_info, 'group_id') . " </div> </div>"; } else { $group_link = $urlAppend . 'modules/group/'; $tool_content .= "<div class='alert alert-warning'>$m[this_is_group_assignment] <br />" . sprintf(count($user_group_info) ? $m['group_assignment_publish'] : $m['group_assignment_no_groups'], $group_link) . "</div>\n"; } } else { $groups_with_no_submissions = groups_with_no_submissions($id); if (count($groups_with_no_submissions)>0) { $group_select_form = " <div class='form-group'> <label for='group_id' class='col-sm-2 control-label'>$langGroupSpaceLink:</label> <div class='col-sm-10'> " . selection($groups_with_no_submissions, 'group_id') . " </div> </div>"; }else{ Session::Messages($m['NoneWorkGroupNoSubmission'], 'alert-danger'); redirect_to_home_page('modules/work/index.php?course='.$course_code.'&id='.$id); } } } elseif ($on_behalf_of) { $users_with_no_submissions = users_with_no_submissions($id); if (count($users_with_no_submissions)>0) { $group_select_form = " <div class='form-group'> <label for='user_id' class='col-sm-2 control-label'>$langOnBehalfOf:</label> <div class='col-sm-10'> " .selection($users_with_no_submissions, 'user_id', '', "class='form-control'") . " </div> </div>"; } else { Session::Messages($m['NoneWorkUserNoSubmission'], 'alert-danger'); redirect_to_home_page('modules/work/index.php?course='.$course_code.'&id='.$id); } } $notice = ($submissions_exist)? "<div class='alert alert-info'>" . icon('fa-info-circle') . " $langNotice3</div>": ''; if ($assignment->grading_scale_id) { $serialized_scale_data = Database::get()->querySingle('SELECT scales FROM grading_scale WHERE id = ?d AND course_id = ?d', $assignment->grading_scale_id, $course_id)->scales; $scales = unserialize($serialized_scale_data); $scale_options = "<option value> - </option>"; foreach ($scales as $scale) { $scale_options .= "<option value='$scale[scale_item_value]'>$scale[scale_item_name]</option>"; } $grade_field = " <select name='grade' class='form-control' id='scales'> $scale_options </select>"; } else { $grade_field = "<input class='form-control' type='text' name='grade' maxlength='4' size='3'> ($m[max_grade]: $assignment->max_grade)"; } $extra = $on_behalf_of ? " <div class='form-group'> <label class='col-sm-2 control-label'>$m[grade]:</label> <div class='col-sm-10'> $grade_field <input type='hidden' name='on_behalf_of' value='1'> </div> </div> <div class='form-group'> <div class='col-sm-10 col-sm-offset-2'> <div class='checkbox'> <label> <input type='checkbox' name='email' id='email_button' value='1'> $m[email_users] </label> </div> </div> </div>" : ''; if (!$is_group_assignment || count($user_group_info) || $on_behalf_of) { if($assignment->submission_type){ $submission_form = " <div class='form-group'> <label for='submission_text' class='col-sm-2 control-label'>$langWorkOnlineText:</label> <div class='col-sm-10'> ". rich_text_editor('submission_text', 10, 20, '') ." </div> </div>"; } else { $submission_form = " <div class='form-group'> <label for='userfile' class='col-sm-2 control-label'>$langWorkFile:</label> <div class='col-sm-10'> <input type='file' name='userfile' id='userfile'> </div> </div>"; } $back_link = $is_editor ? "index.php?course=$course_code&id=$id" : "index.php?course=$course_code"; $tool_content .= action_bar(array( array( 'title' => $langBack, 'icon' => 'fa-reply', 'level' => 'primary-label', 'url' => "index.php?course=$course_code&id=$id", 'show' => $is_editor ) ))." $notice <div class='form-wrapper'> <form class='form-horizontal' role='form' enctype='multipart/form-data' action='$_SERVER[SCRIPT_NAME]?course=$course_code' method='post'> <input type='hidden' name='id' value='$id' />$group_select_hidden_input <fieldset> $group_select_form $submission_form <div class='form-group'> <label for='stud_comments' class='col-sm-2 control-label'>$m[comments]:</label> <div class='col-sm-10'> <textarea class='form-control' name='stud_comments' id='stud_comments' rows='5'></textarea> </div> </div> $extra <div class='form-group'> <div class='col-sm-10 col-sm-offset-2'>". form_buttons(array( array( 'text' => $langSave, 'name' => 'work_submit', 'value' => $langSubmit ), array( 'href' => $back_link ) )) ."</div> </div> </fieldset> </form> </div> <div class='pull-right'><small>$GLOBALS[langMaxFileSize] " . ini_get('upload_max_filesize') . "</small></div><br>"; } }
/** * @brief modify user attendance settings * @global string $tool_content * @global type $course_code * @global type $langGroups * @global type $langAttendanceUpdate * @global type $langAttendanceInfoForUsers * @global type $langRegistrationDate * @global type $langFrom2 * @global type $langTill * @global type $langRefreshList * @global type $langUserDuration * @global type $langAll * @global type $langSpecificUsers * @global type $langStudents * @global type $langMove * @global type $langParticipate * @param type $attendance_id */ function user_attendance_settings($attendance_id) { global $tool_content, $course_code, $langGroups, $langAttendanceUpdate, $langAttendanceInfoForUsers, $langRegistrationDate, $langFrom2, $langTill, $langRefreshList, $langUserDuration, $langAll, $langSpecificUsers, $langStudents, $langMove, $langParticipate; // default values $UsersStart = date('d-m-Y', strtotime('now -6 month')); $UsersEnd = date('d-m-Y', strtotime('now')); $tool_content .= " <div class='row'> <div class='col-sm-12'> <div class='form-wrapper'> <form class='form-horizontal' role='form' method='post' action='$_SERVER[SCRIPT_NAME]?course=$course_code&attendance_id=$attendance_id&editUsers=1'> <div class='form-group'> <label class='col-xs-12'><span class='help-block'>$langAttendanceInfoForUsers</span></label> </div> <div class='form-group'> <label class='col-sm-2 control-label'>$langUserDuration:</label> <div class='col-sm-10'> <div class='radio'> <label> <input type='radio' id='button_all_users' name='specific_attendance_users' value='0' checked> <span id='button_all_users_text'>$langAll</span> </label> </div> <div class='radio'> <label> <input type='radio' id='button_some_users' name='specific_attendance_users' value='1'> <span id='button_some_users_text'>$langSpecificUsers</span> </label> </div> <div class='radio'> <label> <input type='radio' id='button_groups' name='specific_attendance_users' value='2'> <span id='button_groups_text'>$langGroups</span> </label> </div> </div> </div> <div class='form-group' id='all_users'> <div class='input-append date form-group' id='startdatepicker' data-date='$UsersStart' data-date-format='dd-mm-yyyy'> <label for='UsersStart' class='col-sm-2 control-label'>$langRegistrationDate $langFrom2:</label> <div class='col-xs-10 col-sm-9'> <input class='form-control' name='UsersStart' id='UsersStart' type='text' value='$UsersStart'> </div> <div class='col-xs-2 col-sm-1'> <span class='add-on'><i class='fa fa-calendar'></i></span> </div> </div> <div class='input-append date form-group' id='enddatepicker' data-date='$UsersEnd' data-date-format='dd-mm-yyyy'> <label for='UsersEnd' class='col-sm-2 control-label'>$langTill:</label> <div class='col-xs-10 col-sm-9'> <input class='form-control' name='UsersEnd' id='UsersEnd' type='text' value='$UsersEnd'> </div> <div class='col-xs-2 col-sm-1'> <span class='add-on'><i class='fa fa-calendar'></i></span> </div> </div> </div> <div class='form-group'> <div class='col-sm-10 col-sm-offset-2'> <div class='table-responsive'> <table id='participants_tbl' class='table-default hide'> <tr class='title1'> <td id='users'>$langStudents</td> <td class='text-center'>$langMove</td> <td>$langParticipate</td> </tr> <tr> <td> <select class='form-control' id='users_box' size='10' multiple></select> </td> <td class='text-center'> <input type='button' onClick=\"move('users_box','participants_box')\" value=' >> ' /><br /> <input type='button' onClick=\"move('participants_box','users_box')\" value=' << ' /> </td> <td width='40%'> <select class='form-control' id='participants_box' name='specific[]' size='10' multiple></select> </td> </tr> </table> </div> </div> </div> <div class='form-group'> <div class='col-xs-10 col-xs-offset-2'>".form_buttons(array( array( 'text' => $langRefreshList, 'name' => 'resetAttendanceUsers', 'value'=> $langAttendanceUpdate, 'javascript' => "selectAll('participants_box',true)" ), array( 'href' => "$_SERVER[SCRIPT_NAME]?course=$course_code&attendance_id=$attendance_id&attendanceBook=1" ) ))."</div> </div> </form> </div> </div> </div>"; }
</td> </tr> </table> </div> </div> </div> " . Tag::tagInput($exerciseId) . " <div class='form-group'> <div class='col-sm-offset-2 col-sm-10'> " . form_buttons(array( array( 'text' => $langSave, 'name' => 'submitExercise', 'value' => (isset($_GET['NewExercise']) ? $langCreate : $langModify), 'javascript' => "selectAll('assignee_box',true)" ), array( 'href' => $exerciseId ? "admin.php?course=$course_code&exerciseId=$exerciseId" : "index.php?course=$course_code", ) )) ." </div> </div> </fieldset> </form> </div>"; } else { switch ($displayResults) { case 0:
$category_id = $myrow->id; if (isset($_GET['category']) and $_GET['category'] == $myrow->id) { $tool_content .= " selected='selected'"; } $tool_content .= '>' . q($myrow->name) . "</option>"; } $tool_content .= " </select> </div> </div> <div class='form-group'> <div class='col-sm-10 col-sm-offset-2'>". form_buttons(array( array( 'text' => $langSave, 'name' => 'modify', 'value' => $langModify, 'javascript' => "selectAll('members_box',true)" ), array( 'href' => "index.php?course=$course_code" ) )) ."</div> </div> </fieldset> </form> </div>"; draw($tool_content, 2, null, $head_content);
</div> </div> <div class='form-group'> <label for='newContent' class='col-sm-2 control-label'>$langBlogPostBody:</label> <div class='col-sm-10'> ".rich_text_editor('newContent', 4, 20, $post->getContent())." </div> </div> $commenting_setting <div class='form-group'> <div class='col-sm-10 col-sm-offset-2'>". form_buttons(array( array( 'text' => $langSave, 'name' => 'submitBlogPost', 'value' => $langModifBlogPost ), array( 'href' => "$_SERVER[SCRIPT_NAME]?$url_params&action=showBlog" ) )) ."</div> </div> <input type='hidden' name='action' value='savePost'> <input type='hidden' name='pId' value='".$post->getId()."'> </fieldset> </form> </div>"; } else { Session::Messages($langBlogPostNotAllowedEdit); redirect_to_home_page("modules/blog/index.php?$url_params"); }
<span class='help-block'>".Session::getError('editTitle')."</span> </div> </div> <div class='form-group'> <label for='editComments' class='col-sm-2 control-label'>$langContent:</label> <div class='col-sm-10'> " . @rich_text_editor('editComments', 4, 20, $comments) . " </div> </div> <div class='form-group'> <div class='col-sm-10 col-sm-offset-2'>". form_buttons(array( array( 'text' => $langSave, 'name' => 'saveCourseDescription', 'value' => $langAdd ), array( 'href' => "index.php?course=$course_code" ) )) ." </div> </div> </fieldset> ". generate_csrf_token_form_field() ." </form> </div> </div> </div>";
<span class='help-block'>".Session::getError('url')."</span> </div> </div> <div class='form-group'> <label for='notes' class='col-sm-2 control-label'>$langCategoryNotes: </label> <div class='col-sm-10'> " . @rich_text_editor('notes', 4, 60, $notes) . " </div> </div> $category_selection <div class='form-group'> <div class='col-sm-10 col-sm-offset-2'>".form_buttons(array( array( 'text' => $langSave, 'value'=> $submit_value, 'name' => 'submit' ), array( 'href' => $base_url, ) ))."</div> </div> ". generate_csrf_token_form_field() ." </form> </div>"; } $total_glossary_terms = Database::get()->querySingle("SELECT COUNT(*) AS count FROM glossary WHERE course_id = ?d", $course_id)->count; if ($expand_glossary and $total_glossary_terms > $max_glossary_terms) { $tool_content .= sprintf("<div class='alert alert-warning'>$langGlossaryOverLimit</div>", "<b>$max_glossary_terms</b>"); } } else {
/** * @brief dislay form for adding other activity in gradebook * @global type $tool_content * @global type $course_code * @global type $visible * @global type $langTitle * @global type $langGradebookActivityDate2 * @global type $langGradebookActivityWeight * @global type $langGradeVisible * @global type $langComments * @global type $langGradebookInsAut * @global type $langAdd * @global type $langAdd * @global type $langType * @global type $langGradebookExams * @global type $langGradebookLabs * @global type $langGradebookOral * @global type $langGradebookProgress * @global type $langGradebookOtherType * @param type $gradebook_id */ function add_gradebook_other_activity($gradebook_id) { global $tool_content, $course_code, $visible, $langTitle, $langGradebookActivityDate2, $langGradebookActivityWeight, $langGradeVisible, $langComments, $langGradebookInsAut, $langAdd, $langAdd, $langType, $langGradebookExams, $langGradebookLabs, $langGradebookOral, $langGradebookProgress, $langGradebookOtherType, $langGradebookRemainingGrade, $langSave, $head_content, $language; load_js('bootstrap-datetimepicker'); $head_content .= " <script type='text/javascript'> $(function() { $('#date').datetimepicker({ format: 'dd-mm-yyyy hh:ii', pickerPosition: 'bottom-left', language: '".$language."', autoclose: true }); }); </script>"; $weight_error = Session::getError('weight'); $date_error = Session::getError('date'); $tool_content .= " <div class='row'> <div class='col-sm-12'> <div class='form-wrapper'> <form class='form-horizontal' role='form' method='post' action='$_SERVER[SCRIPT_NAME]?course=$course_code&gradebook_id=" . getIndirectReference($gradebook_id) . "'> <fieldset>"; if (isset($_GET['modify'])) { // modify an existing gradebook activity $id = filter_var(getDirectReference($_GET['modify']), FILTER_VALIDATE_INT); //All activity data (check if it's in this gradebook) $modifyActivity = Database::get()->querySingle("SELECT * FROM gradebook_activities WHERE id = ?d AND gradebook_id = ?d", $id, $gradebook_id); if ($modifyActivity) { $titleToModify = $modifyActivity->title; $contentToModify = $modifyActivity->description; $date = Session::has('date') ? Session::get('date') : $modifyActivity->date; $module_auto_id = $modifyActivity->module_auto_id; $auto = $modifyActivity->auto; $weight = Session::has('weight') ? Session::get('title') : $modifyActivity->weight; $activity_type = $modifyActivity->activity_type; $visible = $modifyActivity->visible; } else { $activity_type = ''; } $gradebookActivityToModify = $id; } else { //new activity $gradebookActivityToModify = ""; $activity_type = ""; $date = date("Y-n-j", time()); $visible = 1; } if (!isset($contentToModify)) $contentToModify = ""; @$tool_content .= " <div class='form-group'> <label for='activity_type' class='col-sm-2 control-label'>$langType:</label> <div class='col-sm-10'> <select name='activity_type' class='form-control'> <option value='' " . typeSelected($activity_type, '') . " >-</option> <option value='4' " . typeSelected($activity_type, 4) . " >" . $langGradebookExams . "</option> <option value='2' " . typeSelected($activity_type, 2) . " >" . $langGradebookLabs . "</option> <option value='1' " . typeSelected($activity_type, 1) . " >" . $langGradebookOral . "</option> <option value='3' " . typeSelected($activity_type, 3) . " >" . $langGradebookProgress . "</option> <option value='5' " . typeSelected($activity_type, 5) . " >" . $langGradebookOtherType . "</option> </select> </div> </div> <div class='form-group'> <label for='actTitle' class='col-sm-2 control-label'>$langTitle:</label> <div class='col-sm-10'> <input type='text' class='form-control' name='actTitle' value='".q($titleToModify)."'/> </div> </div> <div class='form-group".($date_error ? " has-error" : "")."'> <label for='date' class='col-sm-2 control-label'>$langGradebookActivityDate2:</label> <div class='col-sm-10'> <input type='text' class='form-control' name='date' id='date' value='" . datetime_remove_seconds($date) . "'/> <span class='help-block'>$date_error</span> </div> </div> <div class='form-group".($weight_error ? " has-error" : "")."'> <label for='weight' class='col-sm-2 control-label'>$langGradebookActivityWeight:</label> <div class='col-sm-10'> <input type='text' class='form-control' name='weight' value='$weight' size='5'> <span class='help-block'>". ($weight_error ? $weight_error : "($langGradebookRemainingGrade: " . weightleft($gradebook_id, '') . "%)")."</span> </div> </div> <div class='form-group'> <label for='visible' class='col-sm-2 control-label'>$langGradeVisible:</label> <div class='col-sm-10'> <input type='checkbox' id='visible' name='visible' value='1'"; if ($visible == 1) { $tool_content .= " checked"; } $tool_content .= " /></div> </div> <div class='form-group'> <label for='actDesc' class='col-sm-2 control-label'>$langComments:</label> <div class='col-sm-10'> " . rich_text_editor('actDesc', 4, 20, $contentToModify) . " </div> </div>"; if (isset($module_auto_id) && $module_auto_id != 0) { //accept the auto booking mechanism $tool_content .= "<div class='form-group'> <label for='weight' class='col-sm-2 control-label'>$langGradebookInsAut:</label> <div class='col-sm-10'><input type='checkbox' value='1' name='auto' "; if ($auto) { $tool_content .= " checked"; } $tool_content .= "/></div></div>"; } $tool_content .= "<div class='form-group'> <div class='col-sm-10 col-sm-offset-2'>".form_buttons(array( array( 'text' => $langSave, 'name' => 'submitGradebookActivity', 'value'=> $langAdd ), array( 'href' => "$_SERVER[SCRIPT_NAME]?course=$course_code" ) ))."</div></div>"; if (isset($_GET['modify'])) { $tool_content .= "<input type='hidden' name='id' value='" . getIndirectReference($gradebookActivityToModify) . "'>"; } else { $tool_content .= " <input type='hidden' name='id' value='' >"; } $tool_content .= "</fieldset> ". generate_csrf_token_form_field() ." </form> </div> </div> </div>"; }
</div> </div> </div> </div>"; /**** end of recursion paramneters *****/ $tool_content .= "<div class='form-group'> <label for='Detail' class='col-sm-2 control-label'>$langDetail :</label> <div class='col-sm-10'>" . rich_text_editor('content', 4, 20, $content) . "</div> </div> <div class='form-group'> <div class='col-sm-offset-2 col-sm-10'>". form_buttons(array( array( 'text' => $langSave, 'name' => 'submitbtn', 'value' => $langAddModify ), array( 'href' => "index.php?course=$course_code", ) )) ." </div> </div> </form></div>"; } } /* --------------------------------------------- * End of prof only * ------------------------------------------- */ // display action bar if (!isset($_GET['addEvent']) && !isset($_GET['edit'])) {
</div> </div> <div class='form-group'> <label for='newComment' class='col-sm-2 control-label'>$langDescr:</label> <div class='col-sm-10'> <input name='newComment' type='text' class='form-control' id='newComment'> </div> </div> <div class='form-group'> <div class='col-sm-10 col-sm-offset-2'> <input type='hidden' name='cmd' value='create'>". form_buttons(array( array( 'text' => $langSave, 'value' => $langCreate ), array( 'href' => "index.php?course=$course_code", ) )) ."</div> </div> </form></div>"; } break; default: break; } // end of switch } // end of if(isset) } // end of if // IF ORDER COMMAND RECEIVED