/**
  * Get the map center coordinates from the address and update the database values
  *
  * The latitude/longitude need to be updated when the address changes, but there's no way to do that with the settings API
  */
 public function update_map_coordinates()
 {
     // @todo - this could be done during a settings validation callback?
     global $bgmp;
     $have_coordinates = true;
     if (isset($_POST['bgmp_map-address'])) {
         if (empty($_POST['bgmp_map-address'])) {
             $have_coordinates = false;
         } else {
             $coordinates = $bgmp->geocode($_POST['bgmp_map-address']);
             if (!$coordinates) {
                 $have_coordinates = false;
             }
         }
         if ($have_coordinates) {
             update_option('bgmp_map-latitude', $coordinates['latitude']);
             update_option('bgmp_map-longitude', $coordinates['longitude']);
         } else {
             add_notice("That address couldn't be geocoded, please make sure that it's correct.", 'error');
             update_option('bgmp_map-latitude', '');
             // @todo - update these
             update_option('bgmp_map-longitude', '');
         }
     }
 }
 /** Registers Shortcode */
 public function registerShortcode()
 {
     $this->init();
     try {
         $this->validate();
         add_shortcode($this->shortcodeTag, array($this, 'renderShortcode'));
     } catch (InvalidArgumentException $e) {
         add_notice($e->getMessage(), 'error');
     }
 }
Пример #3
0
 /**
  * Registers the custom post type
  *
  * @mvc Controller
  */
 public static function create_post_type()
 {
     if (!post_type_exists(POST_TYPE_SLUG)) {
         $post_type_params = self::get_post_type_params();
         $post_type = register_post_type(POST_TYPE_SLUG, $post_type_params);
         // CPT columns (Ohad Raz Class)
         $post_columns = new CPT_columns(POST_TYPE_SLUG, true);
         // $post_columns->_column_orderby( (object) array('orderby' => 'date') );
         $post_columns->add_column('cb', array('label' => __(''), 'type' => 'cb'));
         $post_columns->add_column('post_thumb', array('label' => __(''), 'type' => 'thumb', 'size' => array('50,50')));
         $post_columns->add_column('title', array('label' => __('title'), 'type' => 'native', 'sortable' => true));
         $post_columns->add_column('custom_tax_id', array('label' => __('OSmedia video category'), 'type' => 'custom_tax', 'taxonomy' => TAG_SLUG));
         $post_columns->add_column('tags', array('label' => __('tag'), 'type' => 'tags'));
         $post_columns->add_column('comments', array('label' => __('comments'), 'type' => 'comments'));
         $post_columns->add_column('date', array('label' => __('date'), 'type' => 'date', 'sortable' => true));
         if (is_wp_error($post_type)) {
             add_notice(__METHOD__ . ' error: ' . $post_type->get_error_message(), 'error');
         }
     }
 }
Пример #4
0
                            $ERRORSTR[] = "An error occurred while removing the Hot Topic [" . $id . "] from the system. The system administrator has been notified.You will now be redirected to the Hot Topics index; this will happen <strong>automatically</strong> in 5 seconds or <a href=\"" . ENTRADA_URL . "/admin/settings/manage/hottopics/?org=" . $ORGANISATION_ID . "\" style=\"font-weight: bold\">click here</a> to continue.";
                            application_log("error", "An error occurred while removing the Hot Topic [" . $id . "] from the system. ");
                        }
                    }
                }
                if ($SUCCESS) {
                    echo display_success();
                }
                if ($NOTICE) {
                    echo display_notice();
                }
                $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/admin/settings/manage/hottopics/?org=" . $ORGANISATION_ID . "\\'', 5000)";
                break;
            case 1:
            default:
                add_notice("Please review the following hot topics to ensure that you wish to <strong>permanently delete</strong> them.");
                echo display_notice();
                ?>


			<form action ="<?php 
                echo ENTRADA_URL . "/admin/settings/manage/hottopics/?section=delete&org=" . $ORGANISATION_ID . "&step=2";
                ?>
" method="post">
					<table class="tableList" cellspacing="0" summary="List of Curriculum Types">
						<colgroup>
							<col class="modified"/>
							<col class="title"/>
						</colgroup>
						<thead>
							<tr>
Пример #5
0
                                    echo "\t<a href=\"" . ENTRADA_URL . "/admin/quizzes?section=results&amp;community=true&amp;id=" . $result["aquiz_id"] . "\"><img src=\"" . ENTRADA_URL . "/images/view-stats.gif\" width=\"16\" height=\"16\" alt=\"View results of " . html_encode($result["quiz_title"]) . "\" title=\"View results of " . html_encode($result["quiz_title"]) . "\" style=\"vertical-align: middle\" border=\"0\" /></a>\n";
                                } else {
                                    echo "\t<img src=\"" . ENTRADA_URL . "/images/view-stats-disabled.gif\" width=\"16\" height=\"16\" alt=\"No completed quizzes at this time.\" title=\"No completed quizzes at this time.\" style=\"vertical-align: middle\" border=\"0\" />\n";
                                }
                                echo "\t</td>\n";
                                echo "\t<td class=\"title\"><a href=\"" . $url . "\" title=\"Community Page: " . html_encode($result["page_title"]) . "\">" . html_encode($result["page_title"]) . "</a></td>\n";
                                echo "\t<td class=\"title\"><a href=\"" . $url . "\" title=\"Quiz Title: " . html_encode($result["quiz_title"]) . "\">" . html_encode($result["quiz_title"]) . "</a></td>\n";
                                echo "\t<td class=\"completed\">" . (int) $completed_attempts . "</td>\n";
                                echo "</tr>\n";
                            }
                            ?>
                                </tbody>
                                </table>
                                <?php 
                        } else {
                            add_notice("This quiz is not currently attached to any community pages.<br /><br />To add this quiz to an page you are have administrative rights to, click the <strong>Attach To Community Page</strong> link above.");
                            echo display_notice();
                        }
                    }
                    ?>
                    </div>

					<?php 
                    /**
                     * Sidebar item that will provide the links to the different sections within this page.
                     */
                    $sidebar_html = "<ul class=\"menu\">\n";
                    $sidebar_html .= "\t<li class=\"link\"><a href=\"#quiz_information_section\" onclick=\"\$('quiz_information_section').scrollTo(); return false;\" title=\"Quiz Information\">Quiz Information</a></li>\n";
                    $sidebar_html .= "\t<li class=\"link\"><a href=\"#quiz_questions_section\" onclick=\"\$('quiz_questions_section').scrollTo(); return false;\" title=\"Quiz Questions\">Quiz Questions</a></li>\n";
                    $sidebar_html .= "\t<li class=\"link\"><a href=\"#learning_events_section\" onclick=\"\$('learning_events_section').scrollTo(); return false;\" title=\"Learning Events\">Learning Events</a></li>\n";
                    $sidebar_html .= "\t<li class=\"link\"><a href=\"#community_pages_section\" onclick=\"\$('community_pages_section').scrollTo(); return false;\" title=\"Learning Events\">Community Pages</a></li>\n";
