MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup

This commit is contained in:
Petr Skoda 2009-11-04 11:58:30 +00:00
parent 3fac41f8dd
commit 8319260833
29 changed files with 62 additions and 65 deletions

View File

@ -793,4 +793,4 @@ class safebrowser_access_rule extends quiz_access_rule_base {
return get_string("safebrowsernotice", "quiz");
}
}
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
/**
* Fallback page of /mod/quiz/edit.php add random question dialog,
* for users who do not use javascript.
@ -95,4 +95,4 @@ $addonpage = optional_param('addonpage_form', 0, PARAM_SEQUENCE);
$qcobject->display_randomquestion_user_interface($addonpage);
echo $OUTPUT->footer();
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
/**
* This page prints a particular instance of quiz
*
@ -172,4 +172,4 @@
// Finish the page
$accessmanager->show_attempt_timer_if_needed($attemptobj->get_attempt(), time());
echo $OUTPUT->footer();
?>

View File

@ -815,7 +815,7 @@ class quiz_attempt extends quiz {
}
/**
* Given a URL containing attempt={this attempt id}, return an array of variant URLs
* Given a URL containing attempt={this attempt id}, return an array of variant URLs
* @param $url a URL.
* @return string HTML fragment. Comma-separated list of links to the other
* attempts with the attempt number as the link text. The curent attempt is
@ -1171,4 +1171,4 @@ class quiz_review_nav_panel extends quiz_nav_panel_base {
return $html;
}
}
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
//This php script contains all the stuff to backup quizzes
//This is the "graphical" structure of the quiz mod:
@ -580,4 +580,4 @@
WHERE g.quiz = ?", array($instanceid));
}
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
/**
* Capability definitions for the quiz module.
*
@ -132,4 +132,4 @@ $mod_quiz_capabilities = array(
'legacy' => array()
)
);
?>

View File

@ -1,4 +1,4 @@
<?php //$Id$
<?php
// This file replaces:
// * STATEMENTS section in db/install.xml

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
// This file keeps track of upgrades to
// the quiz module

View File

@ -5,7 +5,7 @@ var quiz_edit = {};
function quiz_edit_init() {
// Add random question dialogue --------------------------------------------
quiz_edit.randomquestiondialog = new YAHOO.widget.Dialog('randomquestiondialog', {
modal: true,
width: '100%',

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
@ -442,7 +442,7 @@ $strupdatemodule = has_capability('moodle/course:manageactivities',
$contexts->lowest()) ?
$OUTPUT->update_module_button($cm->id, 'quiz') :
"";
$PAGE->navbar->add($pagetitle);
$PAGE->requires->skip_link_to('questionbank', get_string('skipto', 'access', get_string('questionbank', 'question')));
$PAGE->requires->skip_link_to('quizcontentsblock', get_string('skipto', 'access', get_string('questionsinthisquiz', 'quiz')));

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
require_once("../../config.php");
@ -24,4 +24,4 @@
redirect('view.php?id='.$cm->id);
}
?>

View File

@ -165,4 +165,4 @@
// Finish the page
echo $OUTPUT->footer();
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
@ -367,7 +367,7 @@ function quiz_repaginate($layout, $perpage, $shuffle = false) {
/**
* Creates an array of maximum grades for a quiz
* The grades are extracted from the quiz_question_instances table.
*
*
* @param integer $quiz The quiz object
* @return array Array of grades indexed by question id. These are the maximum
* possible grades that students can achieve for each of the questions.
@ -1186,7 +1186,7 @@ function quiz_send_notification_emails($course, $quiz, $attempt, $context, $cm)
* - Remove duplicate question id's
* - Remove extra "," from beginning and end
* - Finally, add a ",0" in the end if there is none
*
*
* @param $string $layout the quiz layout to clean up, usually from $quiz->questions.
* @param boolean $removeemptypages If true, remove empty pages from the quiz. False by default.
* @return $string the cleaned-up layout
@ -1246,7 +1246,7 @@ function quiz_error($quiz, $errorcode, $a = null) {
/**
* Checks if browser is safe browser
*
*
* @return true, if browser is safe browser else false
*/
function quiz_check_safe_browser() {

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
///////////////////////////////////////////////////////////////////////////
// //
@ -437,4 +437,4 @@ class mod_quiz_mod_form extends moodleform_mod {
}
}
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
/**
* This page deals with processing responses during an attempt at a quiz.
*
@ -197,4 +197,3 @@ $accessmanager->clear_password_access();
/// Send the user to the review page.
redirect($attemptobj->review_url());
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
// This script uses installed report plugins to print quiz reports
@ -46,10 +46,10 @@
$url->param('mode', $mode);
}
$PAGE->set_url($url);
require_login($course, false, $cm);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
$reportlist = quiz_report_list($context);
if (count($reportlist)==0){
print_error('erroraccessingreport', 'quiz');
@ -59,7 +59,7 @@
} elseif (!in_array($mode, $reportlist)){
print_error('erroraccessingreport', 'quiz');
}
// if no questions have been set up yet redirect to edit.php
if (!$quiz->questions and has_capability('mod/quiz:manage', $context)) {
redirect('edit.php?cmid='.$cm->id);
@ -97,4 +97,4 @@
echo $OUTPUT->footer();
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
////////////////////////////////////////////////////////////////////
/// Default class for report plugins

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
//This php script contains all the stuff to restore quiz mods
// Todo:
@ -56,7 +56,7 @@
//if necessary, write to restorelog and adjust date/time fields
if ($restore->course_startdateoffset) {
restore_log_date_changes('Quiz', $restore, $info['MOD']['#'], array('TIMEOPEN', 'TIMECLOSE'));
}
}
//traverse_xmlize($info); //Debug
//print_object ($GLOBALS['traverse_array']); //Debug
//$GLOBALS['traverse_array']=""; //Debug
@ -65,7 +65,7 @@
$quiz = new stdClass;
$quiz->course = $restore->course_id;
$quiz->name = backup_todb($info['MOD']['#']['NAME']['0']['#']);
$quiz->intro = backup_todb($info['MOD']['#']['INTRO']['0']['#']);
$quiz->intro = backup_todb($info['MOD']['#']['INTRO']['0']['#']);
$quiz->timeopen = backup_todb($info['MOD']['#']['TIMEOPEN']['0']['#']);
$quiz->timeclose = backup_todb($info['MOD']['#']['TIMECLOSE']['0']['#']);
$quiz->optionflags = backup_todb($info['MOD']['#']['OPTIONFLAGS']['0']['#']);
@ -208,20 +208,20 @@
//traverse_xmlize($feedback_info); //Debug
//print_object ($GLOBALS['traverse_array']); //Debug
//$GLOBALS['traverse_array']=""; //Debug
//We'll need this later!!
$oldid = backup_todb($feedback_info['#']['ID']['0']['#']);
//Now, build the quiz_feedback record structure
$feedback = new stdClass();
$feedback->quizid = $quiz_id;
$feedback->feedbacktext = backup_todb($feedback_info['#']['FEEDBACKTEXT']['0']['#']);
$feedback->mingrade = backup_todb($feedback_info['#']['MINGRADE']['0']['#']);
$feedback->maxgrade = backup_todb($feedback_info['#']['MAXGRADE']['0']['#']);
//The structure is equal to the db, so insert the quiz_question_instances
$newid = $DB->insert_record('quiz_feedback', $feedback);
if ($newid) {
//We have the newid, update backup_ids
backup_putid($restore->backup_unique_code, 'quiz_feedback', $oldid, $newid);
@ -387,11 +387,11 @@
//in the restore process
function quiz_decode_content_links ($content,$restore) {
global $CFG;
$result = $content;
//Link to the list of quizs
$searchstring='/\$@(QUIZINDEX)\*([0-9]+)@\$/';
//We look for it
preg_match_all($searchstring,$content,$foundset);
@ -408,7 +408,7 @@
if($rec->new_id) {
//Now replace it
$result= preg_replace($searchstring,$CFG->wwwroot.'/mod/quiz/index.php?id='.$rec->new_id,$result);
} else {
} else {
//It's a foreign link so leave it as original
$result= preg_replace($searchstring,$restore->original_wwwroot.'/mod/quiz/index.php?id='.$old_id,$result);
}
@ -474,7 +474,7 @@
function quiz_decode_content_links_caller($restore) {
global $CFG, $DB;
$status = true;
if ($quizs = $DB->get_records('quiz', array('course'=>$restore->course_id), '', "id,intro")) {
//Iterate over each quiz->intro
$i = 0; //Counter to send some output to the browser to avoid timeouts
@ -775,4 +775,4 @@
return implode(',', $questionids);
}
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
//This php script contains all the stuff to backup/restore
//quiz mods
@ -1904,4 +1904,4 @@
}
return $status;
}
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
/**
* This page prints a review of a particular quiz attempt
*
@ -56,7 +56,7 @@
$questionids = $attemptobj->get_question_ids();
} else {
$questionids = $attemptobj->get_question_ids($page);
}
}
$attemptobj->load_questions($questionids);
$attemptobj->load_question_states($questionids);
@ -258,4 +258,4 @@
echo "</div>";
echo $OUTPUT->footer();
?>

View File

@ -129,4 +129,4 @@
/// Finish the page
echo $OUTPUT->footer();
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page.
@ -92,4 +92,3 @@ class admin_setting_quiz_reviewoptions extends admin_setting {
$this->description, true, '', get_string('everythingon', 'quiz'), $query);
}
}
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
/**
* settingstree.php - Tells the admin menu that there are sub menu pages to
* include for this activity.

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
/**
* This page deals with starting a new attempt at a quiz.
*
@ -122,4 +122,3 @@ foreach ($quizobj->get_questions() as $i => $question) {
/// Redirect to the attempt page.
redirect($quizobj->attempt_url($attempt->id));
?>

View File

@ -136,4 +136,4 @@ echo $OUTPUT->container_end();
$accessmanager->show_attempt_timer_if_needed($attemptobj->get_attempt(), time());
echo $OUTPUT->footer();
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
/**
* Sets up the tabs used by the quiz pages based on the users capabilites.
*
@ -62,7 +62,7 @@ if ($currenttab == 'reports' and isset($mode)) {
$currenttab = '';
$reportlist = quiz_report_list($context);
foreach ($reportlist as $report) {
$row[] = new tabobject($report, "$CFG->wwwroot/mod/quiz/report.php?q=$quiz->id&amp;mode=$report",
get_string($report, 'quiz_'.$report));
@ -97,4 +97,4 @@ if (!$quiz->questions) {
print_tabs($tabs, $currenttab, $inactive, $activated);
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
////////////////////////////////////////////////////////////////////////////////
// Code fragment to define the version of quiz
@ -9,4 +9,4 @@ $module->version = 2009042000; // The (date) version of this module
$module->requires = 2009041700; // Requires this Moodle version
$module->cron = 0; // How often should cron check this module (seconds)?
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
/// This page prints a particular instance of quiz