示例#1
0
 function tearDown()
 {
     delete_quiz($this->quiz_id);
     parent::tearDown();
 }
示例#2
0
<?php

// in this we will include the files of functions and check if the user is instructor
// we will assume the user is logged in
//include('includes/functions.php');
//echo $_SESSION['quiz_id'];
include "layout/adminheader.php";
if (isset($_SESSION['class_id'])) {
    redirect_to('student.php');
}
if (isset($_POST['publish_quiz'])) {
    set_publish($_GET['publish']);
    redirect_to('admin.php');
}
if (isset($_POST['delete_quiz'])) {
    delete_quiz($_GET['delete']);
    redirect_to('admin.php');
}
//dbconnect("localhost", "quizuser", "quiz", "quiz");
?>

<div class="container">
<!-- Button trigger modal -->

		  <div class="published_puizzes">
		    <h2> <i class="fa fa-eye fa-lg fa-fw"></i>Published Quizzes</h2>
		    <table class="table table-hover">
		     <thead>
		        <tr>
		          <th>Date</th>
		          <th>Title</th>
示例#3
0
 $continuescanned = "{$CFG->wwwroot}/mod/blended/{$page}?&a={$a}&jobid={$scanjobid}";
 if ($page == 'deleteScanJob') {
     $owner = is_owner(0, $data->jobid);
     if (has_capability('mod/blended:deletescanjob', $context) and $owner or has_capability('mod/blended:deleteall', $context)) {
         $scan = getOMRScanJob($scanjobid);
         delete_scan_result($scan, $acode);
         echo "<CENTER>El trabajo ha sido eliminado.</CENTER><BR>";
     } else {
         echo "<CENTER>No cuenta con permisos suficientes para realizar la acción.</CENTER><BR>";
     }
     print_continue($continue);
 } elseif ($page == 'scannedJob.php') {
     if ($acode !== 0) {
         $owner = is_owner($acode, 0);
         if (has_capability('mod/blended:deletequiz', $context) and $owner or has_capability('mod/blended:deleteall', $context)) {
             delete_quiz($data);
             echo "<CENTER>El cuestionario ha sido eliminado.</CENTER><BR>";
         } else {
             echo "<CENTER>No cuenta con permisos suficientes para realizar la acción.</CENTER><BR>";
         }
         print_continue($continuescanned);
     }
     if ($acode == 0) {
         $owner = is_owner(0, $jobid);
         if (has_capability('mod/blended:deletescanjob', $context) and $owner or has_capability('mod/blended:deleteall', $context)) {
             delete_image($data);
             echo "<CENTER>La imagen ha sido eliminada.</CENTER><BR>";
         } else {
             echo "<CENTER>No cuenta con permisos suficientes para realizar la acción.</CENTER><BR>";
         }
         print_continue($continuescanned);
示例#4
0
 /**
  * Standard aed_module delete actualiser.
  *
  * @param  ID_TEXT		The entry being deleted
  */
 function delete_actualisation($_id)
 {
     $id = intval($_id);
     delete_quiz($id);
 }