Пример #6
0
            ?>
	<style type="text/css">
		#draft-list_length {padding:5px 4px 0 0;}
		#draft-list_filter {-moz-border-radius:10px 10px 0px 0px; border: 1px solid #9D9D9D;border-bottom:none;background-color:#FAFAFA;font-size: 0.9em;padding:3px;}
		#draft-list_paginate a {margin:2px 5px;}
	</style>
	<h1>My Draft Learning Event Schedules</h1>
    <div  class="row-fluid"><a class="btn btn-primary pull-right" href="<?php 
            echo ENTRADA_URL;
            ?>
/admin/events/drafts?section=create-draft">Create New Draft</a></div>
	<br />
	<?php 
            $drafts = Models_Event_Draft::fetchAllByProxyID($ENTRADA_USER->getActiveID());
            if ($drafts) {
                add_notice("<p>You currently have <strong>" . count($drafts) . "</strong> draft" . (count($drafts) > 1 ? "s" : "") . " on the go.</p><p>When you are finished working on your draft event schedule you can click <strong>Publish Drafts</strong> to schedule them to be imported.</p>");
                echo display_notice();
                ?>
			<form name="frmSelect" id="frmSelect" action="<?php 
                echo ENTRADA_URL;
                ?>
/admin/events/drafts?section=delete" method="post">
			<table class="table table-striped table-bordered" id="draft-list" cellspacing="0" cellpadding="1" summary="List of Events">
				<thead>
					<tr>
						<th class="modified" width="5%">&nbsp;</th>
						<th class="title">Draft Name</th>
						<th class="date">Created</th>
						<th class="status">Status</th>
					</tr>
				</thead>
Пример #7
0
<ul class="history"><?php 
                        foreach ($statistics as $key => $statistic) {
                            $module = explode(':', $statistic['module']);
                            $action = explode('_', $statistic['action']);
                            $user_action = count($action) > 1 ? $action[1] : $action[0];
                            $user_action = $user_action == "delete" ? $user_action . "d" : $user_action . "ed";
                            $activity_message = "<a href=\"" . ENTRADA_URL . "/communities/reports?section=user&community=" . $COMMUNITY_ID . "&user="******"user_id"] . "\">" . $statistic['fullname'] . "</a> ";
                            $activity_message .= $user_action . " the <a href=\"" . ENTRADA_URL . "/communities/reports?section=type&community=" . $COMMUNITY_ID . "&type=" . $module[2] . "\">" . ucwords($module[2]) . "</a>";
                            $activity_message .= " titled <a href=\"" . ENTRADA_URL . "/communities/reports?section=page&community=" . $COMMUNITY_ID . "&page=" . $statistic["action_field"] . "-" . $statistic["action_value"] . "\">" . (isset($statistic["page"]) ? $statistic["page"] : "-") . "</a>";
                            $activity_message .= " at " . date('D M j/y h:i a', $statistic['timestamp']);
                            echo "<li" . (!($key % 2) ? " style=\"background-color: #F4F4F4\"" : "") . ">" . $activity_message . "</li>";
                        }
                        ?>
</ul><?php 
                    } else {
                        add_notice('No statistics available for ' . $community_details["community_title"] . '.');
                        echo display_notice();
                    }
                    ?>
	<!--/TRACKING EDITS-->	
					<?php 
                    break;
            }
        } else {
            application_log("error", "User tried to modify a community, but they aren't an administrator of this community.");
            $ERROR++;
            $ERRORSTR[] = "You do not appear to be an administrator of the community that you are trying to modify.<br /><br />If you feel you are getting this message in error, please contact the MEdTech Unit (page feedback on left) and we will investigate. The MEdTech Unit has automatically been informed that this error has taken place.";
            echo display_error();
        }
    } else {
        application_log("error", "User tried to modify a community id [" . $COMMUNITY_ID . "] that does not exist or is not active in the system.");
Пример #8
0
                    ?>
>Inactive</option>
														</select>
													</td>
												</tr>
												<?php 
                }
            }
            ?>
	
								</tbody>
							</table>
						</div>
						<div id="no_period_msg">
							<?php 
            add_notice("There are no active periods for this curriculum type.");
            echo display_notice();
            ?>
						</div>
						<script type="text/javascript">
						var rowTemplate = ' <tr id="period_:id" class="curriculum_period success">\n\
												<td><input type="checkbox" class="remove_checkboxes" id="remove_:id" value=":id"/></td>\n\
												<td>\
												    <div class="input-append">\
    												    <input type="text" name="curriculum_start_date[:id]" id="start_:id" class="start_date input-small" value=":date" />\
                                                        <button class="btn calendar" type="button" id="start_calendar_:id"><i class="icon-calendar"></i></button>\
												    </div>\
												</td>\n\
												<td>\
												    <div class="input-append">\
												        <input type="text" name="curriculum_finish_date[:id]" id="finish_:id" class="end_date input-small" value=":date" />\
Пример #9
0
							<?php 
                        break;
                    default:
                        echo "No statistics for this marking scheme.";
                        break;
                }
                ?>
				</div>
				<?php 
                if ($students && @count($students) >= 1) {
                    ?>
						<div class="row-fluid">
							<?php 
                    if (isset($_POST["error_grades"]) && @count($_POST["error_grades"])) {
                        $error_grades = $_POST["error_grades"];
                        add_notice(count($_POST["error_grades"]) > 1 ? "Errors were encountered while importing the CSV.<br /><br /> Please manually update the grades of each of the <strong>" . count($_POST["error_grades"]) . " highlighted students</strong>, otherwise those students' grades will be left as what they were prior to the CSV import process." : "An error was encountered while importing the CSV.<br /><br /> Please manually update the grade of the <strong>highlighted student</strong>, otherwise the grade for that student will be left as it was prior to the CSV import process.");
                        echo display_notice();
                    }
                    $editable = $ENTRADA_ACL->amIAllowed(new GradebookResource($course_details["course_id"], $course_details["organisation_id"]), "update") ? "gradebook_editable" : "gradebook_not_editable";
                    ?>
								<div id="gradebook_grades" class="span12">
									<h2>Grades</h2>
									<div style="margin-bottom: 5px;">
										<span class="content-small"><strong>Tip: </strong><?php 
                    echo $assessment["marking_scheme_description"];
                    ?>
</span>
									</div>				
									<table class="gradebook single <?php 
                    echo $editable;
                    ?>
Пример #10
0
                        <tbody>
                            <?php 
                if ($results) {
                    foreach ($results as $result) {
                        $url = ENTRADA_URL . "/profile/gradebook/assignments?section=view&amp;id=" . $result["assignment_id"];
                        echo "<tr id=\"assignment-" . $result["assignment_id"] . "\">";
                        echo "<td class=\"modified\" width=\"20\"><img src=\"" . ENTRADA_URL . "/images/pixel.gif\" width=\"19\" height=\"19\" alt=\"\" title=\"\" /></td>";
                        echo "<td colspan=\"3\"><a href=\"{$url}\">" . $result["assignment_title"] . "</a></td>";
                        echo "<td colspan=\"2\"><a href=\"{$url}\">" . $result["course_code"] . "</a></td>";
                        echo "<td colspan=\"2\"><a href=\"{$url}\">" . ($result["due_date"] == 0 ? "No Due Date" : date(DEFAULT_DATE_FORMAT, $result["due_date"])) . "</a></td>";
                        echo "</tr>";
                    }
                } else {
                    ?>
 <tr><td><?php 
                    add_notice('No Assignments have been created for this course.');
                    echo display_notice();
                    ?>
</td></tr><?php 
                }
                ?>
                        </tbody>
                    </table>
                    <?php 
                break;
            case strpos($PAGE_URL, "assessment_strategies") !== false:
                if ($ENTRADA_USER->getGroup() == 'student') {
                    $student_sql = "AND a.`cohort` = " . $db->qstr($ENTRADA_USER->getCohort());
                } else {
                    $student_sql = "";
                }
Пример #11
0
 /**
  * Save Post Settings
  * */
 function save_post_settings()
 {
     wp_redirect(add_query_arg('page', WSW_Dashboard::page_id, admin_url('admin.php')));
     add_notice(' Save Settings', 'update');
     exit;
 }
Пример #12
0
                            } else {
                                echo "<td>-</td><td>-</td><td>-</td>";
                            }
                            echo "</tr>";
                            $count++;
                        }
                        ?>
							</tbody>
						</table>
				<?php 
                    } else {
                        if ($procedure_total > 0) {
                            add_notice("No objectives have been mapped to events.");
                            echo display_notice();
                        } else {
                            add_notice("No events to report on for this student.");
                            echo display_notice();
                        }
                    }
                    ?>
			</div>			
			<?php 
                }
            } else {
                $NOTICE++;
                $NOTICESTR[] = "No objectives to report on.  Please make sure you have mapped objectives on the details tab.";
                echo display_notice();
            }
            ?>
<div class="row-fluid">
	<a class="btn pull-left no-printing" href="<?php 
 public static function process_schedules()
 {
     $schedules = get_option('wpem-schedules');
     $day_now = strtotime(date('Y-m-d'));
     $mail_sent = $count = 0;
     foreach ((array) $schedules as $schedule) {
         $next_send = self::next_send(strtotime($schedule['start_date']), $schedule['frequency'], strtotime($schedule['end_date']));
         if ($day_now == $next_send) {
             $mail_sent += EM_Mailer::send_mail($schedule);
             $count++;
         }
     }
     if ($mail_sent) {
         add_notice(sprintf(__('%s scheduled emails were sent to %s email addresses', 'wpem'), $count, $mail_sent));
     }
 }
Пример #14
0
        ?>
" method="post">
	<table class="tableList" cellspacing="0" cellpadding="1" border="0" summary="List of Restricted Days">
		<colgroup>
			<col class="modified" />
			<col class="title" />
		</colgroup>
		<thead>
			<tr>
				<td class="modified">&nbsp;</td>
				<td class="title">Restricted Day</td>
			</tr>
		</thead>
		<tbody>
			<?php 
        foreach ($restricted_days as $restricted_day) {
            echo "<tr><td><input type=\"checkbox\" name = \"remove_ids[]\" value=\"" . $restricted_day->getID() . "\"/></td>";
            echo "<td><a href=\"" . ENTRADA_URL . "/admin/settings/manage/restricteddays?section=edit&amp;org=" . $ORGANISATION_ID . "&amp;day_id=" . $restricted_day->getID() . "\">" . $restricted_day->getName() . "</a></td></tr>";
        }
        ?>
		</tbody>
	</table>
	<br />
	<input type="submit" class="btn btn-danger" value="Delete Selected" />
	</form>
	<?php 
    } else {
        add_notice("There are currently no Restricted Days assigned to this Organisation");
        echo display_notice();
    }
}
                    echo "<option id=\"objective-item-" . $objective->getID() . "\" class=\"logged\" value=\"" . $objective->getID() . "\">" . html_encode($objective->getName()) . "</option>\n";
                }
                echo "</optgroup>\n";
            }
            echo "<optgroup label=\"Objectives Logged in this Entry\" id=\"objectives-entry\">\n";
            if (@count($objectives["disabled"])) {
                foreach ($objectives["disabled"] as $objective) {
                    echo "<option id=\"objective-item-" . $objective->getID() . "\" value=\"" . $objective->getID() . "\" disabled=\"disabled\">" . html_encode($objective->getName()) . "</option>\n";
                }
            }
            echo "</optgroup>\n";
            ?>
            </select>
            <?php 
        } else {
            add_notice("An issue was encountered while attempting to fetch the available logbook objectives for the selected course.");
            echo display_notice();
        }
    } else {
        add_notice("Please select a <strong>Rotation</strong> from list above to begin adding logbook objectives to this entry.");
        echo display_notice();
    }
    if ($ajax) {
        exit;
    } else {
        ?>
            </span>
        </div>
        <?php 
    }
}
Пример #16
0
function op_admin_notice_wp()
{
    global $wp_version;
    $string = __('Plugin Opening Hours requires at least WordPress version %s. Your Installation of WordPress is running on WordPress %s', 'opening-hours');
    add_notice(sprintf($string, OP_REQUIRED_WP_VERSION, $wp_version));
}
Пример #17
0
                    echo ENTRADA_URL . "/clerkship/logbook?section=csv&id=" . $PROXY_ID;
                    ?>
'" />
                        <input style="margin-left: 20px;" type="button" class="btn" value="Deactivate Entry" onclick="if ($('current-entry').value != '0') {window.location = '<?php 
                    echo ENTRADA_URL . "/clerkship/logbook?section=flag&entry_id=";
                    ?>
'+$('current-entry').value;} else {alert('You must select an active entry before selecting the Deactivate Entry button.');}" />
                        </div>
                        <?php 
                    $sidebar_html = "<div style=\"margin: 2px 0px 10px 3px; font-size: 10px\">\n";
                    $sidebar_html .= "\t<div><img src=\"" . ENTRADA_URL . "/images/legend-active-member.gif\" width=\"14\" height=\"14\" alt=\"\" title=\"\" style=\"vertical-align: middle\" /> Active Entry</div>\n";
                    $sidebar_html .= "\t<div><img src=\"" . ENTRADA_URL . "/images/legend-not-accessible.gif\" width=\"14\" height=\"14\" alt=\"\" title=\"\" style=\"vertical-align: middle\" /> Deactivated Entry</div>\n";
                    $sidebar_html .= "</div>\n";
                    new_sidebar_item("Logbook Encounters", $sidebar_html, "objective-legend", "open");
                } else {
                    add_notice("No clerkship logbook entries have been found for this user in the system.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.");
                    echo display_notice();
                }
                ?>
                </div>
                <?php 
            }
            ?>
			<div class="tab-page">
				<h3 class="tab">Progress Report</h3>
				<div id="progress-summary" style="min-height: 100px;">
					<div style="width: 100%; text-align: center; margin-top: 80px;">
						<div id="display-generic-box" class="display-generic">
							<img src="<?php 
            echo ENTRADA_RELATIVE;
            ?>
Пример #18
0
								<td class="modified">&nbsp;</td>
								<td class="title">Full Name</td>
							</tr>
						</thead>
						<tbody>
							<?php 
                foreach ($audience as $proxy_id => $user) {
                    if (!in_array($proxy_id, $read_users["proxy_id"])) {
                        echo "<tr id=\"notice-" . $result["notice_id"] . "\" class=\"notice" . ($expired ? " na" : "") . "\">\n";
                        echo "\t<td class=\"modified\">&nbsp;</td>\n";
                        echo "\t<td class=\"title\">" . $user . "</td>\n";
                        echo "</tr>\n";
                    }
                }
                ?>
						</tbody>
					</table>
					<?php 
            } else {
                add_success("All selected notice recipients have marked this message as read.");
                echo display_success();
            }
        } else {
            add_notice("There were no notice recipients found for this notice.");
            echo display_notice();
        }
        ?>
		</div>
		<?php 
    }
}
Пример #19
0
                            if (in_array($organisation_id, $PROCESSED["remove_ids"])) {
                                $success_string .= html_encode($result["organisation_title"]) . "<br />";
                            }
                        }
                        $success_string .= "</div>\n";
                        add_success("You have successfully removed the following organisations from the system:<br />" . $success_string . "You will be automatically redirected to the event index in 5 seconds, or you can <a href=\"" . ENTRADA_URL . "/admin/settings\">click here</a> if you do not wish to wait.");
                        echo display_success();
                        $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/admin/settings\\'', 5000)";
                    } else {
                        add_error("An error occurred when trying to delete an organisation, a system administrator has been informed.");
                        echo display_error();
                        $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/admin/settings\\'', 5000)";
                    }
                    break;
                default:
                    add_notice("Please review the following organisations to ensure that you wish to <strong>permanently delete</strong> them.");
                    echo display_notice();
                    ?>
						<div id="organisations-section">
							<form action="<?php 
                    echo ENTRADA_URL;
                    ?>
/admin/settings?section=delete" method="POST">
								<input type="hidden" name="step" value="2" />
								<table class="tableList" cellspacing="0" cellpadding="1" border="0" summary="List of Organisations">
									<colgroup>
										<col class="modified" />
										<col class="title" />
									</colgroup>
									<thead>
										<tr>
        echo isset($large_template_images) && $large_template_images ? $large_template_images : "";
    }
    ?>
        </div>
    </div>
    <div class="clearfix"></div>
    <h3>Community Pages</h3>
    <div class="control-group">
        <label class="control-label form-required">Default Pages</label>
        <div class="controls">
			<?php 
    $pages_output = community_type_pages_inlists($community_type_id, 0, 0, array(), $page_ids);
    if ($pages_output != "<ul class=\"community-page-list empty\"></ul>") {
        echo $pages_output;
    } else {
        add_notice("No default pages found for this community type.");
        echo display_notice();
    }
    ?>
		</div>
	</div>
	<?php 
    $query = "SELECT `community_type_options` FROM `org_community_types`\n                WHERE `octype_id` = " . $db->qstr($community_type_id);
    $type_options_serialized = $db->GetOne($query);
    if ($type_options_serialized && ($type_options = json_decode($type_options_serialized)) && @count($type_options)) {
        foreach ($type_options as $type_option => $active) {
            if ($type_option == "course_website" && $active && $ENTRADA_ACL->amIAllowed("course", "create", false)) {
                ?>
                <h3>Community Courses</h3>
                <div class="control-group">
                    <label class="control-label form-required">Select course(s)</label>
                ?>
"><?php 
                echo $procedures_recorded;
                ?>
</a></td>
							<td class="date-smallest"><a href="<?php 
                echo $url;
                ?>
"><?php 
                echo $procedures_required;
                ?>
</a></td>
						</tr>
						<?php 
            }
        }
        ?>
		
				</tbody>
			</table>
		</form>
		<?php 
    }
    if (!$summary_shown) {
        $student_name = get_account_data("firstlast", $PROXY_ID);
        add_notice($student_name . " has not begun any core rotations in the system at this time.");
        echo "<div style=\"width: 100%; text-align: center; margin-top: 80px;\">\n";
        echo display_notice();
        echo "</div>\n";
    }
}
Пример #22
0
    public static function getEditQuestionControls($question_data)
    {
        global $db, $HEAD, $PROCESSED, $ENTRADA_USER, $translate;
        if (isset($question_data["questiontype_id"]) && $question_data["questiontype_id"]) {
            $query = "SELECT * FROM `evaluations_lu_questiontypes`\n\t\t\t\t\t\tWHERE `questiontype_id` = " . $db->qstr($question_data["questiontype_id"]);
            $questiontype = $db->GetRow($query);
        } else {
            $questiontype = array("questiontype_shortname" => "matrix_single");
        }
        switch ($questiontype["questiontype_shortname"]) {
            case "rubric":
                ?>
				<tr>
					<td style="vertical-align: top">
						<label for="rubric_title" class="form-nrequired">Rubric Title</label>
					</td>
					<td>
						<input type="text" id="rubric_title" name="rubric_title" style="width: 330px;" value="<?php 
                echo isset($question_data["rubric_title"]) ? clean_input($question_data["rubric_title"], "encode") : "";
                ?>
">
					</td>
				</tr>
				<tr>
					<td style="vertical-align: top">
						<label for="rubric_description" class="form-nrequired">Rubric Description</label>
					</td>
					<td>
						<textarea id="rubric_description" class="expandable" name="rubric_description" style="width: 98%; height:0"><?php 
                echo isset($question_data["rubric_description"]) ? clean_input($question_data["rubric_description"], "encode") : "";
                ?>
</textarea>
					</td>
				</tr>
				<tr>
					<td style="vertical-align: top">
						<label for="columns_count" class="form-required">Number of Columns</label>
					</td>
					<td>
						<select name="columns_count" id="columns_count" onchange="updateColumns(this.options[this.selectedIndex].value, $('categories_count').value)">
							<option value="2"<?php 
                echo isset($question_data["columns_count"]) && $question_data["columns_count"] == 2 ? " selected=\"selected\"" : "";
                ?>
>2</option>
							<option value="3"<?php 
                echo isset($question_data["columns_count"]) && $question_data["columns_count"] == 3 || !isset($question_data["columns_count"]) || !$question_data["columns_count"] ? " selected=\"selected\"" : "";
                ?>
>3</option>
							<option value="4"<?php 
                echo isset($question_data["columns_count"]) && $question_data["columns_count"] == 4 ? " selected=\"selected\"" : "";
                ?>
>4</option>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						&nbsp;
					</td>
				</tr>
				<tr>
					<td style="vertical-align: top">
						<label for="allow_comments" class="form-required">Allow Comments</label>
					</td>
					<td>
						<input type="checkbox" id="allow_comments" name="allow_comments"<?php 
                echo isset($question_data["allow_comments"]) && $question_data["allow_comments"] ? " checked=\"checked\"" : "";
                ?>
 />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						&nbsp;
					</td>
				</tr>
				<tr>
					<td style="padding-top: 5px; vertical-align: top">
						<label for="response_text_0" class="form-required">Column Labels</label>
					</td>
					<td>
						&nbsp;
					</td>
				</tr>
				<tr>
					<td style="padding-top: 5px; vertical-align: top">
						<input type="hidden" value="<?php 
                echo isset($question_data["categories_count"]) && (int) $question_data["categories_count"] ? $question_data["categories_count"] : 1;
                ?>
" name="categories_count" id="categories_count" />
					</td>
					<td style="padding-top: 5px">
						<table class="form-question" cellspacing="0" cellpadding="2" border="0" summary="Form Question Responses">
						<colgroup>
							<col style="width: 3%" />
							<col style="width: 57%" />
							<col style="width: 20%" />
							<col style="width: 20%" />
						</colgroup>
						<thead>
							<tr>
								<td colspan="2">&nbsp;</td>
								<td class="center" style="font-weight: bold; font-size: 11px">Descriptor</td>
								<td class="center" style="font-weight: bold; font-size: 11px">Minimum Pass</td>
							</tr>
						</thead>
						<tbody id="columns_list">
							<?php 
                echo Models_Evaluation::getRubricColumnList($question_data);
                ?>
						</tbody>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						&nbsp;
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<h2>Categories</h2>
						<a class="btn btn-small btn-success pull-right" style="cursor: pointer; margin-top: -40px;" onclick="loadCategories($('columns_count').options[$('columns_count').selectedIndex].value, (parseInt($('categories_count').value) + 1), 0)"><i class="icon-plus-sign icon-white"></i> Add Additional Category</a>
					</td>
				</tr>
				<tr>
					<td style="padding-top: 5px" colspan="2">
						<table class="form-question" id="category_list" cellspacing="0" cellpadding="2" border="0" summary="Form Question Responses">
						<?php 
                echo Models_Evaluation::getRubricCategoryList($question_data);
                ?>
						</table>
					</td>
				</tr>
				<?php 
                break;
            case "free_text":
                ?>
				<tr>
					<td style="vertical-align: top">
						<label for="question_code" class="form-nrequired">Question Code</label>
					</td>
					<td>
						<input type="text" id="question_code" name="question_code" value="<?php 
                echo isset($question_data["question_code"]) && $question_data["question_code"] ? clean_input($question_data["question_code"], "encode") : "";
                ?>
" />
					</td>
				</tr>
				<tr>
					<td style="vertical-align: top">
						<label for="question_text" class="form-required">Question Text</label>
					</td>
					<td>
						<textarea id="question_text" class="expandable" name="question_text" style="width: 100%; height:0"><?php 
                echo isset($question_data["question_text"]) ? clean_input($question_data["question_text"], "encode") : "";
                ?>
</textarea>
					</td>
				</tr>
				<tr>
					<td style="padding-top: 5px; vertical-align: top">
						<label class="form-required">Available Responses</label>
					</td>
					<td>
						<?php 
                add_notice("The evaluators will be asked to enter a free text comment as a response to this question.");
                echo display_notice();
                ?>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<div id="objectives_1_list" class="hidden">
							<?php 
                $objective_ids_string = "";
                if (isset($question_data["objective_ids"]) && @count($question_data["objective_ids"])) {
                    foreach ($question_data["objective_ids"] as $objective_id) {
                        $objective_ids_string .= ($objective_ids_string ? ", " : "") . (int) $objective_id;
                        ?>
									<input type="hidden" class="objective_ids_1" id="objective_ids_1_<?php 
                        echo $objective_id;
                        ?>
" name="objective_ids_1[]" value="<?php 
                        echo $objective_id;
                        ?>
" />
									<?php 
                    }
                }
                ?>
							<input type="hidden" name="objective_ids_string_1" id="objective_ids_string_1" value="<?php 
                echo $objective_ids_string ? $objective_ids_string : "";
                ?>
" />
							<input type="hidden" id="qrow" value="1" />
						</div>
						<?php 
                $question_identifier = 1;
                require_once "api/evaluations-objectives-list.api.php";
                ?>
					</td>
				</tr>
				<?php 
                break;
            case "descriptive_text":
                ?>
				<tr>
					<td style="vertical-align: top">
						<label for="question_code" class="form-nrequired">Question Code</label>
					</td>
					<td>
						<input type="text" id="question_code" name="question_code" value="<?php 
                echo isset($question_data["question_code"]) && $question_data["question_code"] ? clean_input($question_data["question_code"], "encode") : "";
                ?>
" />
					</td>
				</tr>
				<tr>
					<td style="vertical-align: top">
						<label for="question_text" class="form-required">Question Text</label>
					</td>
					<td>
						<textarea id="question_text" class="expandable" name="question_text" style="width: 100%; height:0"><?php 
                echo isset($question_data["question_text"]) ? clean_input($question_data["question_text"], "encode") : "";
                ?>
</textarea>
					</td>
				</tr>
				<?php 
                break;
            case "selectbox":
                ?>
				<tr>
					<td style="vertical-align: top">
						<label for="question_text" class="form-required">Question Text</label>
					</td>
					<td>
						<textarea id="question_text" class="expandable" name="question_text" style="width: 98%; height:0"><?php 
                echo isset($question_data["question_text"]) ? clean_input($question_data["question_text"], "encode") : "";
                ?>
</textarea>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						&nbsp;
					</td>
				</tr>
				<tr>
					<td style="vertical-align: top">
						<label for="allow_comments" class="form-required">Allow Comments</label>
					</td>
					<td>
						<input type="checkbox" id="allow_comments" name="allow_comments"<?php 
                echo isset($question_data["allow_comments"]) && $question_data["allow_comments"] ? " checked=\"checked\"" : "";
                ?>
 />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						&nbsp;
					</td>
				</tr>
				<tr>
					<td style="padding-top: 5px; vertical-align: top">
						<label for="response_text_0" class="form-required">Available Responses</label>
					</td>
					<td style="padding-top: 5px">
						<table class="form-question" id="response_list" cellspacing="0" cellpadding="2" border="0" summary="Form Question Responses">
							<?php 
                echo Models_Evaluation::getQuestionResponseList($question_data, $questiontype["questiontype_shortname"]);
                ?>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<div id="objectives_1_list" class="hidden">
							<?php 
                $objective_ids_string = "";
                if (isset($question_data["objective_ids"]) && @count($question_data["objective_ids"])) {
                    foreach ($question_data["objective_ids"] as $objective_id) {
                        $objective_ids_string .= ($objective_ids_string ? ", " : "") . (int) $objective_id;
                        ?>
									<input type="hidden" class="objective_ids_1" id="objective_ids_1_<?php 
                        echo $objective_id;
                        ?>
" name="objective_ids_1[]" value="<?php 
                        echo $objective_id;
                        ?>
" />
									<?php 
                    }
                }
                ?>
							<input type="hidden" name="objective_ids_string_1" id="objective_ids_string_1" value="<?php 
                echo $objective_ids_string ? $objective_ids_string : "";
                ?>
" />
							<input type="hidden" id="qrow" value="1" />
						</div>
						<?php 
                $question_identifier = 1;
                require_once "api/evaluations-objectives-list.api.php";
                ?>
					</td>
				</tr>
				<?php 
                break;
            case "matrix_single":
            case "vertical_matrix":
            default:
                ?>
				<tr>
					<td style="vertical-align: top">
						<label for="question_code" class="form-nrequired">Question Code</label>
					</td>
					<td>
						<input type="text" id="question_code" name="question_code" value="<?php 
                echo isset($question_data["question_code"]) && $question_data["question_code"] ? clean_input($question_data["question_code"], "encode") : "";
                ?>
" />
					</td>
				</tr>
				<tr>
					<td style="vertical-align: top">
						<label for="question_text" class="form-required">Question Text</label>
					</td>
					<td>
						<textarea id="question_text" class="expandable" name="question_text" style="width: 98%; height:0"><?php 
                echo isset($question_data["question_text"]) ? clean_input($question_data["question_text"], "encode") : "";
                ?>
</textarea>
					</td>
				</tr>
				<tr>
					<td style="vertical-align: top">
						<label for="responses_count" class="form-required">Number of Responses</label>
					</td>
					<td>
						<select name="responses_count" id="responses_count" onchange="updateResponses(this.options[this.selectedIndex].value, jQuery('#questiontype_id').val())">
                            <?php 
                if ($questiontype["questiontype_shortname"] == "vertical_matrix") {
                    for ($i = 2; $i <= 10; $i++) {
                        ?>
                                    <option <?php 
                        echo "value=\"" . $i . "\"" . (isset($question_data["responses_count"]) && $question_data["responses_count"] == $i || !isset($question_data["responses_count"]) && $i == 4 ? " selected=\"selected\"" : "") . ">" . $i;
                        ?>
</option>
                                    <?php 
                    }
                } else {
                    ?>
                                <option value="2"<?php 
                    echo isset($question_data["responses_count"]) && $question_data["responses_count"] == 2 ? " selected=\"selected\"" : "";
                    ?>
>2</option>
                                <option value="3"<?php 
                    echo isset($question_data["responses_count"]) && $question_data["responses_count"] == 3 ? " selected=\"selected\"" : "";
                    ?>
>3</option>
                                <option value="4"<?php 
                    echo isset($question_data["responses_count"]) && $question_data["responses_count"] == 4 || !isset($question_data["responses_count"]) || !$question_data["responses_count"] ? " selected=\"selected\"" : "";
                    ?>
>4</option>
                                <option value="5"<?php 
                    echo isset($question_data["responses_count"]) && $question_data["responses_count"] == 5 ? " selected=\"selected\"" : "";
                    ?>
>5</option>
                                <?php 
                }
                ?>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						&nbsp;
					</td>
				</tr>
				<tr>
					<td style="vertical-align: top">
						<label for="allow_comments" class="form-required">Allow Comments</label>
					</td>
					<td>
						<input type="checkbox" id="allow_comments" name="allow_comments"<?php 
                echo isset($question_data["allow_comments"]) && $question_data["allow_comments"] ? " checked=\"checked\"" : "";
                ?>
 />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						&nbsp;
					</td>
				</tr>
				<tr>
					<td style="padding-top: 5px; vertical-align: top">
						<label for="response_text_0" class="form-required">Available Responses</label>
					</td>
					<td style="padding-top: 5px">
						<table class="form-question" id="response_list" cellspacing="0" cellpadding="2" border="0" summary="Form Question Responses">
							<?php 
                echo Models_Evaluation::getQuestionResponseList($question_data, $questiontype["questiontype_shortname"]);
                ?>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<div id="objectives_1_list" class="hidden">
							<?php 
                $objective_ids_string = "";
                if (isset($question_data["objective_ids"]) && @count($question_data["objective_ids"])) {
                    foreach ($question_data["objective_ids"] as $objective_id) {
                        $objective_ids_string .= ($objective_ids_string ? ", " : "") . (int) $objective_id;
                        ?>
									<input type="hidden" class="objective_ids_1" id="objective_ids_1_<?php 
                        echo $objective_id;
                        ?>
" name="objective_ids_1[]" value="<?php 
                        echo $objective_id;
                        ?>
" />
									<?php 
                    }
                }
                ?>
							<input type="hidden" name="objective_ids_string_1" id="objective_ids_string_1" value="<?php 
                echo $objective_ids_string ? $objective_ids_string : "";
                ?>
" />
							<input type="hidden" id="qrow" value="1" />
						</div>
						<?php 
                $question_identifier = 1;
                require_once "api/evaluations-objectives-list.api.php";
                ?>
					</td>
				</tr>
				<?php 
                break;
        }
    }
Пример #23
0
                ?>
</td>
							<td><?php 
                echo date("Y-m-d", $result["start"]);
                ?>
</td>
							<td><?php 
                echo !empty($result["end"]) ? date("Y-m-d", $result["end"]) : date("Y-m-d", $result["start"]);
                ?>
</td>
							<td><?php 
                echo $result["student_name"];
                ?>
</td>
							<td><?php 
                echo $result["preceptor_name"];
                ?>
</td>
						</tr>
						<?php 
            }
            ?>
					</tbody>
				</table>
			<?php 
        } else {
            add_notice("No student observerships were found within this date range. Please review the selected date range and run the report again. If you received this message in error please contact an administrator for assistance.");
            echo display_notice();
        }
    }
}
Пример #24
0
    if (has_error()) {
        echo display_error();
    }
    if (isset($notifications_sent) && $notifications_sent) {
        add_success("Successfully requested that " . ($notifications_sent > 1 ? $notifications_sent . " evaluators" : get_account_data("wholename", $associated_evaluator)) . " fill out this evaluation [" . $evaluation_title . "] for you.");
        echo display_success();
    }
}
$evaluation_requests = Models_Evaluation::getTargetRequests($ENTRADA_USER->GetID(), false, false, true);
if ($evaluation_requests) {
    $notice_msg = "The following Evaluation Request Codes are still active but unused: <br />";
    foreach ($evaluation_requests as $evaluation_request) {
        $requestee = get_account_data("wholename", $evaluation_request["target_proxy_id"]);
        $notice_msg .= "<br />" . $evaluation_request["evaluation_title"] . " [" . $requestee . "]: <strong>" . $evaluation_request["request_code"] . "</strong>";
    }
    add_notice($notice_msg);
    echo display_notice();
}
if ($evaluations && $view != "review") {
    ?>
	<h1>My Evaluations and Assessments</h1>
	<?php 
    if ($review_evaluations) {
        $sidebar_html = "<ul class=\"menu\">\n";
        $sidebar_html .= "\t<li class=\"link\"><a href=\"" . ENTRADA_URL . "/evaluations?view=review\">View Completed Evaluations Available for Review</a></li>\n";
        $sidebar_html .= "</ul>\n";
        new_sidebar_item("Evaluations Review", $sidebar_html, "view-review", "open", "1.9");
    }
    $evaluation_id = 0;
    echo "<div class=\"no-printing\">\n";
    echo "    <ul class=\"nav nav-tabs\">\n";
Пример #25
0
                    } else {
                        add_error("An error occurred while deactivating the Medbiquitous Instructional Method [" . $id . "] from the system. The system administrator has been notified. You will now be redirected to the Medbiquitous Instructional Method index; this will happen <strong>automatically</strong> in 5 seconds or <a href=\"" . ENTRADA_URL . "/admin/settings/manage/medbiqinstructional/?org=" . $ORGANISATION_ID . "\" style=\"font-weight: bold\">click here</a> to continue.");
                        application_log("error", "An error occurred while removing the Medbiquitous Instructional Method [" . $id . "] from the system. ");
                    }
                }
                if ($SUCCESS) {
                    echo display_success();
                }
                if ($NOTICE) {
                    echo display_notice();
                }
                $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/admin/settings/manage/medbiqinstructional/?org=" . $ORGANISATION_ID . "\\'', 5000)";
                break;
            case 1:
            default:
                add_notice("Please review the following Medbiquitous Instructional Methods to ensure that you wish to <strong>deactivate</strong> them.");
                echo display_notice();
                ?>


			<form action ="<?php 
                echo ENTRADA_URL . "/admin/settings/manage/medbiqinstructional/?section=delete&org=" . $ORGANISATION_ID . "&step=2";
                ?>
" method="post">
					<table class="tableList" cellspacing="0" summary="List of Medbiq Instructional Methods">
						<colgroup>
							<col class="modified"/>
							<col class="title"/>
						</colgroup>
						<thead>
							<tr>
 public function validate_inputs($post)
 {
     global $wpem_default_notifications;
     $post = apply_filters('wpem_pre_validate_notification', $post, $wpem_default_notifications);
     if (!isset($post['id']) || !isset($wpem_default_notifications[$post['id']])) {
         add_notice(__('invalid id', 'wpem'), 'error');
         return false;
     }
     if (isset($post['use_custom'])) {
         $post['use_custom'] = absint($post['use_custom']);
     }
     if (!in_array($post['mail_format'], array('html', 'plaintext'))) {
         add_notice(__('Unknown mail format', 'wpem'), 'error');
         unset($post['mail_format']);
     }
     if (!absint($post['template'])) {
         if ($post['template']) {
             add_notice(__('invalid template', 'wpem'), 'error');
         }
         unset($post['template']);
     }
     if (empty($post['body'])) {
         add_notice(__('Notification body cannot be empty', 'wpem'), 'error');
         unset($post['body']);
     } else {
         $post['body'] = wp_unslash($post['body']);
     }
     if (!in_array($post['mail_format'], array('html', 'plaintext'))) {
         add_notice(__('Unsurported Mail Format', 'wpem'), 'error');
         unset($post['mail_format']);
     }
     foreach ($post as $key => $value) {
         if (!in_array($key, apply_filters('wpem_notification_fields', array('id', 'template', 'title', 'body', 'mail_format', 'use_custom')))) {
             unset($post[$key]);
         }
     }
     return apply_filters('wpem_validate_notification', $post);
 }
 /**
  * Initializes variables
  *
  * @mvc Controller
  */
 public function init()
 {
     try {
         //$instance_example = new WPPS_Instance_Class( 'Instance example', '42' );
         //add_notice('ba');
     } catch (Exception $exception) {
         add_notice(__METHOD__ . ' error: ' . $exception->getMessage(), 'error');
     }
 }
Пример #28
0
                            add_error("You were only able to attempt this quiz a total of <strong>" . (int) $quiz_record["quiz_attempts"] . " time" . ($quiz_record["quiz_attempts"] != 1 ? "s" : "") . "</strong>, and time limit for your final attempt expired before completion.<br /><br />Please contact a teacher if you require further assistance.");
                            echo display_error();
                            application_log("notice", "Someone attempted to complete aquiz_id [" . $RECORD_ID . "] (quiz_id [" . $quiz_record["quiz_id"] . "] / event_id [" . $quiz_record["content_id"] . "]) more than the total number of possible attempts [" . $quiz_record["quiz_attempts"] . "] after their final attempt expired.");
                        }
                    } else {
                        add_notice("You were only able to attempt this quiz a total of <strong>" . (int) $quiz_record["quiz_attempts"] . " time" . ($quiz_record["quiz_attempts"] != 1 ? "s" : "") . "</strong>.<br /><br />Please contact a teacher if you require further assistance.");
                        echo display_notice();
                        application_log("notice", "Someone attempted to complete aquiz_id [" . $RECORD_ID . "] (quiz_id [" . $quiz_record["quiz_id"] . "] / event_id [" . $quiz_record["content_id"] . "]) more than the total number of possible attempts [" . $quiz_record["quiz_attempts"] . "].");
                    }
                } else {
                    add_notice("You were only able to attempt this quiz until <strong>" . date(DEFAULT_DATE_FORMAT, $quiz_record["release_until"]) . "</strong>.<br /><br />Please contact a teacher if you require further assistance.");
                    echo display_notice();
                    application_log("error", "Someone attempted to complete aquiz_id [" . $RECORD_ID . "] (quiz_id [" . $quiz_record["quiz_id"] . "] / event_id [" . $quiz_record["content_id"] . "] after the release date.");
                }
            } else {
                add_notice("You cannot attempt this quiz until <strong>" . date(DEFAULT_DATE_FORMAT, $quiz_record["release_date"]) . "</strong>.<br /><br />Please contact a teacher if you require further assistance.");
                echo display_notice();
                application_log("error", "Someone attempted to complete aquiz_id [" . $RECORD_ID . "] (quiz_id [" . $quiz_record["quiz_id"] . "] / event_id [" . $quiz_record["content_id"] . "] prior to the release date.");
            }
        } else {
            add_error("This quiz is only accessible by authorized users.");
            echo display_error();
            application_log("error", "Unauthorized user attempted to access quiz [" . $RECORD_ID . "].");
        }
    } else {
        add_error("In order to attempt a quiz, you must provide a valid quiz identifier.");
        echo display_error();
        application_log("error", "Failed to provide a valid aquiz_id identifer [" . $RECORD_ID . "] when attempting to take a quiz.");
    }
} else {
    add_error("In order to attempt a quiz, you must provide a valid quiz identifier.");
Пример #29
0
} else {
    if ($router && $router->initRoute()) {
        if (isset($_GET["id"]) && ($tmp_input = clean_input($_GET["id"], "int"))) {
            $REPORT_ID = $tmp_input;
        }
        if ($REPORT_ID) {
            $query = "SELECT * FROM `reports_aamc_ci` WHERE `raci_id` = " . $db->qstr($REPORT_ID) . " AND `organisation_id` = " . $db->qstr($ENTRADA_USER->getActiveOrganisation());
            $REPORT = $db->GetRow($query);
            if ($REPORT) {
                $SHORT_REPORT_TITLE = date("Y", $REPORT["report_start"]) . "-" . date("Y", $REPORT["report_finish"]) . " Curriculum";
                $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/reports/aamc/manage?id=" . $REPORT_ID, "title" => $SHORT_REPORT_TITLE);
                $sidebar_html = "<ul class=\"menu\">";
                $sidebar_html .= "\t<li class=\"link\"><a href=\"" . ENTRADA_URL . "/admin/reports/aamc/manage/edit?id=" . $REPORT_ID . "\">Edit Report</a></li>\n";
                $sidebar_html .= "</ul>";
                new_sidebar_item($SHORT_REPORT_TITLE, $sidebar_html, "aamc-report", "open");
                $module_file = $router->getRoute();
                if ($module_file) {
                    require_once $module_file;
                }
            } else {
                add_notice("You don't appear to have access to change this organisation. If you feel you are seeing this in error, please contact your system administrator.");
                echo display_notice();
            }
        }
    } else {
        $url = ENTRADA_URL . "/admin/" . $MODULE;
        application_log("error", "The Entrada_Router failed to load a request. The user was redirected to [" . $url . "].");
        header("Location: " . $url);
        exit;
    }
}
Пример #30
0
                $query = "SELECT `form_title` FROM `evaluation_forms` WHERE `eform_id` = " . $db->qstr($FORM_ID);
                $form_title = $db->GetOne($query);
                $query = "SELECT `equestion_id` FROM `evaluation_form_questions` WHERE `eform_id` = " . $db->qstr($FORM_ID);
                $used_questions = $db->GetAll($query);
                $used_ids = array();
                foreach ($used_questions as $used_question) {
                    $used_ids[] = $used_question["equestion_id"];
                }
                $temp_results = $results;
                $results = array();
                foreach ($temp_results as $temp_result) {
                    if (array_search($temp_result["equestion_id"], $used_ids) === false) {
                        $results[] = $temp_result;
                    }
                }
                add_notice("To attach evaluation questions to the selected form [" . $form_title . "], you may either click the 'paperclip' image to add one question, or select the checkboxes on the line of each question that you wish to add, then press the 'Attach Selected' button at the bottom of the page.");
                echo display_notice();
            } else {
                $FORM_ID = false;
            }
        }
        $question_controls = Models_Evaluation::getQuestionControlsArray($results);
        $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/jquery/jquery.dataTables.min.js\"></script>";
        $HEAD[] = "<script type=\"text/javascript\">\n\t\tvar question_controls = " . json_encode($question_controls) . ";\n\t\tvar modalDialog;\n\t\tvar oTable;\n\t\tjQuery(document).ready(function() {\n\t\t\tmodalDialog = new Control.Modal(\$('false-link'), {\n\t\t\t\tposition:\t\t'center',\n\t\t\t\toverlayOpacity:\t0.75,\n\t\t\t\tcloseOnClick:\t'overlay',\n\t\t\t\tclassName:\t\t'default-tooltip',\n\t\t\t\tfade:\t\t\ttrue,\n\t\t\t\tfadeDuration:\t0.30,\n\t\t\t\twidth: 755\n\t\t\t});\n\t\t\toTable = jQuery('#evaluationquestions').dataTable(\n\t\t\t\t{    \n\t\t\t\t\t'sPaginationType': 'full_numbers',\n\t\t\t\t\t'bInfo': false,\n                    'bAutoWidth': false\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\n\t\tfunction openDialog (equestion_id) {\n\t\t\tif (equestion_id) {\n\t\t\t\tmodalDialog.container.update('<div id=\"form-questions-list\">'+question_controls[equestion_id]+'</div>');\n\t\t\t\tmodalDialog.open();\n\t\t\t} else {\n\t\t\t\tmodalDialog.open();\n\t\t\t}\n\t\t}\n\t\t</script>";
        ?>
		<form action="<?php 
        echo ENTRADA_URL;
        ?>
/admin/evaluations/questions?<?php 
        echo replace_query(array("section" => "attach"));
        ?>